How to prevent “There appears to be a discrepancy between the solution's source control…” without changing the .sln file

后端 未结 5 860
伪装坚强ぢ
伪装坚强ぢ 2021-02-02 08:10

Note: I saw "There appears to be a discrepancy between the solution's source control ...." , but this doesn\'t apply, as I wish to fix this without changi

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-02 08:28

    Using Visual Studio you can solve this problem by unbinding and binding the solution and/or projects. Try this:

    1. Open the problem solution in VS (did this in VS2013 just now)
    2. Commit anything you need to commit (let's keep it simple - nothing to merge/checkin)
    3. If there are any pending changes then undo all pending changes to all the projects in that solution and any changes to the solution itself
    4. Go to File -> Source Control -> Advanced -> Change Source Control
    5. Select the problem projects and click "Unbind"
    6. Click OK and close the window (THIS IS IMPORTANT - if you don't click OK VS doesn't update the solution properly)
    7. Go to File -> Source Control -> Advanced -> Change Source Control
    8. Select all the projects you unbound in #5 and click "Bind"
    9. Click OK and close the window
    10. Check in your Solution & Project changes
    11. Close the solution and open it back up and everything should be fine now

提交回复
热议问题