Question:
I am attempting to embedded the ChilkatDotNet2.dll as a resource so that I can deploy a single executable.
I have the code working prior to making it a resource.
I am in .Net 2.0 for the project running under Visual Studio 2010.
When I change the Visual Studio reference to have "Copy Local" set to false, the CurrentDomain_AssemblyResolve code below fires, but throws an exception. I have tested the same code with a DLL that I have made myself and it works. I am working in VB.net.
The exception being thrown is:
Unverifiable code failed policy check. (Exception from HRESULT: 0x80131402)
The Chilkat .NET assembly is a mixed-mode assembly. The internal core (i.e. the implementation) is written in C++ and compiles to native code. The outer layer is managed and thus presents a managed interface. An assembly that is not 100% managed is "unverifiable".
See these web pages for more information:
http://www.chilkatforum.com/questions/2797/installing-chilkat-net-on-a-web-server-for-aspnet