Skip to content

NuGet/Samples

Repository files navigation

Samples

This repo contains NuGet sample packages and sample code.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

  1. ExtensionSDKasNuGetPackage is a sample solution that walks you through several scenarios for shipping an extension SDK as nuget package

  2. VsCredentialProvider is a sample for creating a NuGet credential provider for Visual Studio

  3. Satellite-Packages is a sample class library and console app that demonstrates how to localize your NuGet packege using the Sattelite Package feature.

  4. PackageReferenceProjects demonstrates how you can manually migrate to the new PackageReference format.

  5. ContentFilesExample is a sample package and project that demonstrates how to use the contentFiles feature in NuGet 3.3+

  6. Preinstalled-Packages demonstrates how template authors can instruct NuGet to install the necessary packages, rather than individual libraries. Read more about Packages in Visual Studio templates

  7. CatalogReaderExample is a sample showing how to read the NuGet API's catalog resource.

  8. NuGetProtocolSamples shows how to use the NuGet.Protocol package.

  9. PackageDownloadsExample shows how to get a package's download counts.

  10. PackageSourceMappingExample is a sample solution that shows how to configure Package Source Mapping for a couple projects and packages. The README contains many smaller example scenarios and results.

Documentation and Further Learning

The NuGet Docs cover creating NuGet packages in more detail:

Feedback

If you're having trouble with the NuGet.org website or HTTP API, file a bug on the NuGet Gallery Issue Tracker.

If you're having trouble with the NuGet client tools (the Visual Studio extension, NuGet.exe command line tool, etc.), file a bug on NuGet Home.

Check out the contributing page to see the best places to log issues and start discussions. The NuGet Home repo provides an overview of the different NuGet projects available.