visual studio 2005 .exe file not running on another computer - windows

I have a visual studio 2005 c++ application running on a windows 7 64 bit machine.I tried to run it on another computer having windows 7 64 bit but when I copied it on to the desktop and runs the .exe file,there was no response.But I dont have the visual studio 2005 ide installed on the new machine and I am currently instaling it. Also, I googled and got lot of confusing answers. Can someone tell me what will be possible problem here?

Try installing the "Microsoft Visual C++ Redistributable Package" on the machine where the executable is not working.

You need to build for Release not Debug to run the application on a PC without Visual Studio. If you're already doing that, try loading the EXE into Dependency Walker on the target machine to see what other libraries might be missing.

Related

My program doesn't run on other computers

So, recently I've created a program in visual studio 2010 using c++/cli. But the problem is, everytime I try to run the debug file on other computer , it just doesn't start. I tried to create another program on another computer and it worked. Can the problem be in the fact, that I have visual studio 2015 installed in this computer ? And if so, how can I fix it?
The debug build uses a different C library than the release compile does. If you want to run your program on a different machine, make sure it's the release compile, and make sure the C++ runtime redistributable is installed.
Visual Studio 2010 SP1 x86 redistributable
Visual Studio 2010 SP1 x64 redistributable

Can i open a 32 bit visual studio project in a 64 bit enviroment?

Can i open a 32 bit visual studio project in a 64 bit environment?
I am running Visual Studio on a 32 bit Windows 7 version. My question is if someone with a 64 bit Windows version can open my project.
I have the Visual Studio 2012 ultimate edition.
I use Visual Studio for web development with C#.
Yes. Visual Studio project files are not tied to CPU architecture.
Executing that project is a different matter. If the project itself is a 64-bit C++ application, you will need a 64-bit machine on which to run it, but the machine will still be able to open the project, see the files and compile it.
Yes. Any project on 32bit can be run on 64bit windows. But you cant run a 64bit project on a 32bit windows. Hope you got the answer.

Visual studio - stand alone application

Hello I have created a DLL file using visual C++ 2010, that runs a C script that i have written.
I have then created a user interface using visual C# 2010 and linked everything together.
On my machine the resulting exe application runs perfectly.
However when i try to put the folder, containing BOTH the exe and the dll, on other computers.. it runs on some computers, but on others it does not.
the error i receive has to do with "Cant find dll file or assembly".
All computers have windows 7 64bit installed.
My question is: Is there a requirement for the application to run? (files or something that should be installed on all machines???)
I have noticed the following (after alot of looking) that:
the computers that run the application HAVE visual studio 2010 installed
the computers that do not run the application DO NOT have visual studio 2010 but have visual studio 2008 installed..
all computers have .NET framework 4.5 installed.
Do you think the visual studio has anything to do with this?!!? isnt the point having a stand alone application is to make the app run on any machine?
Is there a way to fix it so that the app will run on any computer regarding having visual installed or not?
thank you all..
You can use Dependency Walker to check what dll the program can't find.
Just load the .exe into the program.
You might also find that you will need to install the Visual Studio 2010 Redistributable on those computers that you are deploying to.

"program can't start because msvcp100.dll is missing" for Every single code

This error is taking toll of my training schedule.
Everytime I create any C++ application in my VS2010, It runs fine on my machine but if I run it on different machine, It starts with this error.
Error goes if I copy msvcp100.dll in System Folder then it shouts for some other DLL. It requires some 5-6 different DLLs.
Most irritating part is even if I write a simple Console based Addition program, It gives this error.
(I should not but)I would have agree if I design some fancy forms and all... But for simple Addition program????
Am I missing out somethings in Settings? or VS2010 to blame??
Somewhat related question: this But this problem seems different
By default, MSVC projects are set to link against the dynamic run time library which generates a dependency on the visual C++ run time redistributable. As you have already found out, this dependency is not guaranteed so your install utility has to install the visual c++ run time first.
You can avoid this by changing your project settings. Load the project properties and go to: "Configuration Properties"/"C/C++"/"Code Generation"
In the item labelled "Runtime Library", select "Multi Threaded (/MT)"
for the release version"Multi Threaded Debug (/MTd)" for the debug version.
You have to be careful while doing this that all the other libraries that your application links are also compiled against the static run time.
You need to have Visual C++ Libraries installed if you want to run your app.
Using the compiler options to change the runtime library worked for me ("Configuration Properties"/"C/C++"/"Code Generation". In the item labelled "Runtime Library", select "Multi Threaded (/MT)" for the release version and "Multi Threaded Debug (/MTd)" for the debug version). I did have to do both the debug and the release to get the release to work. Don't know why (it is possible that I did not do it correct the first time).
Note: I was using VC2010 Express version on Windows 7 to compile. I tested on an old XP machine.
Another note: MS information at http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=vs.100).aspx
If you have installed a new copy of Windows on your computer or have reinstalled one then you will come across an error called "The program can’t start because MSVCP100.dll is missing from your computer. Try reinstalling the program to fix the problem." on your computer.
The basic reason behind this error is that the Visual C++ doesn’t get installed when you reinstall or install a fresh copy of Windows operating system. In order to check Visual C++ is installed on your PC or not, open Control Panel → All Programs and Features and then search for Visual C++ in the software list. If you don’t find the software installed there then you have to install it.
I would suggest, first of all, install the Visual C++ 2010 package and check if it has solved msvcp100.dll missing error or not. If the issue is not resolved by the Microsoft Visual C++ 2010 then install 2013 or 2015 versions of Microsoft Visual C++. Here is the list of download links of Microsoft Visual C++ for both x86 and x64 architectures:
Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
Visual C++ Redistributable Packages for Visual Studio 2013
Visual C++ Redistributable for Visual Studio 2015
→ The latest supported Visual C++ downloads
I hope, now you are able to fix “The program can’t start because MSVCP100.dll is missing error on your computer. To know more details, you can follow this guide.
Thanks

Side-by-side assemblies, Windows 7, and Visual Studio 2005

I have a Windows 7 machine with Visual Studio 2005 SP1 installed. Using this, I build an application which loads a DLL at runtime compiled with VS2005 SP1 but on Windows XP. This fails, with the following error:
"...\foo.dll": The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
The DLL loaded is compiled against the debug CRT. The answer to this question hints that vcredist_x86.exe only contains release-versions of the CRT. I'm not sure if that is relevant in this case, since both my machine and the machine on which the DLL was compiled on both have the full VS2005 SP1 installed.
Should I attempt to rebuild the DLL on Windows 7 (I'd prefer not to), and will that cause the DLL to become unusable on the Windows XP machine?
Problem solved. The problem was that the Windows 7 machine did not have the KB971090 update which was installed on the Windows XP machine which built the DLLs. I had to explicitly tell Windows Update that I wanted to receive non-Windows updates in order to be able to install the update.

Resources