Reputation: 17806
I have seen many questions similar to this, but they all seem to have the problem originating in differences of version or target framework, the problem I have currently is based on rebuilding the same dll with the same version and replacing the runtime with MEF. Complete sample available here (shadow copy is enabled)
The problem is as follows:
then you get this exception.
Any ideas? I m trying to understand the source of the problem
Upvotes: 1
Views: 144
Reputation: 10537
You're going to have to use multiple AppDomains
.
You can't load two assemblies that have the same name. So you will have to unload the original. However, you can't unload an assembly!
You can unload an AppDomain
. So you will load everything you need into a new AppDomain
and then unload it when you want unload the assembly.
Upvotes: 2