icsharpcode / ilspy-vscode

ILSpy Visual Studio Code Extension and Service for Decompiling .NET Assemblies
MIT License
148 stars 30 forks source link

can i choice the c# version to see the compiler code for old version of c#? #420

Closed ahmeteid7 closed 4 months ago

ahmeteid7 commented 5 months ago

in desktop version i can display the compiler code in any version of c#, how i can do that in the extension version

Rpinski commented 4 months ago

Just click the "Output:" item in status bar when viewing decompiled code:

image

or use the "ILSpy: Output language" command in VSCode command palette. Then you will be presented a list of C# versions to choose one for the output:

image

ahmeteid7 commented 4 months ago

I'm using linux(zorin lite 16 xfce), i have dotnet 6,7,8, the output can't list the c# version,also i can't found that command:ILSpy: Output language image image

Rpinski commented 4 months ago

These options are only available when your active editor is an ILSpy decompilation result (you seem to have open a normal code editor with C# code, instead). There is another alternative: You may set the output language in VSCode settings:

ILSpy Output Language

ahmeteid7 commented 4 months ago

Thank u very much ,it's worked with me