c# - 使用 msbuild 构建网站时出错 - ASPNETCOMPILER : error ASPRUNTIME: Object reference not set to an instance of an object

标签 c# asp.net compiler-errors msbuild

<分区>

当我收到以下错误时,我正在尝试使用 .NET 4.0.30319 下的 msbuild.exe 构建我们的 Web 项目:

ASPNETCOMPILER:错误 ASPRUNTIME:未将对象引用设置为对象的实例。

这个项目在大约一个月前一直构建良好,当时我们在长时间不活动后尝试构建。我尝试了以下方法:

  1. 清除 Framework 和 Framework64 下的临时 ASP .NET 文件区域

  2. 删除所有可能拉入的 *.compiled 文件

  3. 根据 this 重建 Web 部署项目发帖

在这种情况下,所有这些解决方案似乎都失败了。对我来说奇怪的是,当我检查日志并独立运行 aspnet_compiler(不是通过 msbuild)时,我没有收到错误,ASP 编译到指定部署就好了。

如有任何关于采取进一步措施的建议,我们将不胜感激。

最佳答案

当项目存储在 dropbox 文件夹中时出现问题

关于c# - 使用 msbuild 构建网站时出错 - ASPNETCOMPILER : error ASPRUNTIME: Object reference not set to an instance of an object,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26163604/

相关文章:

C# 读回加密密码

c# - 邮政信箱地址正则表达式问题

c++ - 通过 C++ 中的构造函数将地址参数传递给基类指针

java - 为什么 addNode() 方法返回编译错误 "The method...in type...is not applicable for the arguments...",以及如何修复它?

Java 9 错误 : not in a module on the module source path

c# - 为什么 '+' 字符从 Url 中删除

c# - 在Unity中使用C#进行音频淡入/淡出?

asp.net - 加密 Web.Config 外部文件中的 AppSettings

c# - MVC 3 自定义路由处理程序 - 跳到下一个自定义路由规则?

asp.net - 单个 ASP.NET UserControl 事件的多个订阅者?