This repository was archived by the owner on Dec 18, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 222
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
The packInclude source paths aren't relative to project root #2604
Copy link
Copy link
Closed
Description
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.