-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unmerged change from project" after running dotnet format #1634
Comments
I created a new branch to format the project, then run:
I face this problem in multi target project net6, net472 in almost all files like:
Although before and after is the same. I had to undo the changes in these files using git reset.. how to avoid this issue? |
Issue Resolution: Workaround solution |
Hitting this quite a lot myself with net6.0 and net7.0. It would be great if it didn't happen at all, but would be helpful if we could specify a framework to avoid it. |
Is there any progress in this issue or any guideline document to avoid such comments? |
@moh-hassan If you run dotnet-format with the logging set to diagnostic ( |
I run dotnet format with -v diag and inspected the The logs in screen is something like:
The logs did not show if there is any confliction that may cause the It is nice if the log show these |
When starting with a piece of code like this where I purposely set the if condition all in one line:
After running dotnet format I get the following:
I seem to be able to reproduce this reliable from this repo of mine. The file I changed and mention in this example was this one: OptionsBuilderExtensions.cs.
The project where this happens targets multiple frameworks:
netcoreapp3.1;net5.0;net6.0
.The
dotnet format
command my GitHub workflow is running looks like the following:This seems related with #1574 .
Hopefully this provides enough information to be able to replicate the issue. Let me know if you need more info.
The text was updated successfully, but these errors were encountered: