dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.92k stars 4.02k forks source link

"Internal error in the Basic compiler" and Some Stepping Not Working #47329

Open afbarksd opened 4 years ago

afbarksd commented 4 years ago

I have been using Visual Studio 2017 for years in a large solution. Today, for the first time, the Immediate window started showing "Internal error in the Basic compiler" some of the time when I tried to evaluate or modify variables. Also, I was able to step into only some of the code. One DLL into which I have stepped many times no longer allows it. I tried cleaning the solution, deleting the .vs directory, rebooting the computer, and building the solution again. Nothing worked. I am now trying "Options > Debugging > General > Use the legacy C# and VB expression evaluators". This is preventing me from doing my work. I have Microsoft Visual Studio Enterprise 2017, Version 15.7.2, running on Windows 10.

afbarksd commented 4 years ago

"Use the legacy C# and VB expression evaluators" would not allow me to set the values of variables nor have any effect on my being unable to step into code into which I stepped yesterday.

CyrusNajmabadi commented 4 years ago

@afbarksd can you provide us with a repro solution and a set of steps to reproduce the problem?

afbarksd commented 4 years ago

Thanks for responding. By "repro solution" do you mean an SLN file and accompanying code files that demonstrate the problems? I might be able to do that if the problems occur in a new solution. I'll try to do this if you answer affirmatively. (As I wrote, the problems are occurring consistently in parts of the solution on which I am working but do not occur in all parts. I cannot provide that solution because it belongs to my employer.)

PeteSral commented 3 years ago

I'm experiencing this same situation in a Windows Forms application, targeting .Net Framework 4.0 Looking at the Locals and Autos and Watch, they are empty.

Internal error in the Basic compiler

I'm running:

Microsoft Visual Studio Enterprise 2017 Version 15.9.27 VisualStudio.15.Release/15.9.27+28307.1259 Microsoft .NET Framework Version 4.8.03761

Installed Version: Enterprise

mrmnew commented 9 months ago

This is an old thread, but I am hoping there is a solution found. This just started happening to me recently and I am unsure how to resolve. Has anyone found a resolution?