المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Error in Loading assembly from Assembly.Load



C# Programming
09-18-2009, 03:31 AM
Hi,
I am getting an exception in the following code. Exception is "Could not load file or assembly 'AutomationAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c1461fa3837aae41' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)"

AssemblyName _asmName = new AssemblyName();
_asmName.CodeBase = "file://" + "D://dinesh//CSharp//AutomationAddIn//AutomationAddIn//bin//Debug//AutomationAddIn.dll";

Assembly.Load(_asmName);

Any suggestions?
Thanks.