This project references NuGet package(s) that are missing on this computer

后端 未结 19 1466
南方客
南方客 2020-11-28 00:29

I have an ASP.NET MVC5 application that worked yesterday and now I am getting this error when I try to build:

This project references NuGet package(s)

19条回答
  •  暖寄归人
    2020-11-28 01:33

    The first thing to try is to right-click the solution and select "Restore Nuget Packages".

    In my case that did not work, so I followed some recommendations on deleting "Import" and "Target" on project file, this worked for 2 of my 3 projects, but got a different error on the last one.

    What worked was to open the Package Manager Console and run:

    Update-Package -reinstall -ProjectName MyProjectName
    

    It takes some time but since it reinstall all packages your project will compile without problems

提交回复
热议问题