dotnet pack fails when PackAsTool is true and project has ProjectReference's
See original GitHub issueRepro Create a console app project with a ProjectReference to a class library.
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\ClassLib1\ClassLib1.csproj" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PackAsTool>true</PackAsTool>
</PropertyGroup>
</Project>
dotnet pack
Expected Creates a tool package with ClassLib1.dll bundled inside
Actual dotnet pack fails with this error
C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(198,5): error : Could not find a part of the path 'C:\Users\nmcmaster\AppData\Local\Temp\ClassLib1\bin\Debug\netcoreapp2.1\publish'. [C:\Users\nmcmaster\AppData\Local\Temp\test2\test2.csproj]
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
dotnet pack fails when `GeneratePackageOnBuild` is `true`
Using this simple repo: https://github.com/daniefer/dotnetcliissue When the true project attribute is specified and the project has not been ...
Read more >dotnet pack project references
Project-to-project references aren't packaged inside the project. Currently, you must have a package per project if you have project-to-project ...
Read more >Dotnet pack - include referenced projects
Shows how to workaround the current limitations of dotnet pack when referencing other projects.
Read more >dotnet pack command - .NET CLI
The dotnet pack command builds the project and creates NuGet packages. The result of this command is a NuGet package (that is, a...
Read more >Include both Nuget Package References and project ...
Recently I have been trying to generate more Nuget packages for our dotnet core projects, utilizing the dotnet pack command.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. @bricelam the latest KoreBuild should have this SDK now
Unfortunately the change has not been flowed to CLI. I’ll create a PR for it. And let you know when there is a good build