I\'m getting a:
type or namespace name could not be found
error for a C# WPF app in VS2010. This area of code was compiling fine
Reinstalling nuget packages did the trick for me. After I changed .NET Framework versions to be in sync for all projects, some of the nuget packages (especially Entity Framework) were still installed for previous versions. This command in Packages Manager Console reinstalls packages for the whole solution:
Update-Package –reinstall