Search code examples
c#c++visual-studioclr

Build an .exe that runs without C++ Redistributable Package


I am using Visual Studio Community 2019 C# (my interface) and Visual Studio 2017 Community C++ (.exe who is called during interface process)

I need to export my project to others PC and if they do not have Visual Studio installed they are missing some dll. I know there is an option to select to free from this kind of things : "C++ 2015 Redistributable Package". Does anyone knows how I can solve this on VS 2019 and VS 2017, otherwise I will be forced to add an installer with my files.

Thanks


Solution

  • Ok i found the solution to whom it may concern, in visual studio 2017 (my C++ code) i did this :

    1. Right-click your project in “Solution Explorer”, select “Properties” from the popped menu. Then the “Property Pages” dialog opens.

    2. In the opened “Property Pages” dialog, select “Configuration Properties->C/C++->Code Generation->Runtime Library” , set its value to “Multi-threaded (/MT)” or “Multi-threaded Debug(/MTd)”.