Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I develop a app in C++(QT),but now a feature need .Net stuff,then I write a dll of VC++ CLR project(vs2010,.Net4.0) as a wrapper for .Net, and export only 1 function by

_declspec(dllexport) void previewDocx(const char* lp);


then the app(exe) link the lib and depend that dll.

In my local,the app runs normally.but failed in other pc.(with no vs2010 nor .Net framework installed).

I have tried to add all the dlls under "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist" to run directory(bin).

But when calling the code inside the .Net dll,it crashed.

BTW.
(1) the exe is redistribute by QT so there's no msi,I just want to carry some nesseary stuff (dll,the like) with the existing self-extracting. May I?
(2)Do I acquired to let the user to install .Net framework 4.0? any simple solution?

thanks in advance?
Posted

you'll have to ask the client to install .net4[^] in this instance


(the whole .net availability/install paradigm is a mess IMO)
 
Share this answer
 
You can deploy .NET framework with your application. Please start here: https://msdn.microsoft.com/en-us/library/6hbb4k3e%28v=vs.100%29.aspx[^].

For installations, I usually recommend open-source WiX:
http://en.wikipedia.org/wiki/WiX[^],
http://wixtoolset.org/[^].

Note that WiX is more legitimate than discontinues Setup project which was bundled with Visual Studio. WiX is much better project. It is correctly integrated with MSBuild and is compliant with the standard for MSBuild projects files (and Setup project type is not). It also has excellent Visual Studio integration. Maintainability of setup project is also by the order of magnitude better.

So, you can deploy .NET with WiX: http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html[^].

But of course you simply can claim required version of .NET framework as a prerequisite for your application.

[EDIT]

Another useful idea could be using WiX#:
https://wixsharp.codeplex.com[^],
Wix# (WixSharp) UI Extensions[^].


—SA
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900