When "Format on Save" is enabled in a Blazor project, CodeRush consistently and arbitrarily adds multiple unpaired #endregion tags to the document. This forces me to stop my work, locate the tags, and delete them. I have been forced to turn off this feature. I love this feature, but I cannot get it to work. Can you provide assistance?
Code Cleanup - Compilation error occurs because of an unpaired #endregion directive added at the end of the file
Answers approved by DevExpress Support
We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.
Important Notes:
- Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
- .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
- v23.2.3Download Official Update
Ron,
Please share your CodeRush settings. Open the Extensions->CodeRush->Support->Settings Folder… menu item, zip the entire content, and attach the archive here.
I look forward to hearing from you.
Attached are all of the files from: C:\Users\ron.collette\AppData\Roaming\CodeRush\Settings
I have had to uninstall CodeRush. It was crashing my VS client. I miss the product. I hope you can find a solution.
Ron,
First, thank you for the settings. I will use them to reproduce the #endregion issue.
Regarding the crash - we take it very seriously, but we are unable to address it without your help. Please collect call stacks as described in Collect Call Stack and share them here for investigation.
Additionally, please open the Help->About Microsoft Visual Studio window, click the Copy Info button, and paste the results here. I will check for any conflicts between CodeRush and other Visual Studio extensions.
Thank you for your assistance.
Below are the installed extensions. Taken from the Help->About MS Visual Studio.
Microsoft Visual Studio Community 2022
Version 17.8.0
VisualStudio.17.Release/17.8.0+34309.116
Microsoft .NET Framework
Version 4.8.09032
Installed Version: Community
ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools
ASA Service Provider 1.0
ASP.NET and Web Tools 17.8.352.38654
ASP.NET and Web Tools
Azure App Service Tools v3.0.0 17.8.352.38654
Azure App Service Tools v3.0.0
Azure Data Lake Tools for Visual Studio 2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio
Azure Functions and Web Jobs Tools 17.8.352.38654
Azure Functions and Web Jobs Tools
Azure Stream Analytics Tools for Visual Studio 2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio
C# Tools 4.8.0-7.23558.1+e091728607ca0fc9efca55ccfb3e59259c6b5a0a
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
CodeRush for Roslyn 23.1.5.0
DevExpress CodeRush for Roslyn package.
CodeRush for Roslyn Tool Windows 23.1.5.0
DevExpress CodeRush for Roslyn Tool Windows package.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Extensibility Message Bus 1.4.39 (main@e8108eb)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
Microsoft Azure Hive Query Language Service 2.6.5000.0
Language service for Hive query
Microsoft Azure Stream Analytics Language Service 2.6.5000.0
Language service for Azure Stream Analytics
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Mono Debugging for Visual Studio 17.8.17 (957fbed)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 6.8.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Razor (ASP.NET Core) 17.8.3.2353105+f0a326f3e15b2370371693a76fd379635387c74d
Provides languages services for ASP.NET Core Razor.
SQL Server Data Tools 17.8.119.0
Microsoft SQL Server Data Tools
Supercharger 1.14.0.1745
Extend Visual Studio with CodeMAP, Intelligent Code Flow Lines, Code Highlighters, SuperFind, Rich Code, Magic Comments etc. More info: http://supercharger.tools
ToolWindowHostedEditor 1.0
Hosting json editor into a tool window
TypeScript Tools 17.0.20920.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.8.0-7.23558.1+e091728607ca0fc9efca55ccfb3e59259c6b5a0a
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 17.8.0-beta.23475.2+10f956e631a1efc0f7f5e49c626c494cd32b1f50
Microsoft Visual F# Tools
Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
VSPackage Extension 1.0
VSPackage Visual Studio Extension Detailed Info
Xamarin 17.8.0.155 (d17-8@7042beb)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 17.8.3.6 (remotes/origin/d17-8@eccf46a291)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 13.2.2.0 (d17-5/45b0e14)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: d9a6e87
Java.Interop: xamarin/java.interop/d17-5@149d70fe
SQLite: xamarin/sqlite/3.40.1@68c69d8
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d
Ron,
Thank you for the list of extensions. Supercharger is the only one that can potentially interact with CodeRush. I will install it and see if I can reproduce the issues.
Ron,
I used your settings and managed to reproduce the issue with unwanted #endregion directives. We will fix it. As a workaround, please disable region creation on the Organize Members option page:
Regarding the crash, I created a separate ticket on your behalf: T1202480: CodeRush crashes Visual Studio client. I did it to ease processing of unrelated issues.