The type or namespace name ‘xxxx’ does not exist in the namespace ‘yyyy’ (are you missing an assembly reference?)

If you suddenly find your Visual Studio solution falling to pieces with loads of error messages like the title above when you build. You also know that the project libraries are being referenced correctly and they build OK. Then check that you do not have an uninvited app.config file lurking at the root of any of your projects.

I have spent lots of annoying wasted hours trying to figure this out only to have found that a NuGet installation has added an app.config to the projects.

Delete this and do a rebuild and all should be OK.

The moral of this story is make sure you build and check-in before adding any NuGet packages. Then immediately rebuild after. If this scenario occurs, you know what to do.

One thought on “The type or namespace name ‘xxxx’ does not exist in the namespace ‘yyyy’ (are you missing an assembly reference?)

Leave a Reply