C
C#3mo 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
Jimmacle3mo ago
$vsdrunk
MODiX
MODiX3mo 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
Kyr3mo ago
Me too. I see stuff like this too often at work and is why I bought myself Jetbrains rider
SuperChlorus
SuperChlorus3mo ago
Happens on WinUI3 as well
ShevaKadu
ShevaKadu3mo ago
oh thanks! why does this work?
Jimmacle
Jimmacle3mo 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