codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

Code Cleanup not working in ASPX files

Open y2jhotaru opened this issue 4 years ago • 2 comments

Environment

  • Visual Studio version: [2022 Enterprise]
  • CodeMaid version: [example 17.0.1]
  • Code language: [example ASP.NET]

Description

When you use "Cleanup active document" option in an ASPX file within a Webforms Project, it does nothing and gives no error. If you try the same option within the .cs file, it works normally.

Steps to recreate

  1. Create a new WebForms Project (I used .NET 4.8 as runtime)
  2. Edit Default.aspx file
  3. Make some changes in the file which should be fixed with Codemaid
  4. Use "Cleanup active document" either by keyboard shorcut or context menu.
  5. Try the same procedure in the associated C# file.

Current behavior

The ASPX file is not cleaned up and it gives no error. However, the same procedure in the C# file works as expected.

Expected behavior

The ASPX file should be cleaned as it does with c# files. (VS2019 doesn't have this issue)

y2jhotaru avatar Nov 18 '21 22:11 y2jhotaru

Thanks for reporting the issue. The really clear steps and comparison with VS2019 made it easier for me to reproduce the issue. It looks like the VS2022 API is now returning a different language value for .aspx files. Previously it was reported as HTML but now there's a specific WebForms option. This is an easy fix and it will be present in the next release.

If you want to try the CI build it will be available at https://www.vsixgallery.com/extension/9079e73d-3fbb-4e07-8dab-f44fa5d8e8b5 shortly.

codecadwallader avatar Nov 19 '21 13:11 codecadwallader