ccomptr _appdomain createinstance returning the system can't find the file specified

0

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.

c#
c++
.net-assembly
asked on Stack Overflow Oct 17, 2013 by user2106568 • edited Oct 17, 2013 by Moo-Juice

1 Answer

0

After copying MyAssembly.dll to system32 folder it started working. My installer is deploying this dll in SysWow64 folder.

answered on Stack Overflow Dec 13, 2018 by user2106568 • edited Jan 9, 2019 by user2106568

User contributions licensed under CC BY-SA 3.0