Description
"SA1649: File name must match first type name." fix "Rename file to match first type name" will delete and add new file instead of just renaming the file which breaks TFS version control server file history.
Test.cs
namespace TestApp
{
public class MyTest // SA1649: File name must match first type name.
{
}
}
Produces warning "SA1649: File name must match first type name." as expected.
However, if I let DotNetAnalyzers fix this by selecting "Rename file to match first type name" from the list of potential fixes, Test.cs
shows up as deleted and MyTest.cs
shows up as added in Visual Studio's "Pending Changes" window.
In contrast, if I just manually rename the file in the "Solution Explorer" window, the file shows up as rename in Visual Studio's "Pending Changes" window.
If I go ahead and check in the changes performed by DotNetAnalyzers, then I cannot view the history on the new file in TFS; whereas the history is maintained if I check in the changes performed when manually renaming the file.
Visual Studio 2015 Update 3
DotNetAnalyzers 1.0.0
TFS 2015 Update 3
Thank you.