visual studio 2015 update 2 RTM和RC调试上下文不可用

时间:2016-03-29 12:19:15

标签: c# visual-studio visual-studio-2015 asp.net-core roslyn

更新1:

将visual studio更新到2015版更新2 RTM后问题仍然存在。

更新2补丁可用2016年4月12日

感谢Patrick Nelson。

补丁已经发布

您可以下载补丁here

2016年8月16日更新:

最新vs 2015更新3 KB3165756存在同样的问题,请勿更新

使用的版本:

visual studio update 2 rc上的最新稳定版本

停用了我的所有扩展程序,并重新启动了我的所有设置

重现步骤:

  1. 安装visual studio update 2 rc
  2. 使用asp.net mvc核心模板创建新项目
  3. 调试应用
  4. 预期行为:

    能够调试asp.net应用程序  enter image description here

    实际行为:

    我无法在visual studio编辑器或即时窗口中探索变量的上下文,我在即时窗口中遇到以下错误

    enter image description here 错误CS0103:名称' myvariable'在当前上下文中不存在

5 个答案:

答案 0 :(得分:20)

使用试错法我发现了一个可以带回上下文调试的解决方法。

from tools >  options > debugging > general then enable

enter image description here

答案 1 :(得分:17)

这是Visual Studio 2015 Update 2中引入的错误。本质上,调试器无法检查动态模块中的局部变量。我们今天发布了一个修补程序。

您可以下载补丁here。补丁的文档是here。如果补丁不能解决您的特定情况,请告诉我。

答案 2 :(得分:2)

并且(使用托管兼容模式 - 已启用)请确保json配置文件具有此部分

"frameworks": {
    "dnx451": { }, 
    "dnxcore50": { }
},

答案 3 :(得分:2)

我找到了visual studio 2015 update 3,14.0.25420.01的解决方案 我刚刚从project.json中删除了“debugType”:“portable” 现在它对我有用。

答案 4 :(得分:0)

对于Visual Studio Update 3,我重置了我的Visual C#设置并且它有效。

相关问题