How do I reference assemblies outside the bin folder in an ASP.net application?

后端 未结 5 1569
梦谈多话
梦谈多话 2020-12-05 16:14

I\'ve a working XML Web service written in ASP.Net. Now I need to reference certain assemblies lying in a specific folder e.g. c:\\NotMyCode
I do no

5条回答
  •  天涯浪人
    2020-12-05 16:38

    You could always use the: AppDomain.CurrentDomain.AssemblyResolve Event and call

    Assemly.Load(Path.Combine(@"c:\NotMyStuff",args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll"))
    

    See link for more info.

提交回复
热议问题