Skip to content

VB->C# removing invalid Imports #1176

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

Open
wizzardmr42 opened this issue Apr 2, 2025 · 1 comment
Open

VB->C# removing invalid Imports #1176

wizzardmr42 opened this issue Apr 2, 2025 · 1 comment

Comments

@wizzardmr42
Copy link

Is your feature request related to a problem? Please describe.
VB ignores Imports statements which are invalid, but C# treats them as a compiler error. Old projects can have a lot of these cluttering up files from references that have been removed.

Describe the solution you'd like
An option for the CodeConverter to remove these or comment them out.

Describe alternatives you've considered
Search and replace, but that's an extra step.

Additional context
n/a

@GrahamTheCoder
Copy link
Member

This may be possible, either by scanning for names pace existence (being careful of casing), or by using the compiler diagnostics after conversion (but this runs the risks of issues earlier in the process snowballing).

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

No branches or pull requests

2 participants