-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet pack3 always adds exclude="Build,Analyzers" to .nuspec #3697
Comments
Example 1 Example 2 Example 3 The reason I think the issue here is, should nuget pack continue writing out the dependency exactly as the project contained it, or should it drop this extra information and leave it up to the user to decide how to handle it. |
lock down behavior in rc2. but this feels right. |
will consider adapting in future, if it becomes issue. |
@davidfowl what are your thoughts on this? Having these excludes is technically correct for duality, but if the dependency packages later change and start including build assets the older parent package would block them, which may be unintentional. |
Does this mean by default you won't get build targets from transitive package dependencies? That seems really wrong. I think the ideal way to support package project duality with this would be to have you get the targets imported when you reference a project. I'm not sure how feasible that is. It also seems like the current behavior also breaks package / project duality. Consider the following: ProjectA -> PackageB (with b.targets) ProjectA -> ProjectB (with b.targets) |
I ran into this today. The xunit.performance repo instructs you to reference the xunit.performance package as well as a version of Microsoft.Diagnostics.Tracing.TraceEvent:
This is because the TraceEvent package includes native libraries which are included via a .targets file. So even though the xunit.performance package has a dependency on the TraceEvent package, when you consume the xunit.performance package the native assets don't flow through to the consuming project, because by default the dependency has |
We've decided to change this default behavior for build assets and being tracking via #6091 |
Steps
dotnet new
a .csprojdotnet restore3
dotnet pack3
Expected
The
Microsoft.NETCore.App
dependency should look like this:Actual
It looks like this:
The text was updated successfully, but these errors were encountered: