Answered by:
Error - This project references NuGet package(s) that are missing on this computer

Question
-
User-797751191 posted
Hi
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.
Allow NuGet to download missing packages during build is ticked in Tools->Options
Thanks
Wednesday, September 18, 2019 5:28 PM
Answers
-
User665608656 posted
Hi jsshivalik,
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.
For this issue , you can try to follow these steps :
- Right click on project, click Unload Project.
- Right click on project. click Edit csproj.
- Remove the following code from the .csproj file, then save this file:
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>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}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> </Target>
4. Right click on project, click Reload Project.
For more details, you could refer to this link:
This project references NuGet package(s) that are missing on this computer
Best Regards,
YongQing.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, September 19, 2019 2:18 AM
All replies
-
User409696431 posted
Did you have a question?
Wednesday, September 18, 2019 6:49 PM -
User-797751191 posted
Hi
It is still giving same error
Thanks
Thursday, September 19, 2019 1:20 AM -
User665608656 posted
Hi jsshivalik,
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.
For this issue , you can try to follow these steps :
- Right click on project, click Unload Project.
- Right click on project. click Edit csproj.
- Remove the following code from the .csproj file, then save this file:
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>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}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> </Target>
4. Right click on project, click Reload Project.
For more details, you could refer to this link:
This project references NuGet package(s) that are missing on this computer
Best Regards,
YongQing.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, September 19, 2019 2:18 AM -
User-797751191 posted
Hi Yong
From where to open file .csproj
Thanks
Thursday, September 19, 2019 6:10 AM -
User665608656 posted
Hi jsshivalik,
To open .csproj file to edit, you can follow these steps:
- Right click on your project in solution explorer and select Unload Project
- Right click on the project (tagged as unavailable in solution explorer) and click "Edit yourproj.csproj". This will open up your CSPROJ file for editing.
- After making any changes you want, save and close the file. Right click again on the node and choose Reload Project when done.
More details, you could refer to this link : https://stackoverflow.com/a/5129214
Best Regards,
YongQing.
Thursday, September 19, 2019 8:06 AM