Click here to Skip to main content
16,004,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i build a project and generated an exe file.it is running fine in my machine where visual studio is installed.when i am running that exe in another machine where visual studio not installed it is giving me the above error.

**For that i need to install visual studio 2017 redistributable packages and then the exe is running fine.Is there any way without installing visual studio 2017 redistributable packages can i add those above required dll's in my project and can run on any machine without the above packages.

What I have tried:

I tried changing properties->General->Use of MFC :from "standard windows libraries" to "use mfc in static library" in visual studio 2017.But that is increasing my executable size very much.Is there any other way?
Posted
Updated 19-Sep-17 3:52am
Comments
Graeme_Grant 19-Sep-17 5:32am    
How are you installing the app on the other machine? Are you creating an installer and running it or just copying files?
Naveen_vemuri 19-Sep-17 5:33am    
copying it
Graeme_Grant 19-Sep-17 5:41am    
This is why you are missing dependencies!
Naveen_vemuri 19-Sep-17 5:44am    
what is the solution for that?
Graeme_Grant 19-Sep-17 5:48am    
As mentioned above, create an installer in VS. The installer can handle the dependencies. ISn't that what other software companies do?

Copying a single file to and other machine is not advised...
You should create an installer with all the dependencies in it...
If you are sure that you have no dependencies beyond the C++ core you can use the Visual C++ Redistributable package for your version... less than that will not work...
 
Share this answer
 
Here is an Inno Setup installer that supports a plethora of packages: GitHub - stfx/innodependencyinstaller: Modular InnoSetup Dependency Installer[^]
The nice thing is that most are web installers, like the VC redistributables you need, so this won't make your setup package larger.
 
Share this answer
 
You MUST install the runtime, either as a separate installation or as part of the Setup for your application as a prerequisite. You cannot get around installing the runtime.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900