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

Convert to C# does not appear on context menu #1143

Open
BillClarkEarthPoint opened this issue Oct 23, 2024 · 2 comments
Open

Convert to C# does not appear on context menu #1143

BillClarkEarthPoint opened this issue Oct 23, 2024 · 2 comments

Comments

@BillClarkEarthPoint
Copy link

Steps to reproduce

  1. Right click any vb file in Solution Explorer
  2. "Convert to C#" does not appear on the context menu. The last item on the menu is "Rename"
    • OR -
  3. Drag the mouse to select any code within a vb file.
  4. Right click on the selected code.
  5. "Convert to C#" does not appear on the context menu. The last item on the menu is "Outlining"
    • NOTE -
  6. Visual Studio was closed for installation.
  7. Computer has since been rebooted, but the problem remains.

Error message shown

  • Follow the steps on the wiki - where do things go wrong?
  • Copy and paste any error messages / relevant text and/or screenshot the incorrect behaviour.

None. "Convert to C#" is not listed on context menus, so process is never started.

If there's no error message, try the Visual Studio Activity log:

Run Visual Studio with the /Log command line switch to write ActivityLog.xml to disk during your session.
After closing Visual Studio, find the activity log in the subfolder for Visual Studio data:
%AppData%\Microsoft\VisualStudio<version>\ActivityLog.xml.

Not applicable.

Details

  • Product in use: e.g. icsharpcode.github.io/CodeConverter / VS extension / both
  • Version in use: e.g. 5.6.3 or a commit hash (if it's a 3rd party tool using this library, try one of the above)
  • Did you see it working in a previous version, which?
  • Any other relevant information to the issue, or your interest in contributing a fix.

This is my first time trying CodeConverter

According to the Visual Studio "Extension Manager" version 9.2.6.0 is installed.

According to Visual Studio "Help"
Visual Studio Version is

Microsoft Visual Studio Professional 2022
Version 17.11.5
VisualStudio.17.Release/17.11.5+35327.3
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Professional

@GrahamTheCoder
Copy link
Member

The main thing that jumps to mind is that you might be using a "website" project, which doesn't have a vbproj file and hence can't trigger the extension.
If that's the case, just create a vbproj that contains all the relevant files (that compiles) and use that during the conversion

@BillClarkEarthPoint
Copy link
Author

BillClarkEarthPoint commented Oct 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants