[object Object]

There are many reasons why this error will appear. One of the less obvious reasons has to do with the “Target framework” project level setting.

In my referenced project the “Target framework” was set to “.NET Framework 4”

And in the referencing project the “Target framework” was set to “.NET Framework 4 Client Profile”

And I got the build error:

Error 2 The type or namespace name ‘TFSCommon’ could not be found (are you missing a using directive or an assembly reference?) C:_work\Dev\TFSCode\QueryTextViewer\Program.cs 8 11 QueryTextViewer

These target frameworks need to match. So just set your referencing project to the same “Target framework” and the build error will be resolved.

Jon

Share