gon_no1

hi guys,

I have built a super simple VC++ windows form application using VS2005-SP1 and tried to run the "release" on other machines and encountered the famous "This App Failed to Start, Config is Incorrect.." problem.

so I have spent a lot of time searching for answers systematically, and I have read pretty much all the things on MSDN and also on this forum, but the problem is still not solved.

In summary, I see there are 3 main approaches to solve this problem:

(1) get the target machine to install vcredist_x86.exe first, then run my app's exe. The vcredist_x86.exe I am using is from this folder: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86

(2) According to Ted, I copied the Microsoft.VC80.CRT folder into the same folder that my app's exe is in. So that Inside my app's folder, I will see my_app.exe, and also the Microsoft.VC80.CRT folder. The Microsoft.VC80.CRT folder contains 3 Dlls and 1 manifest file.

(3) Using VS2005-SP1 to create a Setup&Deploy project, and hence generate a .msi file. The msi suppose to distribute my app's exe and also all the required DLLs.


However, I have tried ALL those methods and still get the same problem.

I think the reason is because my DLL's version is too new This is an educated guess because I have these 3 folders inside my WinSxS folder:
a) x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700
b)
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb
c)
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd

obviously these 3 folders are all CRT DLLs but just with different versions. I have NEVER seen anyone else having the 8.0.50727.762 version. They all go up to .42 or .163 only, not to .762.

But when I read the manifest that is embedded inside my app's exe, I see it requires the the 8.0.50727.762 version.

Keep in mind that, when I was trying method (1) above, the vcredist_x86.exe is from my machine, so the DLLs it distributes on the target machine are the newest ones too (8.0.50727.762).

However, that still doesn't work.

And when I was trying method (2) as suggest by Ted, all the DLLs that I have manually copied across are of the newest version too. Because I know my app's exe is asking for the newest version (8.0.50727.762).

After trying those methods for many many times, the app still won't run on a machine without a most-updated VS2005-SP1. Note that, it won't even run on a machine with VS2005 version 8.0.50727.163. Since I created the app on my machine which has 8.0.50727.762, it won't even run on machines with VS2005 8.0.50727.163 !!!!!!!!!! It only wants .762's DLLs !!!!

Anyway, I have tried to fixed this for a while now, and I have seen people with versions prior to 8.0.50727.163 got their problems fixed using the above methods.

So can anyone help me with this

Any help will be greatly appreciated!!!


p.s. I don't mean to be rude or anything, but since I have read ALL the pages on MSDN relating to this deployment issue, please don't just throw me a link to a MSDN page saying here is the info. Please kindly provide a more clear step-thrus or something that I can actually try straight away, because I have read all the theories and options on MSDN already.

Thank you very very much !

Cheers

David



Re: Visual C++ General Never seen before problem with the old "This App Failed to Start, Config is Incorrect.." problem

crescens2k

This is to do with the apps imbedded manifest. When you compile with SP1 the manifest is set to use the 762 (SP1) version of the CRT. Look into the generated manifest and make sure that it points at the correct version of the CRT.

Oh, and with the first option you have, are you actually installing the SP1 version of the VC redist.






Re: Visual C++ General Never seen before problem with the old "This App Failed to Start, Config is Incorrect.." problem

gon_no1

Hi crescens2k,

Thanks for your reply.

-quote -

>> This is to do with the apps imbedded manifest. When you compile with SP1 the manifest is set to use the 762 (SP1) version of the CRT. <<

Yes thats right, so I knew my App's exe is asking for .762 (I opened the exe with VS2005 and looked at the RT_MANIFEST inside the exe, and it is set to use .762).

-quote-

>> Oh, and with the first option you have, are you actually installing the SP1 version of the VC redist. <<

Yes the the "vcredist_x86.exe" that I am intalling to the target machine is the SP1 version (.762). This vcredist_x86.exe is from the Bootstrapper folder inside my machine, so it is a .762 one, so it will install .762 DLLs to the target machine's WinSxS folder as well.

So what I don't understand is (from the target machine's point of view): My app is asking for .762 DLLs in the WinSxS folder, and it cannot find it. But the .762 DLLs are truely there in front of our eyes because I manually checked that they exist after I have run the SP1's vcredist_x86.exe.

So I don't know why when the OS loader is reading the manifest, it cannot find those .762 DLLs that are actually present in the WinSxS folder.

Any ideas anyone

Thank you very much !

David





Re: Visual C++ General Never seen before problem with the old "This App Failed to Start, Config is Incorrect.." problem

gon_no1

Hi all,

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 Never seen before problem with the old "This App Failed to Start, Config is Incorrect.." problem

preclick

What do you do if you can't run the vcredist file I'm trying to put a stand-alone application on a CD with just the runtimes from SP1 (3 .dlls and the manifest), but I'm getting this error.




Re: Visual C++ General Never seen before problem with the old "This App Failed to Start, Config is Incorrect.." problem

gon_no1

you mean you cannot run "vcredist_x86.exe" (that you copied from your dev machine) on the target machine

what happens when you try to run it