Closed damirarh closed 4 months ago
It is necesary to write to the project file. If you do not like this functionality you can create your own runsettings file or do not use ms code coverage if that is suitable.
I'm perfectly fine with this functionality. My only issue are the conflicts which happen if I have the project file accidentally open when running the tests. It took me a while to figure out what was causing the conflicts all of a sudden and how to prevent them. Now that I know, it's more or less a non-issue for me. I still prefer MS Coverage to the old style which comes with its own set of potential issues.
I was hoping the conflicts were caused by some kind of race condition with the editor window, causing it to think that it contains unsaved changes. And could therefore be circumvented. If not, it might be a good idea to document the behavior in a troubleshooting section. It's likely that others will encounter it as well.
I will add to the readme that FCC writes to the project file and mention the warning you encountered. Although I do not get any warning when running tests with the test project file open.
Updated readme.
Installed product versions
Description
With MsCodeCoverage enabled, the extension causes VS to generate backup copies of
.csproj
file because of conflicts if that project file is opened in the editor window.Steps to recreate
.csproj
file of the project in the editor window.Current behavior
During the second test run VS show a warning because of a conflict in the project file and creates a backup file in the folder.![image](https://github.com/FortuneN/FineCodeCoverage/assets/1292060/7cc0fce5-586a-40f1-bd7c-24eeb27b8fec)
Expected behavior
The extension should work as it does when the
.csproj
file is not open in the editor window, i.e. no conflicts in the project file should happen.Side Notes
Link to a repository with the code used in the screen recording above: https://github.com/DamirsCorner/20240322-dotnet-extension-method
Contents of the Output window for FCC for the screen recording above: FCC.log