I have managed C++ Dll (compiled using clr option)and I am calling it from unmanaged C++ console application.It is working fine,but it is not working fine in Window 2012 where .Net 4.5 is installed.
I have not Installed .Net 3.5 in Window 2012 machine.I am getting prompt as "following feature couldn't be installed on .NETframework 3.5.
- Win32C++ App
- ManagedDll
I followed this article and created app config file ManagedDll.dll.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
It is not working and dll load is failing with window error 1114/ERROR_DLL_INIT_FAILED.
It should work without Installing .Net 3.5. Do I need to install Net3.5 in Window 2012machine?
Can App config file be used for dll as well ??
UPDATED1:
I tried with simple managed c++ application along with app config file,still problem remains.
NetSample1.exe
NetSample1.exe.config
UPDATED2
I tried C# windows forms application.It didn't worked without app.exe.config and it is working with app.exe.
Now it seems configuration file is not at all consulted while loading dll.