I was working on a project, and I usually before doing anything I create new branches.
In my feature branch, Visual Studio wasn't showing any errors. It was doing all good.
Well, I switched from my feature branch to my develop branch and it shows me errors when it didn't before.
But there are no errors, since I build the solution and it succeeds. It runs perfectly.
First time this actually happens to me. :/
You can change this behavior by going to Tools -> Options -> Projects and Solutions -> General and deselecting the "Always show Error List if build finishes with errors".
Tools > Options > Projects and Solutions > Build and RunThe selection in the second dropdown “On Run, when build or deployment errors occur”, even if the code has the error during the run, project runs with the last successful build.
To display the Error List, choose View > Error List, or press Ctrl+\+E.
It's because VS uses for editor other implementation then while building, and sometimes it fails to follow files modification. Sometimes it helps to reopen the solution, sometimes you should close the solution, remove cache files (they should be a file or subdirectory next to the solution file) and reopen the solution.
This happened to me when the .NET Framework for the referenced project was higher than the referencing project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With