DotNetAnalyzers / StyleCopAnalyzers

An implementation of StyleCop rules using the .NET Compiler Platform
MIT License
2.65k stars 508 forks source link

CodeFix for SA1412 (StoreFilesAsUtf8) deletes other important auto-generated files in Visual Studio (e.g. Entity Framework migrations) #1647

Open NikolayIT opened 8 years ago

NikolayIT commented 8 years ago

When I use the code fix for SA1412 (StoreFilesAsUtf8) in any of the Entity Framework migration files (which by default are created with my system's default encoding but that is another topic)

SA1412

the auto-generated sub-files (which are important for the proper EF migrations work) are being deleted:

Deleted files TortoiseGit

sharwell commented 8 years ago

This sounds related to #1168, but I'm not sure it's a duplicate. It's part of the reason we've disabled this rule by default for the time being.

sharwell commented 8 years ago

Blocked on dotnet/roslyn#4767.