Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

In my Visual studio 2015 update 3, I am experiencing bellow error when copied the solution folder to another windows machine.

Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Net.Compilers.1.0.0\build**Microsoft.Net.Compilers.props.**

I verified the NuGet Package Manager for the project, everything that marked as "missing" has a green tick next to it, including Microsoft.Net.Compilers.

like image 889
Sree Avatar asked Jan 03 '23 21:01

Sree


1 Answers

solved the issue by removing below mentioned code segment from .csproj 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>
like image 105
Sree Avatar answered May 18 '23 23:05

Sree