Sree
Sree

Reputation: 351

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.

Upvotes: 4

Views: 4047

Answers (1)

Sree
Sree

Reputation: 351

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>

Upvotes: 9

Related Questions