I have two projects A and B. Project A makes use of type X in project B, so I have a reference to B added in A. Everything built fine.
I signed project B using a strong named key file. Everything still built fine.
Then I decided to change the strong named key file for B. I rebuilt project B ok. When I try to build project A I receive the error "Error 1 The type X is defined in an assembly that is not referenced. You must add a reference to assembly B, Version=1.0.0.0, Culture=neutral, PublicKeyToken=95b41b0d6571627b'. "
So I deleted the reference in project A and added it back in again, no joy. I can dbl click on the project B reference in project A, open the object browser and see type X in there ok. I also fully qualified the type X objects in A and the intellisense picked them up fine but it still does not build.
I thought that changing the key file I might need to up the revision, so I changed assembly B version to 2.0.0.0 but still A complains that it needs version 1.0.0.0. Looking at the properties of the B reference in A it definitely points to the correct version and indeed it shows as 2.0.0.0
I could live with using the existing key file but i'd like to understand where I am going wrong if possible.
What worked for me was to remove the reference to the project, then add it back in again. A new error message appeared stating that I needed a reference to a third library that was missing, so the original message was a bit misleading!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With