A value of type '<typename>' cannot be converted to <typename>

I am working on a project that uses a testing tool built into VS 2008.

Periodically, I see an error comparable to: A value like "AcademyPro.Code.BLL.Appearance" cannot be converted to "AcademyPro.Code.BLL.Appearance". The type mismatch may be due to the confusion of the file link with the link to the project for the Academy assembly. Try replacing the link to the "academypro.dll" file in the "Academy" project with a link to the "Academy" project.

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

If I delete one of these links, the test project will not compile. I tried to remove both links, clean the assembly and add them back. This does not seem to help.

It seems that I am losing the original situation, I need a link to the project for compilation, and I need a link for access so that private accessors of objects that I need to compile are created.

What do I need to do to compile this again?

+3
source share
2 answers

After many searches, I found that the project I was trying to check (and not the unit test project) has a link to the project for myself. I do not know why and how he will refer to himself, but it is. I deleted this link and now everything compiles correctly.

+1

, , , , , . ( Google)

+1

Source: https://habr.com/ru/post/1708569/


All Articles