C# 奇怪的 Web 解决方案编译问题
我一遍又一遍地编译和重新编译 BugNET 。
我有以下问题。如果我删除所有 bin
和 obj
项目文件夹,并在发布模式下重新编译,我会收到一条错误,指出 BugNET.Global
无法找不到(Global.asax
背后的代码)
典型,但是:
描述:期间发生错误 解析所需的资源 服务此请求。请查看 具体解析错误如下 详细信息并修改您的源文件 适当地。
解析器错误消息:无法加载 输入“BugNET.Global”。
来源错误:
第 1 行:<%@ 应用程序 代码隐藏=“Global.asax.cs” 继承=“BugNET.Global”语言=“C#” %>
万一。
因此,问题是,如果我将解决方案设置回调试模式、构建并运行,应用程序就可以正常工作。如果我返回到发布模式,应用程序可以工作,如果我再次删除 bin / obj 文件夹,它就会停止工作,为什么? (在全新清理 bin 和 obj 文件夹后在发布模式下构建会产生此错误,而在调试模式下这样做则不会,而且我也可以在发布模式下运行。)
I'm compiling and re-compiling BugNET over and over again.
I have the following problem. If i delete all bin
and obj
project folders, and re-compile under release mode, I get an error stating that BugNET.Global
couldn't be found (the code behind for Global.asax
)
Typical, but:
Description: An error occurred during
the parsing of a resource required to
service this request. Please review
the following specific parse error
details and modify your source file
appropriately.Parser Error Message: Could not load
type 'BugNET.Global'.Source Error:
Line 1: <%@ Application
Codebehind="Global.asax.cs"
Inherits="BugNET.Global" Language="C#"
%>
Just in case.
So, the catch is that if I set the solution back in debug mode, Build, and run, the application works. If I go back to release mode, the application works, If I delete the bin / obj folders again it stops working, why? (Building under release mode after a fresh cleanup of bin and obj folders yields this error, while doing so under debug mode doesn't, and I can run under release mode too.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我更改了编译输出文件夹,从该新文件夹复制到 project\bin 解决了问题。
I had changed the compilation output folder, copying from that new folder to project\bin solved the problem.