Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

The packInclude source paths aren't relative to project root #2604

Closed
bricelam opened this issue Sep 1, 2015 · 2 comments
Closed

The packInclude source paths aren't relative to project root #2604

bricelam opened this issue Sep 1, 2015 · 2 comments
Assignees
Milestone

Comments

@bricelam
Copy link
Contributor

bricelam commented Sep 1, 2015

My solution looks like this.

  • C:\Projects\Microsoft.Data.Sqlite\
    • src\
      • Microsoft.Data.Sqlite\
        • runtimes\
        • project.json

My project.json includes the following.

{
    "packInclude": {
        "runtimes/": "runtimes/**"
    }
}

I get different results depending on where I run dnu pack from.

Running C:\Projects\Microsoft.Data.Sqlite>dnu pack src\Microsoft.Data.Sqlite, I get the following exception:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Projects\Microsoft.Data.Sqlite\runtimes\win\native\x86\sqlite3.dll'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at NuGet.PhysicalPackageFile.GetStream()
   at NuGet.PackageBuilder.WriteFiles(ZipArchive package)
   at NuGet.PackageBuilder.Save(Stream stream)
   at Microsoft.Dnx.Tooling.BuildManager.BuildInternal(String projectPath)
   at Microsoft.Dnx.Tooling.BuildManager.Build()
   at Microsoft.Dnx.Tooling.PackConsoleCommand.<>c__DisplayClass0_0.<Register>b__1()
   at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)
   at Microsoft.Dnx.Tooling.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
   at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, FrameworkName targetFramework)
   at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkName targetFramework)

However, if I run C:\Projects\Microsoft.Data.Sqlite\src\Microsoft.Data.Sqlite>dnu pack, it works.

The paths used in the packInclude property should be relative to the project root, not the current directory.

@analogrelay
Copy link
Contributor

Should be a simple fix. I'll work on it ASAP.

@bricelam
Copy link
Contributor Author

bricelam commented Sep 1, 2015

Awesome, thanks. KoreBuild obviously calls pack from the repository root.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants