asp.net-mvc-4 - 如何永久教 Visual Studio 检测我的调试信息?

标签 asp.net-mvc-4 visual-studio-2012 visual-studio-debugging iis-express

使用 Visual Studio 2012,也许您也看到过这条消息:

enter image description here

它说:

The following module was built either with optimizations enabled or without debug information:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\6dce49fa\6c454827\assembly\dl3\95d61873\9871ffdd_4288ce01\NoeDownloadbereichWeb.dll

To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.



在过去,当我开始调试我的 ASP.NET 应用程序并通过简单地重新编译我的解决方案来解决它时,我可能每周都会遇到这个问题。

最近我切换到 IIS Express,现在每第二/第三次发生这种情况,我想在我做了一些更改后调试我的代码。

我通过以下一个或所有步骤来解决它:
  • 重建我的应用程序(大部分时间都有帮助)
  • 关闭 IIS Express 并重建我的应用程序
  • 重新启动 Windows 8 并重建我的应用程序

  • 我找到了 similar questions hereon Google并且仍然无法永久解决此问题。

    我的问题:

    你能想象是什么导致了这种行为吗?

    更新 1

    该错误似乎与 ASP.NET error messages 有关/紧随其后喜欢(德语):

    Das Erstellen von "System.Net.Http.Extensions" oder das Erstellen einer Schattenkopie ist nicht möglich, wenn diese Datei bereits vorhanden ist.



    粗略地翻译成英语:

    Cannot create/shadow copy "System.Net.Http.Extensions" when that file already exists.



    (引用的文件名“System.Net.Http.Extensions”是由ASP.NET随机更改的)

    更新 2

    我已经切换回 Visual Studio 开发服务器并立即摆脱了上述错误:

    enter image description here

    不知道这是否只是在我的系统上,或者是什么原因。

    最佳答案

    转到“工具”>“选项”>“调试”>“常规”>“仅启用我的代码”>“如果启动时没有用户代码则发出警告”

    tools options screenshot

    关于asp.net-mvc-4 - 如何永久教 Visual Studio 检测我的调试信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17828872/

    相关文章:

    javascript - 触发不显眼的验证,但阻止在 mvc4 表单上提交

    c# - 通过 javascript 从 View 渲染页面

    c++ - 将 filesystem::path 元素附加到另一个路径的最佳方法是什么?

    visual-studio-2012 - 在 Visual Studio 2012 中调试时如何查看所有变量

    c# - ASP.NET MVC 4 HttpClient() 问题

    asp.net-mvc - ASP.NET MVC : Shared layout

    c++-cli - HashSet <T>在VS2012中哪里去了?

    windows - 无法使用 Visual Studio 2012 打开 .dmp 文件

    visual-studio-2010 - CXX0017 : Error: symbol not found in static library

    停止执行并启动 Visual Studio 调试器的 C++ 源代码行