Question

I've got an ASP.NET Web Application (in the formal sense, it's not a "Web Site" project). It references some number of NuGet packages (let's call them all v1.0).

If I edit packages.config to reference a newer version of one of the NuGet packages and build, restore packages, or attempt to update the packages everything seems fine. It downloads the new package, creates a folder for it and the whole deal.

The problem comes when I attempt to reference newly added classes or properties within that package. (Let's call it v2.0.)

IntelliSense doesn't know about them. When I start trying to figure out why, I find that it's still referencing v1.0. It has downloaded 2.0, and the package file asks that it should use 2.0, but unless I explicitly remove the reference to the package and re-add it, VisualStudio seems content to stick with v1.0.

I feel like I must be doing something wrong, or at some point in time something has been configured incorrectly, but I'm at a loss as to what that might be.

Any advice?

Was it helpful?

Solution

You shouldn't update packages.config to get new package versions. Package Restore simply downloads the package files. It doesn't update references, etc.

To update a package you can use the Manage NuGet Packages dialog to install updates or use the Package Manager Console and type: Update-Package

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top