当我在 ASP.NET 项目中执行 Build > Rebuild Solution 和 Build > Rebuild Website 时,它会生成 0 个错误。但是当我通过 F5 运行它时,我得到,“有构建错误。你想继续并运行最后一次成功的构建吗? ”
我选择“否”,错误列表仍然显示 0 个错误(11 个警告)。
所以 Visual Studio 似乎表明该解决方案/网站有 0 个错误,然后又表明它确实有错误。是不是它有 0 个编译时错误,但它确实有构建时错误?如果是这样,我如何确定这些构建时错误是什么,以便我可以解决问题?
这是一个使用 IIS6 的 Visual Studio 2010 VB 网站。
更新
当我右键单击解决方案并选择“在浏览器中查看”时,我得到:“错误 404.17 - 未找到请求的内容似乎是脚本,不会由静态文件处理程序提供服务。”
更详细的异常转储是:
Server Error in Application "DEFAULT WEB SITE/CPSPORTAL"
Internet Information Services 7.5
Error Summary
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Detailed Error Information
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:80/CPSPortal/default.aspx
Physical Path C:\CSPortalCode\csportal\default.aspx
Logon Method Anonymous
Logon User Anonymous
Most likely causes:
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
Things you can try:
If you want to serve this content as a static file, add an explicit MIME map.
Links and More Information
Sometimes preconditions and a wildcard MIME map can unintentionally cause serving script source.
View more information »
那么,这一切意味着什么呢?我怎样才能更恰当地将我的代码介绍给浏览器?
更新 2
我觉得这是最奇怪/最可怕的,也是令人反感的边缘。当我尝试各种方法来运行网站时,会发生以下情况:
Build > Rebuild Solution == 0 Errors
Build > Rebuild Website == 0 Errors
F5 or Shift+F5 == "There were build errors..."
Right-click the project in Solution Explorer and select "View in Browser" == the site runs in the browser showing me the Login page, active and responsive
ReSharper > Inspect > Code Issues in Solution == get 12,000 "issues" reported by R#