c# – Fix bunch of same compilation errors in Visual Studio


I was wondering if there was a way to fix all same compilation errors we can encounter in a C# project in Visual Studio. For example, I am currently encountering hundreds of the following errors (following a change):

CS0260 Missing partial modifier on declaration of type ‘MYClass’; another partial declaration of this type exists

I need now to have all those classes partial.
So instead of manually adding all partials in each one of them myself, maybe Visual Studio could propose a feature to do it all at once?

I tried to create my own Python script to apply those changes, but inner classes, namespaces, etc., made it very difficult to create a reliable one.

Leave a Reply

Your email address will not be published. Required fields are marked *