问题出现的场景:

1. Visual Studio 的版本:Visual Studio 2012

2. Web 项目类型是 WebSite,不是 Web Application

3. Web 项目引用的 Visual Studio 项目被删除或卸载(Unload)

详细的错误信息:

Error 124 Cannot update project reference ''. Source project not available.

解决方法:

用记事本打开解决方案文件(.sln),找到对应 Web 项目的 ProjectReferences 部分

ProjectSection(WebsiteProperties) = preProject
    TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
    ProjectReferences = ""

将 ProjectReferences 的值改为空,重新添加所需的引用,然后编译,问题即可解决。

相关链接:

Improve "Cannot update project reference" for unloaded projects

相关文章:

  • 2022-01-15
  • 2021-05-24
  • 2022-03-07
  • 2021-12-05
  • 2021-12-30
  • 2022-12-23
  • 2021-10-25
  • 2021-12-29
猜你喜欢
  • 2022-12-23
  • 2021-09-20
  • 2021-08-09
  • 2021-08-04
  • 2022-12-23
相关资源
相似解决方案