Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I created a setup.exe file from Visual Studio project by Visual Studio Installer.
When I install it on PC that has already any version of Visual Studio the application works properly, and when I install it on PC with no version of Visual Studio the application crash when I try to open a dialog box or something like that.

What I have tried:

If I install visual studio it solve the problem.

Any one knows about specific feature that should be added for installing project of Visual Studio Installer?
How can I solve that issue without installing Visual Studio?
Posted
Updated 26-Apr-17 2:10am
Comments
Richard MacCutchan 26-Apr-17 4:10am    
You need to install the relevant support libraries on the target machine.
Jochen Arndt 26-Apr-17 4:34am    
In addition to the provided solutions:

Ensure that you ship a release version witin your setup.
Debug versions won't work on systems that did not have VS installed.
CHill60 26-Apr-17 4:46am    
Good point!
GKSHR 27-Apr-17 8:15am    
I have another point about my problem,
The installation file is of MFC application
It seems that the crash happens when we try to open file dialog of MFC.
The MFC140.dll (for VS2015) is existing in the System32 folder, what else that related to MFC should I add?
Jochen Arndt 27-Apr-17 9:02am    
See Redistributing Visual C++ Files for what you have to ship with your application.
Common process: Ship your app with the redistributable package and execute that during installation (it will do nothing if already installed).

Is it crashing on all clients or only on a few ones?
For the later case: On which Windows versions it is crashing.

When the application crashes it will probably give you an exception message that would help you determine what is missing. If not then have a look at the PC event log to see what is missing.

Most PC's these days will have .NET pre-installed but if you are using some ancient beast then you may have to install it - make a pre-requisite of your install. There is no need to install Visual Studio.

Be aware that if you have uninstalled Visual Studio you may have uninstalled libraries that you now need - make sure the version of .NET libraries are fully patched (up to date).

If your "dialog box or something like that" is from a third-party then you will need to include the libraries for those controls in your set-up.

Also check the references section of your project to see if there are any other libraries you need.
 
Share this answer
 
Comments
GKSHR 26-Apr-17 4:44am    
Thank you very much for the quick responding.
I don't see any error message, the application just closed.
I see that .NET libraries are fully patched,
Do you know about anything else that could be missing?
I actually don't want to install Visual Studio, I just tried that way and found that it solved the problem. I mean to say: there are some features that the installation of Visual Studio adds to the system and I need to add them to my installation package, but I can't figure them out...
I'de like to get any idea
Thank you
CHill60 26-Apr-17 4:47am    
See the comment from Jochen Arndt above - make sure you have shipped a Release version, not the Debug version of your executable - I suspect that he's found the problem
GKSHR 26-Apr-17 4:48am    
Thanks,
But I work with release version
CHill60 26-Apr-17 4:54am    
Did the event log not give any clues?
There is a set of tools called SysInternals that could help you work out what to include. There is an article on using Process Monitor - Troubleshooting dependency resolution problems using Process Monitor[^] and here's the documentation on the suite - Sysinternals Suite[^]
GKSHR 26-Apr-17 4:57am    
Thanks!
I'II try it
I have another point about my problem,
The installation file is of MFC application
It seems that the crash happens when we try to open file dialog of MFC.
The MFC140.dll (for VS2015) is existing in the System32 folder, what else that related to MFC should I add?
 
Share this answer
 

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



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