Fody Costura c++ runtime

772 Views Asked by At

My c# program uses a dll written in c++, and this dll is embedded by Fody Costura.

It works on machines having Visual C++ runtime installed or having msvcp140.dll and dependencies in the working folder.

Is it possible to embed msvcp140.dll and dependencies to the executable using Fody Costura? My attempt to do it was unsuccessful.

1

There are 1 best solutions below

0
On

Is it possible to embed msvcp140.dll and dependencies to the executable using Fody Costura?

Yes.

Option 1: Use the dependency files on the working directory

Refer to the official document for Unmanaged32Assemblies & Unmanaged64Assemblies config option

Option 2: Use the installed Visual C++ runtime

Add a code to check if the required version of the Visual C++ runtime is installed before using the C++ library