One of the very few example where you just can't search MSDN or Google or MSN and hope to find the answer. For me it was the following exception when calling
Assembly.Load(aseemblyName, evidence);
System.IO.FileLoadException occurred
Message="Could not load file or assembly AssemblyName, Version=1.1.0.0' or one of its dependencies. Cannot specify assembly evidence under MultiDomain after non-GAC assemblies with default evidence have been loaded in appdomain. (Exception from HRESULT: 0x8013101D)"
Source="mscorlib"
FileName="AssemblyName, Version=1.1.0.0"
FusionLog=""
StackTrace:
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
at Microsoft.InformationBridge.Framework.ExecutionEngine.Utility.LoadAssembly(AssemblyName assemblyName)
Now after spending lots of time with installting uninstalling several things with no result. I decided to go into the details. After reading the exception message once again it was all clear. Clearly some Non-Gac assembly was loaded in my host application (in my case it was outlook) with the default evidences. So all I need to do was to look for such assemblies not loading from gac. Fortuanately it was only one for me and I knew it was some addin which was quite useful for us. With a little hope I disabled it and restart outlook. Wow it worked now with no exception.
Lession: If you encounter above exception just check which idiot extensions are enabled which are preventing you from loading your assemblies (.Net ones) and disable them.(Of course this is just a workaround but if you dont have any other way till then....)
If you find out the solution to this problem please let me know.
Finally 8th August 2005 I joined the place I dreamed about. It's Microsoft India. I'm very glad to be a part of it. Soon I'll start updating my blog. I was very busy with my schedule so didn't get enough time for this.
Campus is beautiful and work culture is very nice. You will find this place full of creative developers who are talking nonsense if you are non-techie.
More about it later.
Regards
sandeep
Thanks to Donny for allowing me to blog on
DotNetJunkies
sandeep