visual studio converted vb to c# by itself?

37 Views Asked by At

I was testing a visual studio extension that I wrote in Visual Studio 2022. ALL my code is in vb.net for this project and always has been.

While running it in debug mode, the vs app instance hit a bug, crashed, then took me back to my vs IDE, in which I had the file open that I had changed (call it "MySpecialTools.vb"). Suddenly, a second tab opens in VS, showing me a file named "MySpecialTools.cs" and has highlights where the bug happened. Perplexed, I copied/pasted this file into a text file on my desktop.

As I examined this .cs file, I was surprised to see that it was a copy of "MySpecialTools.vb", but converted into C-Sharp. I checked every folder in my project and could find no instance of this CS file. It appears as though the bug/crash of my running vs add-in, instead of showing me the error in my .vb file, somehow created a CS version of my file!

I've never encountered anything like this, and I know for certain that I did not create the CS file myself. I scrutinized it side-by-side with my .vb code file and it appears to be a complete conversion of that file! The only difference is that it appears that my comments/remarks have been removed along with any line spacing I had made to make my code more readable. It is as though the running executable crashed and the debugger 'decompiled' into the wrong language?

Is this possible?

0

There are 0 best solutions below