0

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.

Not a real meerkat
  • 5,604
  • 1
  • 24
  • 55
msw
  • 1
  • 1
  • You probably should add some details on your attempt to do so. I'm not familiar with Fody Costura, so I can't help you with that, but try to keep these details as minimal as possible (something close to a [MCVE]) – Not a real meerkat Sep 26 '18 at 16:30

1 Answers1

0

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