Load assembly doesn't worked correctly

时光总嘲笑我的痴心妄想 提交于 2019-12-03 12:40:45

I think your syntax is wrong. Assembly.load(string) expects the assembly name

Assembly.Load("SampleAssembly, Version=1.0.2004.0, Culture=neutral, PublicKeyToken=8744b20f8da049e3");

Also make sure you're using the right overload for your needs (which usually is indeed Assembly.Load) http://blogs.msdn.com/b/suzcook/archive/2003/05/29/57143.aspx

EDIT use this:

AssemblyName an = AssemblyName.GetAssemblyName(filePath);
Assembly.Load(an);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!