Research .sln git merge error #214
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We currently get a merge error due to conflict in the solution file, sometimes. We need to know why this happens and how to avoid it. Do we need to add the file to the .gitignore or is there another "solution"?
There exists a new solution file-type: slnx, which is xml-based and much lighter than sln. To generate an slnx file you run
dotnet sln migratein the folder with the sln-file. This should hopefully reduce merge conflicts.What is a solution: A solution is a structure for organizing projects in Visual Studio. The solution maintains the state information for projects in two files: .sln (text) and .suo (binary).
The .sln file: Contains information to find and load project data and packages. It is split into three parts; preSolution, project and postSolution.
Why error: It is sensitive to changes. If there are two versions of the same .sln file, it will not work to merge. Could also depend on different VS versions formatting.
Avoidance: Fix by manually merging project entries or regenerating the file. .slnx is also mentioned above, it is a more modern solution to the .sln file that is made to solve the issues from .sln. Requires Visual Studio 2022 17.13 or later, depending on how old this project is, it could cause problems (should be fine though).
.gitignore: Works fine to add the file here for VSCode users, but if anyone uses VS they are screwed since that relies on the .sln file.
As far as I understand it slnx is made for this exact issue (conflicting solution files) and I think that it can be worth a try. We have already tested to remove the solution file to see if we can work without it but VSC will complain, the same will probably happen if a module is missing from the solution file as well, so adding it to the .gitignore will probably not work.
During the weekly merge we will migrate to slnx and see if this fixes our workflow or causes more problems.
The project after the merge now has a .slnx file. If it turns out that this doesn't really work we will create another issue and link that here.