1
votes

If I create a .NET Core Class Library in Visual Studio 2017, I get the Package tab on project properties. If I create an "old fashioned" Class Library, I do not get the Package tab, nor the "Pack" target in MSBuild.

NuGet is integrated into VS2017 and MSBuild to some degree, but it seems to be only for .NET Core projects.

Is there a way to use any of the NuGet integration for non-.NET Core projects or do I just need to install the NuGet CLI and use a .nuspec file?

1

1 Answers

2
votes

This support for integrated packaging needs "SDK-style" csproj files which are used for .NET Core and .NET Standard projects. Since a few features (like some designers) aren't yet available for these projects, there are no templates for "SDK-style" csproj-based projects for .NET Standard.

However, you can create a .NET Standard project and change the csproj file from

<TargetFramework>netstandard1.6</TargetFramework>

to a net* moniker like

<TargetFramework>net461</TargetFramework>

This gives you all the tooling for creating NuGet packages and managing versions and metadata.