Skip to content
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

Warning about the 'Pack' target #114

Closed
marcominerva opened this issue Sep 6, 2018 · 6 comments
Closed

Warning about the 'Pack' target #114

marcominerva opened this issue Sep 6, 2018 · 6 comments

Comments

@marcominerva
Copy link

I have created a new project using James Montemagno's Plugin for Xamarin, that by default includes a reference to MSBuild.Sdk.Extras v1.4.0. I compile in Release mode (that has the "Generate NuGet package on build" option checked) and everything works fine.

However, if I update MSBuild.Sdk.Extras to version 1.6.52, the compilation in Release gives me the following warning:

C:\Users\marco.nuget\packages\msbuild.sdk.extras\1.6.52\Build\Workarounds.targets(121,5): warning : There are known issues using the 'Pack' target that comes with the v1 SDKs. Update to v2 and above SDKs to use the fixed 'Pack' target. If you don't need the fixed 'Pack' target the set 'ExtrasIgnoreOldSdkWarning' property to 'true'. If you need to use the v1 SDKs and to use the 'Pack' target, then add a 'NuGet.Build.Tasks.Pack' v4.3.0 and above, as a dependency to proceed.

To which SDKs (v1 & v2) are the warning referring to?

@clairernovotny
Copy link
Collaborator

These are the .NET Core SDK's. You need to have the latest installed. What version of VS are you using and what workloads did you select? I believe those SDK's are generally brought in by VS.

@marcominerva
Copy link
Author

I'm using Visual Studio Enterprise 15.8.2 and I have installed the Desktop .NET, Universal Windows Platform, ASP.NET And Web, Azure, Mobile and Cross-Platform .NET Core workloads.

The dotnet --info command gives me the following information:

.NET Core SDK:
Version: 2.1.401
Commit: 91b1c13032

Ambiente di runtime:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.401\

Host (useful for support):
Version: 2.1.3-servicing-26724-03
Commit: 124038c13e

.NET Core SDKs installed:
1.0.4 [C:\Program Files\dotnet\sdk]
1.1.0 [C:\Program Files\dotnet\sdk]
2.0.0 [C:\Program Files\dotnet\sdk]
2.0.2 [C:\Program Files\dotnet\sdk]
2.0.3 [C:\Program Files\dotnet\sdk]
2.1.2 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.100 [C:\Program Files\dotnet\sdk]
2.1.101 [C:\Program Files\dotnet\sdk]
2.1.102 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.301 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
2.1.400 [C:\Program Files\dotnet\sdk]
2.1.401 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

@clairernovotny
Copy link
Collaborator

that looks right, do you have a small repro?

@marcominerva
Copy link
Author

marcominerva commented Sep 6, 2018

Yes, you can find it at https://github.com/marcominerva/MultiTargetingIssue. Just set the compilation to Release and build the PlatformService project to see the warning.

@jbrown29
Copy link

jbrown29 commented Sep 7, 2018

following

@clairernovotny
Copy link
Collaborator

1.6.55 is rolling out to NuGet now with fixes for this.

As an aside, it happens if you use this as a PackageReference. I would recommend moving to the SDK style as per the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants