Closed
Closed
Copy link
Labels
Functionality:PackIcebox cleanup candidatePriority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Status:InactiveIcebox issues not updated for a specific long timeIcebox issues not updated for a specific long timeStyle:PackageReferenceType:Feature
Description
I can't figure out how the NuSpec <references> element maps to a csproj or MSBuild property. I believe it is because this mapping was omitted. The following articles:
https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target
https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#nuget-metadata-properties
fail to mention this.
Please let me know how to specify an explicit assembly reference for the pack target in a csproj file, explain why this capability does not exist, or use this issue to implement the mapping. Thank you.
Metadata
Metadata
Assignees
Labels
Functionality:PackIcebox cleanup candidatePriority:3Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.Status:InactiveIcebox issues not updated for a specific long timeIcebox issues not updated for a specific long timeStyle:PackageReferenceType:Feature
Activity
jainaashish commentedon Apr 25, 2018
@rohit21agrawal can you quick peek into this and respond accordingly?
rohit21agrawal commentedon Apr 25, 2018
currently this capability does not exist. We will add this to our feature backlog. Thanks for reporting!
MaxG117 commentedon Apr 25, 2018
I have an additional question/request.
My nuget package consists of two assemblies: A.DLL and B.DLL, The consumer of my package (a.k.a. the target project) only needs to reference A.DLL, but A.DLL requires B.DLL at runtime. This is why I added an explicit assembly reference to A.DLL using the
<references>NuSpec element. This worked as expected when targeting .NET Framework -- building the target project placed both A.DLL and B.DLL into the build output directory and the target project executes successfully.However, I'm now targeting .NET Standard and I found out that
dotnet publishdoes not copy B.DLL into the publish directory. The only way to get B.DLL into the publish directory was to remove the explicit assembly reference to A.DLL from the NuSpec file. I believe this is adotnet publishbug, If B.DLL is copied to the build output directory, it should also be copied to the publish directory. Please let me know if I should open a separate issue.rohit21agrawal commentedon Apr 26, 2018
@MaxG117 can you show us the nuspec you use to build your package, and the nuspec that's present inside the generated package, along with the contents of the obj folder (*.g.props, *.g.targets, project.assets.json) , after you run a restore?
TechnikEmpire commentedon Jul 22, 2018
I've seen this as well.
Microsoft.Data.Sqlitesuffers from the same/similar problem if I'm understanding the notes here. If I reference that package in a .NET Standard library, then have a consumer reference my package (which referencesMicrosoft.Data.Sqlite), the targets that unpack the Sqlite native assemblies into the bin folder on build will not get executed. I have to explicitly referenceMicrosoft.Data.Sqliteto get the package to work properly in this use cause (which I was argue is not only normal, but fundamental) and it's extremely annoying to pass this on to consumers. You're basically forced to hand out broken packages.2 remaining items
dotnet-policy-service commentedon Mar 5, 2026
Due to lack of recent activity, this issue has been marked as a candidate for icebox cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will add a
Triage:NeedsTriageDiscussionlabel and lead to a triaging process.This process is part of the experimental Stale icebox issues cleanup we are currently trialing. Please share any feedback you might have in the linked issue.
dotnet-policy-service commentedon Mar 19, 2026
This issue will now be closed since it had been marked Icebox cleanup candidate, but received no further activity in the past 14 days.