The latest Rider 2019.2 Early Access Preview (EAP) brings a bunch of updates to the built-in NuGet client!
- We now display a package’s
readme.txtto help determine next steps after installing a package.
- XDT transformations are run, automatically adding/removing entries from configuration files when required by the package.
- Rider supports native cross-platform credential providers, such as the one available for Azure DevOps/Artifacts, for accessing private feeds.
- We have made several updates to upgrading multiple packages in multiple projects, making package upgrades easier.
That warrants a closer look, doesn’t it?
Usually, no additional steps are needed after installing a dependency via NuGet. However, what to do when additional steps are required? For example, we may need to register a middleware. Or add a configuration file entry. How would we know, though?
Many NuGet package authors add a
readme.txt file, describing “next steps”. Rider now opens a package’s
readme.txt in the editor, right after installing a package:
XDT transformations updating XML files
readme.txt file support is useful, but what if the package could automatically update one or more files for us? When implemented in a package, Rider will now run config file/XDT transformations to help in adding required entries, for example to an
Native cross-platform credential providers for private feeds
Many teams and organizations use private NuGet feeds in their development flow. To access such feeds, Rider prompts for credentials using built-in credential providers for MyGet, Azure Artifacts, and feeds protected with username/password authentication.
When we introduced this feature in Rider, the underlying NuGet libraries did not provide a cross-platform story for credential provider plugin: we had to develop these prompts ourselves. The big advantage there is a tight integration with Rider and support for Windows, Linux and macOS. The downside though, is that some scenarios (like using certificate-based authentication) may not work.
Newer NuGet versions now provide cross-platform authentication plugin support, such as the one provided by Azure Artifacts. These can support alternative authentication methods provided by the platform.
With Rider 2019.2 we’re making NuGet’s own cross-platform credential providers available in your favorite IDE (when enabled)!
We can enable them in the settings, under Build, Execution, Deployment | NuGet, by updating the Use credential providers setting to NuGet/.NET CLI plugins and restarting Rider.
Once enabled, the
%USERPROFILE%\.nuget\plugins (Windows) and
$HOME/.nuget/plugins (Linux/macOS) path will be probed for credential provider plugins that are applicable, and Rider will use those to perform authentication. With Azure Artifacts, you’ll see an interactive prompt on Windows, whereas on Linux and macOS, the credential provider will request to authenticate using the browser instead:
Improved package upgrade for multiple packages/projects
Quite often, we’re faced with the task of upgrading several dependencies at once, often across multiple projects or even solution-wide. While Rider has had support for this scenario for a while now, we’ve been hard at work making this process more robust.
Next to all of the above, a number of bugs have been fixed – for example, when comments were present in the project file’s
TargetFramework(s) element. We also made a couple of improvements to logging NuGet operations.
Download Rider 2019.2 EAP now and give it a try! We would love to hear your feedback!