Assembly loading error "manifest definition... does not match assembly reference"

G

Gary McGill

I have a C# solution with a dozen or so projects. There are references
between the projects, and these were all added as "Project" references.

Everything's been working fine for months, but suddenly today it all
collapsed in a heap. I get a mysterious error when running the project:

"The located assembly's manifest definition with name '<MyClass>' does
not match the assembly reference"

Using the fuslogvw tool I can see that the system is trying to load a
version of 'MyClass' that's not the latest version. However, I don't know
why this should be. I can't actually find any references to that version in
any of the source files, even if I do a find-in-files.

I've tried rebuilding the whole project, re-adding references, etc. but
nothing seems to help. My project is kaput!

Any ideas? Please? Not only how to fix it, but why it suddenly happened in
the first place...!
 
P

Phil Wilson

You might have assemblyversion values of 1.0.*, and they all change every
time you rebuild. You reference one version, then compile it and it changes,
making it not match the original client reference. You might also have some
older assemblies in the GAC that are being discovered instead of the newer
ones (next to your client programs?)
 
G

Gary McGill

I do indeed use 1.0.* but then I've been using that for months without any
problems at all. In any case, I thought that since I'd used project
references, the references would be updated each time I built the solution?

There's definitely nothing in the GAC - I did a search over my entire hard
disk, and the only old versions I found were in the setup project. I did an
"update dependencies" and a rebuild on that to no effect.

Eventually, I rebooted my machine. That seemed to fix it, but it doesn't
exactly fill me with confidence...


Phil Wilson said:
You might have assemblyversion values of 1.0.*, and they all change every
time you rebuild. You reference one version, then compile it and it
changes, making it not match the original client reference. You might
also have some older assemblies in the GAC that are being discovered
instead of the newer ones (next to your client programs?)
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Gary McGill said:
I have a C# solution with a dozen or so projects. There are references
between the projects, and these were all added as "Project" references.

Everything's been working fine for months, but suddenly today it all
collapsed in a heap. I get a mysterious error when running the project:

"The located assembly's manifest definition with name '<MyClass>' does
not match the assembly reference"

Using the fuslogvw tool I can see that the system is trying to load a
version of 'MyClass' that's not the latest version. However, I don't know
why this should be. I can't actually find any references to that version
in any of the source files, even if I do a find-in-files.

I've tried rebuilding the whole project, re-adding references, etc. but
nothing seems to help. My project is kaput!

Any ideas? Please? Not only how to fix it, but why it suddenly happened
in the first place...!
 
G

Gary McGill

AAAaaaaargh!!! Although it appeared to be fixed when running my service exe,
I now find that my COM add-ins no longer get loaded when I start Excel or
PowerPoint (although Word seems to work).

fuslogvw.exe again shows that it's trying to load an old version.

Is there no end to this?

Gary McGill said:
I do indeed use 1.0.* but then I've been using that for months without any
problems at all. In any case, I thought that since I'd used project
references, the references would be updated each time I built the solution?

There's definitely nothing in the GAC - I did a search over my entire hard
disk, and the only old versions I found were in the setup project. I did
an "update dependencies" and a rebuild on that to no effect.

Eventually, I rebooted my machine. That seemed to fix it, but it doesn't
exactly fill me with confidence...


Phil Wilson said:
You might have assemblyversion values of 1.0.*, and they all change every
time you rebuild. You reference one version, then compile it and it
changes, making it not match the original client reference. You might
also have some older assemblies in the GAC that are being discovered
instead of the newer ones (next to your client programs?)
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Gary McGill said:
I have a C# solution with a dozen or so projects. There are references
between the projects, and these were all added as "Project" references.

Everything's been working fine for months, but suddenly today it all
collapsed in a heap. I get a mysterious error when running the project:

"The located assembly's manifest definition with name '<MyClass>'
does not match the assembly reference"

Using the fuslogvw tool I can see that the system is trying to load a
version of 'MyClass' that's not the latest version. However, I don't
know why this should be. I can't actually find any references to that
version in any of the source files, even if I do a find-in-files.

I've tried rebuilding the whole project, re-adding references, etc. but
nothing seems to help. My project is kaput!

Any ideas? Please? Not only how to fix it, but why it suddenly happened
in the first place...!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top