Recently I had the task of deploying an MFC application suite along with its dependencies via ClickOnce. Visual Studio does not directly support deployment of MFC applications (even if it’s compiled with /clr) and one of the suggested solutions I found on the web was to have a stub C# executable which would launch the main MFC application. That way you could take advantage of Visual Studio’s built-in deployment functionality. My friend Rama Vavilala had a better suggestion for me – he asked me to try putting in a dummy cpp file into the main project that was compiled using /clr. If ClickOnce accepted such an executable as a .NET assembly, then all I would have to do would be to create the required manifest files on my own. Well all I can say is hats off to Rama for his elegant solution – because it actually did work. This article is a step-by-step pictorial on how you would deploy an MFC application using this trick.
Can you explain better this sentence:
“That’s it. You can try running the application via the ClickOnce URL and you’ll see that the app deploys and runs fine.”
I’ve done all your steps (but I’m trying to deploy a WinForm App), but I can’t find the ClickOnce URL: if I click on “application”, I get the XML code…
The .NET framework has to be installed before deploying?
Can you enlighten me how can i change the mfc compilation setting to use /clr and remove its support for precompiled headers?
Pardon me if my query is sensed idiocy.
😦
can you give me some information about C and C++?thank you very much. I’m chinese,very pleased to make friend with you…….
Hello,
I read your article but I don’t understand your instructions.
Step 1 – Add the dummy /clr file
2nd line – You would also have to tweak a couple of other settings to allow the /clr compilation mode depending on your main project settings.
I couldn’t understand what to do.
Please help me.
Thanks
Sometimes I find deploying by quickonce to be pain in the butt. But its easier to just download installation shield.