Please do not change the ordering of attributes or elements in the sonartlint.xml and ruleset files

Computer generated files should always use an established sorting order. This covers the aforementioned files and is important to prevent users from having to deal with source control churn like this…

This usually happens when someone feels the need to “clean up” a class file and do something like sort properties alphabetically but can happen due to serializer changes. Either way I have to deal with someone being “clumsy” and not testing for this behavior.

Our serialization code hasn’t changed in several years.

However, this ancient thread suggests the XmlSerializer behaves differently in x86 and x64, and five minutes of experimentation confirms that this is in fact the case. Based on that, I’d expect the attribute ordering to be different between VS2019 and VS2022.

The worst-case scenario would be have a development team that is using a mixture of VS2019 and VS2022 on the same Connected Mode solution.

2 Likes