Today while poking around the JetBrains Tools Blog and reading an article about their ReSharper SDK update notifications. In the blog post it mentioned a couple of plugins that are using this feature. And the name of one of them, resharper-nuget, caught my eye, being a bug fan of NuGet and a longtime user of ReSharper.
So I went over to https://github.com/JetBrains/resharper-nuget and perused the home page there and read briefly about it. And it fixes an issue when using ReSharper’s “Add Reference” functionality on undefined types. I will let the following quote from the projects home page describe it better than me repeating it here.
ReSharper has a Context Action on undefined types that looks at assemblies referenced in other projects for that type. If it finds a match, it will add a reference to the assembly, and import the namespace, fixing up the undefined error.
However, ReSharper always adds the assembly as a file reference, even if the assembly is part of a NuGet package. This means NuGet’s referencing is bypassed, and the packages.config file isn’t updated, dependencies aren’t installed, and things don’t work when it’s time to update the package.
This plugin makes ReSharper invoke NuGet when adding a reference to an assembly in a NuGet package.
Check it out, as it should make it easier to use NuGet packages in other porjects in a solution without those being file references, and proper NuGet package references are made so any updates to the NuGet package will smoother.