codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.88k stars 353 forks source link

Assembly attribute causes codemaid to enter infinite loop of saves. #955

Closed CaidenKehrer closed 1 year ago

CaidenKehrer commented 1 year ago

Environment

Description

Codemaid doesn't allow users to save when in the cleanup on save mode with the assembly attribute in a file.

Steps to recreate

  1. Create a new c# file

  2. Add the following code to the top of the file [assembly: InternalsVisibleTo("VMTests")]

  3. set code maid to cleanup on save

  4. save file

Current behavior

It saves and then makes changes and this makes the file have to save again which then makes changes, and this repeats forever.

Expected behavior

It should be saving the file making the changes and then saving if there are new changes. It should not repeat the same changes.

codecadwallader commented 1 year ago

Thanks for reporting the issue. I am unable to reproduce it. There have been some fixes in the latest version of Visual Studio that may be related to this bug. Can you upgrade to the latest Visual Studio version and see if the issue is still occurring?