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)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.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)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>

 

3.

ERROR: Type or namespace name could not be found

解决方法:

Tools -> NuGet Package Manager -> Package Manager Control

Update-Package reinstall

相关文章:

  • 2021-10-06
  • 2022-01-08
  • 2022-12-23
  • 2021-11-02
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-09
  • 2021-07-14
  • 2021-06-18
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案