views:

256

answers:

1

I'm working on a project that uses the testing tool built into VS 2008.

Periodically I will see an error comparable to: Value of type 'AcademyPro.Code.BLL.Appearance' cannot be converted to 'AcademyPro.Code.BLL.Appearance'. Type mismatch could be due to the mixing of a file reference with a project reference to assembly 'AcademyPro'. Try replacing the file reference to 'academypro.dll' in project 'AcademyPro' with a project reference to 'AcademyPro'.

Now, on one level the error is correct, there is a project reference (required for the code to compile) and a file reference (in a file called AcademyPro.accessor)

If I remove either of these references then the test project fails to compile. I have tried removing both references, cleaning the build and adding them back in. this doesn't seem to help.

It seems I'm in a lose lose situaltion, I need the project reference to compile and I need the accessor reference so that the private object accessors are built, which I need to be able to compile.

What do I need to do to get this compiling again?

+1  A: 

After much digging around I discovered that the project I was trying to test (not the unit test project) has a project reference to itself. I don't know why or how it would have a reference to itself, but it did. I removed this reference and now everything compiles properly.

ilivewithian