C++\CLI Assembly.Load failed [modified]
Managed C++/CLI
1
Posts
1
Posters
0
Views
1
Watching
-
first please download the PDFLibNet.dll from here: http://www.codeproject.com/KB/files/xpdf_csharp/PDFViewer.zip[^] it's ok like this:
Assembly a = Assembly.LoadFile("PDFLibNet.dll");
but exception like this:byte[] b = File.ReadAllBytes("PDFLibNet.dll"); Assembly a = Assembly.Load(b);
throwing FileLoadException, telling me it could not verify the code or could not pass policy check. .net thinks that it is not a valid assembly. I found a solution here: http://nonodes.spunow.co.uk/2009/04/assemblyload-c-cli-assembly-gives.html[^] telling me to build the C++ assembly with /clr:safe, but is there any other way out?Regards, unruledboy_at_gmail_dot_com http://www.xnlab.com
modified on Tuesday, November 17, 2009 10:16 PM