-->
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.
Project | Default project format | CLI tool | Notes |
---|---|---|---|
.NET Standard | SDK-style | dotnet CLI | Projects created prior to Visual Studio 2017 are non-SDK-style. Use nuget.exe CLI. |
.NET Core | SDK-style | dotnet CLI | Projects created prior to Visual Studio 2017 are non-SDK-style. Use nuget.exe CLI. |
.NET Framework | Non-SDK-style | nuget.exe CLI | .NET Framework projects created using other methods may be SDK-style projects. For these, use dotnet CLI instead. |
Migrated .NET project | Non-SDK-style | To create packages, use msbuild -t:pack to create packages. | To create packages, msbuild -t:pack is recommended. Otherwise, use the dotnet CLI. Migrated projects are not SDK-style projects. |
Application project fileslink. By default, the CLI command ng new my-app creates a workspace folder named 'my-app' and generates a new application skeleton in a src/ folder at the top level of the workspace. A newly generated application contains source files.
Check the project format
Restore behavior with lock file. If a lock file is present for project, NuGet uses this lock file to run restore. NuGet does a quick check to see if there were any changes in the package dependencies as mentioned in the project file (or dependent projects' files) and if there were no changes it just restores the packages mentioned in the lock file. Project Web App automatically adds security to project files, so you don’t have to add a password to. How to Import MS Project Files into ProjectManager.com. Start by setting up a 30-day free account with us. You’ll see that we have multiple project views, such as kanban boards, task lists and a calendar view. Choose the online Gantt chart and follow this walkthrough. It’s that simple. Import MPP File.
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.Check the project format in Visual Studio
Project Files Ae
If you are working in Visual Studio, you can quickly check the project format using one of the following methods:
- Right-click the project in Solution Explorer and select Edit myprojectname.csproj.This option is only available starting in Visual Studio 2017 for projects that use the SDK-style attribute. Otherwise, use the other method.An SDK-style project shows the SDK attribute in the project file.
- From the Project menu, choose Unload Project (or right-click the project and choose Unload Project).This project will not include the SDK attribute in the project file. It is not an SDK-style project.Then, right-click the unloaded project and choose Edit myprojectname.csproj.