A reference "to that project" could not be added

Standard

As part of my research into doing test driven development on the Windows Mobile platform, I tried to create a “smart device” project level reference.

(See the post Unit Testing Smart Device Projects for more information about using Microsoft Test and unit testing on Windows Mobile)

As I haven’t found the information anywhere else, I thought I’d post my problem and the solution:

The Problem

When my test project was in Visual Basic, I got this brutal error message:

A reference to xxxxxxxxx could not be added:

image

A CSharp test project did manage to get to add the reference, but only after getting this message:

image

Does this mean I’ve finally found something CSharp can do better than VB.Net?  Surely not!

The Solution

After a great deal of messing around, I tried using the Microsoft Test Test Wizard to create the Visual Basic test project.  This worked.  The reason this worked was that it took a file reference instead.

So there’s your workaround.  Use a file reference.

Advertisements

3 responses »

  1. I had the same problem.
    The mobile project was using framework 2.0 and the class library project was using framework 1.0.
    When i converted class library project to framework 2.0, it worked good.

    Regards,
    NaN

  2. Thanks! I have found the information somewhere thanks to you! Now i’ve just set the reference to the dll, and it works like a charm…

  3. Wow seems like it would be a no brainer to re-word that error message. Thanks. This was the same problem i was having. Target frameworks were not the same.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s