C++ – ClickOnce: getting MSVCRT C++ DLLs on user’s machine

cclickoncedllmsvcrt

I've been trying desperately to get my application (15 C# dlls and 1 C++/CLI dll with C++ Runtime DLL dependencies) to deploy with ClickOnce. I got it to work by just copying the Release folder, but ClickOnce refuses to copy the files (msvcm80.dll, msvcp80.dll and msvcr80.dll) and deploy them in this folder.

I did this nutty workaround (supply msvcm80.dll, msvcp80.dll and msvcr80.dll as Content/Copy If Newer and then at startup, create the Microsoft.VC80.CRT folder, copy those DLLs, and create Microsoft.VC80.CRT.manifest) that seems to work, but this all just feels wrong to me.

Am I missing something?

Best Answer

I'm stupid: I just found this:

On Publish tab of Properties page of my startup project: click Prerequisites... button > check Visual C++ Runtime Libraries, radio button setting: Download prerequisites from the component vendor's web site.

It seems to work the way one might expect!

Related Topic