3 min read. This article will explain how to fix an annoying situation, where Visual Studio fails to find any System types or other “basic” stuff you’re pretty sure your project should have, automagically, out-of-the-box, without you doing anything. Stuff that comes with .NET. Stuff that should just work.But life isn’t always that simple.Problem & BackgroundTable of ContentsToggleProblem & BackgroundReasonSolution1. Clean and rebuild2. Restart Visual Studio (possibly as an administrator)3. Remove bin & obj folders manuallySo I recently had a Windows Update brick my machine, and after reinstalling I was missing, well, practically everything. Setting up a dev environment for a customer project is usually a matter of a couple of minutes, but sometimes stuff goes sideways.This was one such time. After configuring some debugging environment stuff, installing the right SDK, downloading about 600 megabytes worth of npm packages and hitting F5, I ran into… Well, I ran into whatever in tarnation this is supposed to be:Yes. On build, suddenly absolutely everything was broken. Almost every single line of code in my solution was suddenly underlined with annoying red squiggly lines.What gives?ReasonWho knows what actually went wrong and why? Probably a couple of things could cause something like this, really, but in my case, it turned out to be simple.Long story short, something was holding on to a file in the bin folder and silently failing to build, so that Visual Studio ended up not having the symbols files it needed.SolutionI’ve found a couple of options on how to fix this. Starting with the least intrusive and moving on to the trickier ones. The last one worked for me this time, but I’ve run into the issue before and sometimes other stuff helps – so I’ll have them listed here.1. Clean and rebuildBoring, I know. But sometimes it works. And it’s really quick to do nowadays, so start with this.2. Restart Visual Studio (possibly as an administrator)So many issues with Visual Studio can be solved by restarting the application. This might be even more boring than the clean & rebuild option, but hey, if it helps…And maybe throw in some admin rights for good measure. Sometimes that solves the file access issues. Annoying, but it is what it is.Note, that this might not be what you want. But consider giving it a go, if you trust the code and dependencies you’re going to run.3. Remove bin & obj folders manuallySometimes it does finally have to come to this. There’s a file deep within your bin folder (probably) that’s locked by something, and your app can’t actually read that file, and that’s silently failing your build and creating/fetching/updating whatever symbols files Intellisense in Visual Studio needs to properly understand your code or build it at all.You could just try to remove the folders (after shutting Visual Studio down), but that is unlikely to work. You’ll probably have to first remove a readonly flag from the folders themselves, and then drill down and remove subfolders one-by-one.Or maybe you won’t, but that’s how it went for me. Would’ve possibly been faster with PowerShell (recursively deleting files and folders starts from the “leaves” of the directory tree – i.e. at the deepest level), but it took about a minute through the UI, so… That’s what I did.Here’s the PowerShell script for your reference, though:Remove-Item -Path "C:\code\myrepo\bin*" -Recurse -ForceRemove-Item -Path "C:\code\myrepo\obj*" -Recurse -ForceIf you want to perform a “dry run”, replace “-force” with “-whatif”That’s it for today! Hope it helps :)