Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependency specified was Microsoft.AspNet.Mvc >= 6.0.0-beta6 but ended up with Microsoft.AspNet.Mvc 6.0.0-beta5

In VS 2015, after upgrading NuGet packages I get the following warning:

Dependency specified was Microsoft.AspNet.Mvc >= 6.0.0-beta6 but ended up with Microsoft.AspNet.Mvc 6.0.0-beta5.

What does this mean?

EDIT:

The problem is that the newly upgraded package had not been restored to my system. I had to manually restore the packages by righting clicking on the project and choosing Restore.

Why would they not restore on the build?

like image 845
Dave New Avatar asked Aug 02 '15 08:08

Dave New


1 Answers

Restore doesn't happen on build. It happens when dependencies change (project.json is saved or a manual restore happens). Building needs to happen way more often than changing dependencies so coupling the two things isn't really a great idea. Also because the entire dependency graph needs to be checked against your configured feeds, restore might be a slow operation. So it's best not to slow the build down.

FYI: You should never get an error like that (saying that beta6 was specified and beta6 was resovled. This is a bug see https://github.com/aspnet/dnx/issues/2402)

like image 87
davidfowl Avatar answered Nov 06 '22 07:11

davidfowl