Looking at NuGet improvements in Rider 2018.2
In our latest Rider 2018.2 version, we made a number of improvements to using the NuGet package manager. We updated the NuGet Tool Window, resulting in a better experience. Specifically, we’ve added the option to filter and configure the NuGet log, detect when a NuGet package is auto-referenced from another NuGet package so not to independently modify it, and added MSBuild package restore for .NET Core and a few more improvements. Let’s have a look!
Updating NuGet packages
To view the NuGet Tool Window, open it from the tools button to the left on the status bar, or use the View | Tool Windows | NuGet menu.
Let’s take a look at the Package tab. The first thing that you will notice is that we’ve added a button for upgrading all NuGet packages in the solution in the button group to the left. This will be a huge time saver when you are OK with upgrading all packages at once.
In Rider 2018.2, we are giving better information regarding packages that cannot be upgraded explicitly. Some NuGet packages that will show in Rider as upgradeable are referenced by an SDK (such as .NET Core) and will need to be upgraded by updating the SDK. We have disabled the upgrade for such packages in the tool window and will give details instructions as shown below on how to upgrade.
Better logging for NuGet
The biggest difference you will find with the NuGet Tool Window’s Log tab is the addition of a new button bar for new functionality for working with the packages in your solution or projects. We will look at the new functionality in details but to start, let’s look at the new bar.
The first set of buttons on the bar control and show or hide the details of the log entries regarding date and time, context, and level. Each will hide or show the content in the NuGet log details. We find that this helps when developers need to communicate or save package install or restore details.
The next group of buttons will perform the following functionality:
- Soft wrap the log details for better readability.
- Scroll to the end of the log details.
- Delete and clear all log details.
Finally, we have added a filter so developers can quickly see log details of different types.
Support for MSBuild package restore for .NET Core
Currently, Rider uses its own NuGet Restore Engine for all .NET solutions. We want the NuGet experience in Rider to be the same as in Visual Studio. We want to migrate to another Restore Engine, which is based on MSBuild for .NET Core, and have our NuGet installation and restoration work the same way as in a console or Visual Studio.
In 2018.2, we introduced a special setting on the NuGet page: .NET Core Restore Engine under File | Settings | Build, Execution, Deployment | NuGet. MSBuild is already available, but it works only in a limited amount of situation, so it’s disabled by default. In 2018.3, we are planning to fix issues found when using the MSBuild engine. Please try it out in 2018.2 and give us your feedback so we can make this NuGet functionality better for Rider 2018.3.
Other fixes and improvements
In addition to the fixes and improvements we’ve looked at in this blog post, there are other areas that we have worked on to make your development and testing experience the best it can be:
- We’ve fixed a bug when a project loaded by Rider has the same name as a NuGet package used in that project.
- We have removed support for
project.jsonbased projects in Rider and for NuGet restoration.
- Projects can now use NuGet servers that only use TLS 1.2.
- We have fixed a bug that was not allowing developers to log into their VSTS private NuGet feeds. The fix will allow the login popup to appear to allow for authentication.
Download Rider 2018.2 now! We’d love to hear your feedback on these fixes and improvements!