在Visual Studio 2012中没有显示Source Lines的例外情况

时间:2014-09-09 20:14:26

标签: asp.net vb.net visual-studio visual-studio-2012

最近我的Visual Studio 2012在抛出异常时停止打开源代码行,并且双击callstack中的行也没有转到源代码行。

我正在使用visual studio 11.0.50727.1 RTMREL并安装了.NET 4.5.51209。 这发生在.net 3.5 asp.net Web应用程序中。

我也安装了resharper 7.1.3,但之前从未引起过这个问题。

我该如何解决?

更新: 我创建了一个新的vb.net Empty Web应用程序,添加了一个抛出异常的Default.aspx,并且遇到了同样的问题。 (因为它不会自动导航到具有异常的代码行,并且在双击调用堆栈顶部时也不会导航) 我使用了以下测试线:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim x As String
    x = "hello world"
    Throw New Exception("oh no")
End Sub

这是我的视觉工作室信息:

Microsoft Visual Studio Ultimate 2012
Version 11.0.50727.1 RTMREL
Microsoft .NET Framework
Version 4.5.51209

Installed Version: Ultimate

Architecture and Modeling Tools   04940-004-0038003-02335
Microsoft Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Team Explorer for Visual Studio 2012   04940-004-0038003-02335
Microsoft Team Explorer for Visual Studio 2012

Visual Basic 2012   04940-004-0038003-02335
Microsoft Visual Basic 2012

Visual C# 2012   04940-004-0038003-02335
Microsoft Visual C# 2012

Visual C++ 2012   04940-004-0038003-02335
Microsoft Visual C++ 2012

Visual F# 2012   04940-004-0038003-02335
Microsoft Visual F# 2012

Visual Studio 2012 Code Analysis Spell Checker   04940-004-0038003-02335
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

JetBrains ReSharper 7.1.3   Full Edition build 7.1.3000.2254 on 2013-04-10T22:48:18
JetBrains ReSharper 7.1.3 package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper/. Copyright © 2003–2014 JetBrains, Inc.

NuGet Package Manager   2.0.30625.9003
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.0
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   11.1.40706.0
Microsoft SQL Server Data Tools

StyleCop   4.7.49.0
Provides source code style and consistency tools. See http://www.stylecop.codeplex.com/ for more details.

Web Developer Tools   1.0.30710.0
Microsoft Web Developer Tools contains the following components:
Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
Web Form Templates: Includes the default templates for Web Form Applications.
Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.

1 个答案:

答案 0 :(得分:0)

好的,我找到了解决办法。

  1. 重建解决方案
  2. 关闭Visual Studio
  3. 打开IIS并停止Web服务器
  4. 回收所有应用程序池
  5. 清除C:\ Windows \ Microsoft.Net \ Framework#version#\ Temporary ASP.NET Files中的Internet临时文件
  6. 之后,测试项目和原始项目按预期工作。