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 Reorganize and Regions #298

Acronda opened this Issue May 23, 2016 · 2 comments


None yet
2 participants

Acronda commented May 23, 2016


  • Visual Studio version: Visual Studio Enterprise 2015 - Update 2
  • CodeMaid version: 10.1
  • Code language: VB.NET


When reorganizing code (for the Active Document) and you have set an option for Reorganizing > Regions the code will generate C# regions instead of VB regions.

Steps to recreate

  1. Make sure the option Regions > Include access level in regions is checked, Insert new regions, Remove exising regions
  2. Open a .vb document
  3. Select Reogainze Active document from the code maid menu

Current behavior

The created regions have the C# syntax insead of the VB.NET syntax. One of the classes that should be modified is codemaid / CodeMaid / Logic / Reorganizing / GenerateRegionLogic.cs a check on the code type should be made and the code should be generated as accordingly.

Expected behavior

Regions in VB.NET are defined as follows:

Region "name of region"

End Region

End region cannot be named.


This comment has been minimized.


codecadwallader commented May 25, 2016

Thank you for reporting the issue, I have reproduced it. We recently enabled support for VB reorganization, but we did not intend to enable region support for VB as that would require updates in a handful of other areas as well. At a minimum we should make sure that region logic is bypassed during reorganization for VB.


This comment has been minimized.


codecadwallader commented Dec 10, 2016

I've made several updates to more fully provide region support for VB. This should resolve your original issue as well as a few others related to VB region support.

The CI channel where we normally test is currently being upgraded for VS2017 support, but this will be present in the next release.

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