I kept getting this strange Visual Studio 2010 error every time I tried to build my Windows Service Project;

The type or namespace name ‘??????’ could not be found (are you missing a using directive or an assembly reference?)

Problem is, if i look in my bin folder, it is in there. WTF!

The issue turns out to be related to the projects Target Framework. One creation, mine was set to .NET Framework 4 Client Profile. I soon as I changed it to .NET Framework 4. The project was able to build.

You can check/change this by right-clicking your project (not the solution), select Properties -> Application -> Target framework.

VIsual Studio Target Framework change
VIsual Studio Target Framework change

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.