1. 把solution里面所有project的.net版本设成一样的
2.
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 {0}.
解决方法:
从.csproj文件中删掉如下code:
<Import Project="$(SolutionDir).nugetNuGet.targets" Condition="Exists('$(SolutionDir).nugetNuGet.targets')" /> <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).nugetNuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir).nugetNuGet.targets'))" /> </Target>
3.
ERROR: Type or namespace name could not be found
解决方法:
Tools -> NuGet Package Manager -> Package Manager Control
Update-Package –reinstall