I have a VS 2005 VS project that uses a special Plugin folder to load additional DLLs (for use as nodes in the asset conversion process).
I have a mixture of C # and C ++ DLL in this folder.
The problem is that when using Shadow Copying, C ++ libraries refuse to load using Assembly.LoadFrom. I tried to create a custom application domain and used Load, but that also failed.
Finally, I tried to read the DLL as byte [] data and use Load on this - again, only the C # DLL will work this way with the error "Additional information: policy check with an error in unverified code (exception from HRESULT: 0x80131402) "
A network article suggested trying to use / clr: safely when creating a particular DLL, but then just couldn't create it due to thousands of errors in Microsoft code ... (apparently)
When disabling shadow copy, LoadFrom works fine for all DLLs. This application is a plugin for Maya, and it has been used to work with Maya 8.5, but with an error since 2008/2009 (if Shadow Copying is enabled).
We really would prefer to use Shadow Copying, since it prevents DLL files from being locked when the application starts (the plugins folder is stored in a location that Perforce can update while the application is running).
Any ideas on how I can convince Shadow Copying to work with a user folder and using a C # / C ++ DLL combination without these problems?