"donet pack" is not including project references
See original GitHub issueSteps to reproduce
git clone https://github.com/ivanz/dotnet-pack-repro.git
dotnet restore
dotnet build src\MainProject
dotnet pack src\MainProject
Expected behavior
DependencyProject.dll
should be included in the .nupkg
for the net46
framework:
{
"version": "0.10.0-unstable-*",
"frameworks": {
"net46": {
"dependencies": {
"DependencyProject": {
"target": "project"
}
}
},
"netstandard1.5": {
"dependencies": {
"NETStandard.Library": "1.6.0"
}
}
}
}
Actual behavior
DependencyProject.dll
is not included at all in the .nupkg
Environment data
dotnet --info
output:
> dotnet --info
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:57 (8 by maintainers)
Top Results From Across the Web
Dotnet pack - include referenced projects
When running dotnet pack and having references to other projects, the following nuspec ... dotnet pack is not including project references.
Read more >"donet pack" is not including project references · Issue #6688
I build the package with nuget and the nupkg file contained all 3 DLLs. The same behavior is not happening with dotnet pack....
Read more >dotnet pack command - .NET CLI
The dotnet pack command builds the project and creates NuGet packages. ... references to other projects, the other projects aren't included ...
Read more >asp.net core - Include all dependencies using dotnet pack
Is there any way to force dotnet pack to include all referenced assemblies (all dependencies in project.json)?. I believe this is related: https ......
Read more >Include both Nuget Package References *and* project ...
The official stance (as I understood it) is that the project references won't be included as they should be their own packages. This...
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
@ivanz you need to
dotnet pack
each dependency separately. This is by design.There actually is a ““simpler”” solution at the moment, involving adding and hooking up a custom target (tested on latest released bits):