C
C#4mo ago
ShevaKadu

Visual Studio has dementia

I was working on a WPF project, then I closed Visual Studio. When I opened Visual Studio again, it showed me 10 incorrect errors, which all were The name ... does not exist in the current context.. This happened by itself, I did not break anything. Trying to build with the code-behind tabs open fails but works if I close them.
7 Replies
Jimmacle
Jimmacle4mo ago
$vsdrunk
MODiX
MODiX4mo ago
* close VS * remove the hidden folder .vs * remove all bin and obj folder next to each csproj (DO NOT TOUCH THE .git FOLDER OR WHAT'S INSIDE) * restart vs
The Fog from Human Resources
i love the title
Kyr
Kyr4mo ago
Me too. I see stuff like this too often at work and is why I bought myself Jetbrains rider
SuperChlorus
SuperChlorus4mo ago
Happens on WinUI3 as well
ShevaKadu
ShevaKaduOP4mo ago
oh thanks! why does this work?
Jimmacle
Jimmacle4mo ago
¯\_(ツ)_/¯ sometimes there are things cached in those folders that can make VS do weird things
Want results from more Discord servers?
Add your server