Visual Studio 2017 package tab missing from project settings

I created a simple .NET Framework project.

I would like to generate NuGet packages after the build, as described here .

However, the "Package" tab is missing, here is a screenshot .

+5
source share
1 answer

Visual Studio 2017 package tab missing from project settings

This is because your project is a .NET Framework library that still uses packages.config to manage NuGet packages. The Package tab is only supported by the new nuget package management form: PackageReference .

.NET Standard class libraries or .NET Core projects come with PackageReference enabled by default. So, you can create a .NET Standard library or a .NET Core project , then you will see the Package tab in the properties window.

If you want to use the Package tab for a .NET Framework.NET project, you can convert your project from the old .csproj to the new .csproj , (right-click your project-> Unload Project-> Change .csproj. Replace the contents of your csproj as follows:

 <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net46</TargetFramework> </PropertyGroup> </Project> 

See Old csproj for the new csproj update guide: Visual Studio 2017 for more information on converting the old .csproj to the new .csproj.

Note. You must delete the AssemblyInfo.cs file in the properties.

After converting to the new .csproj, you will get the Package tab for the .NET Framework.NET project:

enter image description here

Hope this helps.

+6
source

Source: https://habr.com/ru/post/1273351/


All Articles