Alireza Noori

I have wrote a program with Microsoft Visual Studio 2005 using C++ language (CLR) but when I build that program and copy the .exe file to another computer it won't run (The program's .Net Framework is the same that installed on the other computer means version 2) could you please help me I want that my program run on any PC that have .Net Framework, note that my program is very simple and is just a .exe file.

Note that this program runs on systems that have VS2005 installed but not on systems with just .Net framework 2 installed

This is the error message:

---------------------------
G:\Other\registeringIAU.exe
---------------------------
G:\Other\registeringIAU.exe

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.


---------------------------
OK
---------------------------

Thanks in advance




Re: Visual C++ General Build problem!

gon_no1

if you are reading this, and if you have the same problem about your app's exe couldn't find the required DLLs that it was set up to use, then here is the solution.

**Note** This solution is not new, and is from other people's method already available on the forum before.

(1) Open the app's exe's Manifest file, which is either a separate file, or embedded inside the exe, and check which version of DLLs it needs to use. Double check that the version number it requires is the same as the version number that your VS2005 is using (Go to Help>About in VS2005). They will be the same since you have built the app using your VS2005 !!

(2) On the target machines, you need to install those DLLs needed (the version that your app needs). This can be done by running the "vcredist_x86.exe" file found on your machine's "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86"

(3) After step 2, the target machine's C:/Windows/WinSxS/ folder should have the folders with the required DLLs inside. These newly added folders will have the required version numbers as part of their folder names, go inside and you should see those DLLs being the version that your app's exe needs (Just mouse-over the DLL to check its version number).

(4) Then your target machine should be ready to go !!!!!!!!!!!

Cheers!

David

(nickname: gon_no1)





Re: Visual C++ General Build problem!

crescens2k

It seems like you are building the project on a SP1 version of VS2005. You should install the required runtime files onto the target machine too, you can get these from the Microsoft download centre if needed. What you need is the SP1 release of vc_redist.exe.




Re: Visual C++ General Build problem!

Alireza Noori

I've Installed the vcredist_x86, BUT I still have the same problem! I don't know what to do! My VS is not SP1 and I have installed both vcredist_x86, SP1 versions and (not SP1) versions Big Smile but it didn't work out for me!

I think many have built the programs but doesn't anyone have my problem






Re: Visual C++ General Build problem!

Alireza Noori

I solved this problem.
I just had to build the program in Release mode and install the vcredist_x86 in the target machine.
The problem was that I have built the program in Debug mode rather than Release mode.