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

后端 未结 19 1447
南方客
南方客 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:18

    If you are using TFS

    Remove the NuGet.exe and NuGet.targets files from the solution's .nuget folder. Make sure the files themselves are also removed from the solution workspace. Retain the NuGet.Config file to continue to bypass adding packages to source control.

    Edit each project file (e.g., .csproj, .vbproj) in the solution and remove any references to the NuGet.targets file. Open the project file(s) in the editor of your choice and remove the following settings:

    true  
    ...
      
    ...
      
        
            This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
        
        
    
    

    If you are not using TFS

    Remove the .nuget folder from your solution. Make sure the folder itself is also removed from the solution workspace.

    Edit each project file (e.g., .csproj, .vbproj) in the solution and remove any references to the NuGet.targets file. Open the project file(s) in the editor of your choice and remove the following settings:

    true  
    ...
      
    ...
      
        
            This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
        
        
    
    

    Reference: Migrating MSBuild-Integrated solutions to use Automatic Package Restore

提交回复
热议问题