在网上下了个源码打开报错。

请确认 <Import> 声明中的路径正确,且磁盘上存在该文件。

一查,原来是路径错误。

解决办法:将项目文件(.csproj)用记事本打开,然后找到<Import >节点,作如下操作:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />  //也可能是别的,自己试试哪种符合自己的。

替换为: 

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

相关文章:

  • 2022-12-23
  • 2021-07-14
  • 2022-02-25
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
猜你喜欢
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案