NuGet works with all .NET projects. However, the project format (SDK-style or non-SDK-style) determines some of the tools and methods that you need to use to consume and create NuGet packages. SDK-style projects use the SDK attribute. It is important to identify your project type because the methods and tools you use to consume and create NuGet packages are dependent on the project format. For non-SDK-style projects, the methods and tools are also dependent on whether or not the project has been migrated to PackageReference format.
Whether your project is SDK-style or not depends on the method used to create the project. The following table shows the default project format and the associated CLI tool for your project when you create it using Visual Studio 2017 and later versions.
To create packages, msbuild -t:pack is recommended. Otherwise, use the dotnet SDK. Migrated projects are not SDK-style projects.
Check the project format
If you're unsure whether the project is SDK-style format or not, look for the SDK attribute in the <Project> element in the project file (For C#, this is the *.csproj file). If it is present, the project is an SDK-style project.
Create a .NET project and learn to add packages and manage package dependencies in your project. Use the .NET Core CLI and NuGet registry to add libraries and tools to your C# applications through Visual Studio Code.