views:

346

answers:

1

I'm loading an assembly with LoadWithPartialName(), but VS tells me that it's obsolete and to use Load() instead. However, I can't find any convenient overload.

There is a Load(string) with asks for a "full-name" which, if I understood correctly the MSDN docs, includes things like the version number.

There is also a Load (string, Evidence) which accepts a "Display name". The problem is I don't have the slightest idea what the "Display Name" is, as the "Partial Name" I was using with the first function doesn't seem to work.

So, how should it be done?

+1  A: 

The following article explains why it's obsolete: http://blogs.msdn.com/suzcook/archive/2003/05/30/57159.aspx.

Bottom line is: use Load and give it the version number.

Clangon
Thanks.But I'm developing a plugin system with a defined interface which should never, ever change. It seems right for it to use the last version available without nobody having to worry about it. Indeed, one of the commenters of your link seems to be in the same situation. This change will force the user to tell the app which version to use, which doesn't seem reasonable to me. To avoid this, I would have to usie always the same version number, which seems like a hell on its own.
Jaime Pardos