I am trying to create an object of Test.cs in assembly "MyAssembly" using the below code. It was working earlier and that setup was gone. Now I have created the new setup but the same thing is not working in my new environment : Windows 2008 R2 (added to a domain) IIS 7.5 SharePoint 2010 .NET2
MyUtil.cpp:
...........................
...........................
CComPtr<_AppDomain> spDefAppDomain;
CComPtr<_ObjectHandle> spObjectHandle;
...........................
...........................
hr = spDefAppDomain->CreateInstance(
_bstr_t("MyAssembly"),
_bstr_t("a.b.Test"),
&spObjectHandle
);
It is failed to create an instance of Test class. The return value is 0x80070002 (The system can not find the file specified). Thanks in advance for any assistance.
After copying MyAssembly.dll
to system32
folder it started working. My installer is deploying this dll in SysWow64
folder.
User contributions licensed under CC BY-SA 3.0