-
Notifications
You must be signed in to change notification settings - Fork 222
Home
GrahamTheCoder edited this page Mar 6, 2019
·
28 revisions
Before performing any conversion, it's recommended to ensure you have no uncommitted changes in your version control system. This will make it easy to see the result of the conversion, and discard any parts you don't want. Ensure your solution compiles for maximum conversion accuracy.
- Install the Visual Studio Extension in VS 2017 15.9.3 or above
- Open your solution in Visual Studio
- Right click the solution or project node to convert in the solution explorer and select "Convert to VB" or "Convert to C#".
- The Output window will show progress - it may seem to pause for several minutes at times on large projects.
- At the end of the process you'll be given the choice to automatically update any references (from non-converted projects and the solution) to reference the now converted projects. Cancelling the process at this point will leave all original files intact, and converted projects/files on disk to be manually inspected.
- When the conversion finishes, the Output window will show a summary of the conversion's success, and one of the converted files will be opened as an example.
- Right click the .vb or .cs file to convert in the solution explorer and select "Convert to VB" or "Convert to C#".
- The Output window will show progress - it may seem to pause for several minutes since related projects must be compiled.
- When the conversion finishes, the Output window will show a summary of the conversion's success.
- The converted file will be saved to disk adjacent to the original file (but with the appropriate converted file extension), and opened in a code window. It won't be part of any project or solution.
- Open a .vb or .cs file containing code to be converted.
- Highlight the relevant text.
- Right click on the highlighted text and select "Convert to VB" or "Convert to C#".
- The Output window will show progress - it may seem to pause for several minutes since related projects must be compiled.
- When the conversion finishes, the Output window will show a summary of the conversion's success.
- The converted snippet will be saved to disk adjacent to the original file (but with the appropriate converted file extension), and opened in a code window. It won't be part of any project or solution.
Alternatively you can use the online snippet converter: https://codeconverter.icsharpcode.net/ However, it is less accurate due to the lack of project context.
- Files outside the solution directory will not be converted