问题
Update 1:
After Updating visual studio to version 2015 update 2 RTM the problem still exist.
Update 2 patch available 4/12/2016 :
Thanks to Patrick Nelson.
a patch has been released
You can download the patch here.
Update 3 8/16/2016:
Latest vs 2015 update 3 KB3165756 has the same problem do not update
Version Used:
Latest stable version on visual studio update 2 rc
Disabled all my extensions and also restarted my all settings
Steps to Reproduce:
- Install visual studio update 2 rc
- Create new project using asp.net mvc core template
- Debug the app
Expected Behavior:
To be able to debug the asp.net application
Actual Behaviour:
I can't explore context of variable inside visual studio editor or immediate windows i get the following error in immediate windows
error CS0103: The name 'myvariable' does not exist in the current context
回答1:
This is a bug that was introduced in Visual Studio 2015 Update 2. Essentially the debugger is unable to inspect local variables in dynamic modules. We released a hotfix for it today.
You can download the patch here. Documentation for the patch is here. Let me know if the patch does not fix your particular scenario.
回答2:
using trial and error method i found a workaround for know that will bring back context debugging.
from tools > options > debugging > general then enable
回答3:
and also (Use Managed Compatibility Mode - Enabled) please make sure json configuration file has this sections
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
回答4:
I found a solution for visual studio 2015 update 3, 14.0.25420.01 I just removed "debugType": "portable" from project.json Now it works for me.
回答5:
For Visual Studio Update 3 I reset my Visual C# settings and it worked.
来源:https://stackoverflow.com/questions/36284093/visual-studio-2015-update-2-rtm-and-rc-debugging-context-not-available