codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

VS2022 cleanup fails in csproj files - null reference exception

Open internayt opened this issue 3 years ago • 5 comments

Environment

  • Visual Studio version: 2022 Pro (and 2019 Pro)
  • CodeMaid version: 12.0
  • Code language: c#

Description

Attempt to run a cleanup on a csproj file, get the error: Object reference not set to an instance of an object.

Steps to recreate

1 - Open any csproj file 2 - Run cleanup

Current behavior

Shows an error

Expected behavior

Should reformat the XML

FYI - this used to work in VS2019 with v11.2

internayt avatar Nov 12 '21 17:11 internayt

I have same error.

pierrebrito avatar Nov 12 '21 18:11 pierrebrito

Thanks for reporting the issue. I am able to reproduce it. Once I attached a debugger though to diagnose it then it started working correctly.

codecadwallader avatar Nov 16 '21 13:11 codecadwallader

I get the same thing, but only with "Cleanup Open Code". "All Code" and "Active Document" work fine.

Environment: Windows 11 build 22000.376 Visual Studio Professional 2022 (v17.0.4) CodeMaid 12.0

AlastairBateman avatar Dec 26 '21 20:12 AlastairBateman

I'm getting the same thing, also with only "Clueanup Open Code".

Environment: Windows 11 22H2 (OS Build 22621.2134) Visual Studio Professional 2022 (v17.7.1) CodeMaid 12.0

Edit: Typo

RedBeardDotDev avatar Aug 18 '23 19:08 RedBeardDotDev

I have the same issue, with every type of cleaning. I'm using Visual Studio Enterprise 2022 version 17.7.4.

dprevato avatar Sep 23 '23 14:09 dprevato