The type or namespace could not be found aka corrupt nuget packages
The type or namespace could not be found error when you have changed litterally nothing
Normally a sign of a corrupt package, sometimes if you look under dependencies -> nuget -> {project name} you will see the project installed by there will not be a dll at the bottom of the folder.
Fix
- Remove the package under dependencies -> nuget -> {project name}
- Remove it's folder from %UserProfile%\.nuget\packages
- Install the package again
- Build
Could also try clear nuget packages via Tools -> NuGet Package Manager -> Package Manager Settings -> Clear All Nuget Cache(s) but this didn't seem to work for me.