Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompile uses C# syntax for Visual Basic projects resulting in broken navigation #26669

Closed
davkean opened this issue May 7, 2018 · 7 comments
Labels
Area-IDE Bug Resolution-Duplicate The described behavior is tracked in another issue

Comments

@davkean
Copy link
Member

davkean commented May 7, 2018

Imports System.Windows.Forms

Module Module1
    Private ReadOnly _CF_UNICODE As String = DataFormats.UnicodeText ' <- Decompile this

End Module

Expected: For the file to be decompiled in VB and to navigate to UnicodeText
Actual: The file is in C# syntax and it fails to navigate

Copied from original issue: dotnet/project-system#3519

@sharwell
Copy link
Member

sharwell commented May 7, 2018

Possible duplicate of #25159

@sharwell sharwell added the Bug label May 7, 2018
@sharwell
Copy link
Member

sharwell commented May 7, 2018

📝 The disassembler does not support VB as an output language. When this experimental feature is enabled, the target of a metadata navigation is expected to show disassembled C# code currently. #24349 is a higher-level issue to improve this experience.

@davkean
Copy link
Member Author

davkean commented May 7, 2018

Even if it was C#, I would still expect navigation to work, which it does not.

@CyrusNajmabadi
Copy link
Member

What i'm not quite understanding is why we're creating a VB project to put this decompiled C# file into. Why not create a C# project instead? Then things should work properly.

@CyrusNajmabadi
Copy link
Member

Here's an example of the problem:

image

A VB project for System.Runtime was created, but all the code is C#, so literally all IDE features are completely broken. Basic classification isn't even there. I can totally understand not supporting decompilation into VB since we just don't have that. But given that constraint, we should not be generating a VB project and placing the code into that.

@CyrusNajmabadi
Copy link
Member

Looks like a dupe of #26329

@sharwell
Copy link
Member

Duplicate of #26329

@sharwell sharwell marked this as a duplicate of #26329 May 19, 2018
@sharwell sharwell added the Resolution-Duplicate The described behavior is tracked in another issue label May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

4 participants