To install a preview or release candidate (RC) package via NuGet in Visual Studio, you will need to follow these steps:
- Open Visual Studio and go to the “Tools” menu. Select “NuGet Package Manager” and then choose “Package Manager Settings”.
- In the settings window, select the “Package Sources” tab.
- Click the “Plus” icon to add a new package source.
- In the “Name” field, enter a name for the package source (e.g. “Preview Packages”).
- In the “Source” field, enter the URL of the package source. For example, to install preview packages from the ASP.NET Core team, you could use the following URL: https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json
- Click “Update” to save the new package source.
- Go back to the Solution Explorer in Visual Studio and right-click on your project. Select “Manage NuGet Packages”.
- In the NuGet Package Manager window, select the package source that you just added from the dropdown list.
- Search for the package that you want to install, and then select the preview or RC version from the list of available versions.
- Click “Install” to install the package.