I am using InstallScript MSI project in that I am calling DotNetCoCreateObject in OnBeing function.

set gobjDatawareDll = DotNetCoCreateObject(szDllFile,"DatawareISDll.DatawareIs","");

If i build .NET Dll in any CPU then do not get any issue but the dll is being run in 32 bit environment. I need to run dll in 64 bit environment.

I have also changed the build configuration of .NET dll to x64 but in that case I get below exception during DotNetCoCreateObject call.

---------------------------
Unhandled Exception
---------------------------
Error Number: 0x80040707
Description: DLL function call crashed: ISRT._DotNetCoCreateObject

Setup will now terminate.
---------------------------
OK
---------------------------

I have also changed x64 in template summary in "General Information" but still it is not working get above exception if build the dll in x64.

Please help.