-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pack command generates incorrect dependencies #4137
Comments
Ping @rrelyea, can this please hit RC3? The issue is that for an empty dependency group, it's not emitting a blank in the nuspec. |
@rrelyea we should assign a milestone to this asap |
@srivatsn there seems to be a build issue with the project file above :
Attaching a repro project - running dotnet restore, and then dotnet build repros the issue. Can you get someone to take a look? |
@onovotny if i understood your issue correctly, i have tried to repro it with a minimal csproj file, and it does have an empty net45 dependency group in the nuspec. We have made some changes to how pack gets its dependencies recently, and it may have fixed your issue. You can try it yourself by downloading the latest CLI version that also includes the sdk. Here is the project that i used. If this solved your issue, please let me know so i can close this bug. |
@onovotny have you tried repro'ing this issue with the latest CLI ? |
Just tried with the latest CLI and can confirm this is fixed for me. Thanks! |
Awesome! Thanks for validating :) |
Currently awaiting for NuGet/Home#4137 to be resolved - as dotnet pack causes our NET45 build NETStandard.Library which we wait to avoid.
Moved from dotnet/sdk#484 filed by @onovotny
I have a project which cross compiles to many target frameworks, including desktop .NET 4.5.
I have the
NETStandard.Library
excluded fromnet45
as many users complain when adding that dependency. When I then runmsbuild /t:pack
ordotnet pack
(same thing), the dependencies it generates includesnetstandard1.0
(which is a valid target platform), but it does not generate an empty group fornet45
. It's not properly calculating the dependencies that only affectnet45
.The result is that the
net45
package will resolve and get thenetstandard1.0
set of dependencies because there's no explicitnet45
dependency group and that's the problem.Here's what it generates:
And here's the csproj that created it.
The text was updated successfully, but these errors were encountered: