diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 939885924fd3..e8ea910b7759 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -251,46 +251,78 @@ Each library needs to provide a `ApiCompatVersion` property which is set to the ### Releasing a new version of a GA'ed libary Since the [eng/Packages.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Packages.Data.props) is currently maintained manually, you will need to update the version number for your library in this file when releasing a new version. -## Dev Feed -We publish daily built packages to a [dev feed](https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net) which can be consumed by adding the dev feed as a package source in Visual Studio. +## NuGet Package Dev Feed -Follow instructions provided [here](https://docs.microsoft.com/nuget/consume-packages/install-use-packages-visual-studio#package-sources) and use `https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json` as the source. +The Azure SDK for .NET releases packages daily from our CI pipeline to our NuGet package dev feed to help developers use and test new libraries before they are officially released to NuGet. -You can also achieve this from the command line. +**Dev Feed Package Browser**: -```nuget.exe sources add -Name "Azure SDK for Net Dev Feed" -Source "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"``` +- https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net -Open your NuGet.config file to ensure that the dev feed source comes before the public repository source: +**Dev Feed Package Source**: + +- https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json + +### 1. Add NuGet Package Dev Feed + +You have multiple options for referencing the dev feed. You can either add it via the NuGet CLI or manually edit your NuGet.Config file. + +#### NuGet CLI + +You can add the dev feed using the [NuGet CLI](https://docs.microsoft.com/nuget/reference/nuget-exe-cli-reference), which will add it to the NuGet.Config file. + +```bash +nuget sources add -Name "Azure SDK for .NET Dev Feed" -Source "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" +``` + +You can then view the list of NuGet package sources with this command: + +```bash +nuget sources +``` + +#### NuGet Config file + +You can add the dev feed to your NuGet.Config file, which can be at the Solution, User, or Computer level. See [NuGet.Config file locations and uses](https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses) to locate your NuGet.Config file. ```xml - - + + + + + ``` -You can then consume packages from this package source, remember to check the [Include prerelease](https://docs.microsoft.com/nuget/create-packages/prerelease-packages#installing-and-updating-pre-release-packages) box in Visual Studio when searching for the packages. +> You can place a NuGet.Config file in the root of your solution. Projects within the solution will use the feed defined in that file. + +### 2. Find NuGet Package + +You can use the following options to find the available dev feed packages: + +1. Search the Azure SDK for .NET Dev Feed: https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net +1. In Visual Studio, use the [Package Manager UI](https://docs.microsoft.com/nuget/create-packages/prerelease-packages#installing-and-updating-pre-release-packages), be sure to check "Include prerelease". +1. Use the NuGet CLI, for example `nuget list azure.identity -Prerelease -Allversions` + +### 3. Reference NuGet Package -To see the list of packages you can browse the [dev feed](https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-net) and search for the package you are interested in. Or you can do it from the command line via `nuget.exe list -Prelease -Source "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"` +Now that you have found the package you want to use, it is time to add it to your project file. -To consume the a dev package set the exact version in your project or to consume the latest dev package set the version to `x.y.z-dev.*` for example: +As you can see in the example below, we want to use the `Azure.Data.Tables` version `3.0.0-alpha.*`. By using the `*` in the version number each `dotnet restore` will pull the latest version from the dev feed. ```xml - - Exe - netcoreapp3.1 - - + ``` -## Preparing to a release of the new library +## Preparing a new library release To update the CHANGELOG, version and release tracking information use the `.\eng\scripts\Prepare-Release.ps1` script. @@ -494,4 +526,4 @@ For more information on how we version see [Versioning](https://github.com/Azure ## Breaking Changes -For information about breaking changes see [Breaking Change Rules](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/breaking-change-rules.md) +For information about breaking changes see [Breaking Change Rules](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/breaking-change-rules.md) \ No newline at end of file