.NET编译问题汇总

1、Your project.json doesn't list 'win' as a targeted runtime. You should add '"win": { }' inside your "runtimes" section in your project.json, and then re-run NuGet restore.

解决方法:

  • Clean solution
  • Delete obj folders
  • Delete the .vs folder (optional)
  • Close and reopen Visual Studio
  • Then build
  • 如果还不行的话,再试试这个:It turns out that NuGet had snuck in a project.lock.json. Once I deleted the file, the problem went away.
  • 如果分开试不行,全部步骤一起上,我是全部一起都用了才行的(甚至把bin目录也删了)。
原文地址:https://www.cnblogs.com/s5689412/p/12015140.html