Open the csproj file in Notepad
Search for nuget and delete the Target node like this:
<Target Name=”EnsureBclBuildImported” BeforeTargets=”BeforeBuild” Condition=”‘$(BclBuildImported)’ == ””>
<Error Condition=”!Exists(‘..\WindowFormDemo\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets’)” Text=”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=317567.” HelpKeyword=”BCLBUILD2001″ />
<Error Condition=”Exists(‘..\WindowFormDemo\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets’)” Text=”The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568.” HelpKeyword=”BCLBUILD2002″ />
</Target>
Other solutions
Reference:
http://docs.nuget.org/ndocs/consume-packages/package-restore
Find the project file .csproj, open it, and remove the following
<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>
Similar Posts:
- VS Net Core Project Exception Resolution – project.assets.json’ not found. Run a NuGet package restore to generate this…
- Nuget cannot find the asset file project.assets.json [How to Solve]
- [Solved] Rename failed for user ‘dbo’ -MS SQL ERROR 15150
- Inline variable declaration not compiling [How to Solve]
- [Solved] yarn: Unable to load the File C:\Users\Administrator\AppData\Roaming\npm\yarn.ps1, Because running scripts is prohibited on this system.
- [Solved] HTTP could not register URL http:/+:6001/
- Gulp Serve Error: gulp.ps1 [How to Solve]
- [Solved] Microsoft.CSharp.Core.targets(84,5): error MSB6006: “csc.exe” Exited with code -1066598274
- Eclipse C/C++ Error: launch failed,binary not found
- [Solved] Vue : The file D:\Program Files\nodejs\node_global\vue.ps1 could not be loaded, because running scripts is disabled on this system.