12-19-2006, 2:39 PM UTC
|
Jay K
Posts 5
|
|
|
Hi, I'm
trying to get an MFC application compiled with VC++ 2005 to run on a
machine with VC++ 2005 express. There seems to be a problem with the
manifest (which I don't fully understand despite reading the info on
msdn). The original error in the event log when I tried to run it said
Microsoft.VC80.CRT not installed so I installed the platform SDK and
also copied over the atlmfc directory from the development to target
machine.
I also downloaded the VC++ 2005 redistributable and
installed it. When I installed it, I didn't get any confirmation that
the installation was successful, the installer appears to quit after
displaying the progress bar. Is this the correct behaviour?
Now
I no longer get any messages in the event log but when I try to run the
app I get an "Unable to start program ... This application has failed
to start because the application configuration is incorrect..."
This
error occurs both inside Visual Studio and when I run the app directly.
I've tried both the debug and release builds (I understand the redist
doesn't include the debug libs).
Any help appreciated.
Jay.
|
|
|
|
Report Abuse
|
|
|
|
12-19-2006, 3:51 PM UTC
|
Peter Ritchie
MVP
Posts 2,737
|
|
|
Express
does not include MFC/ATL. What "VC++ 2005 redistributable" did
you install? An Express redistributable won't have MFC/ATL...
http://www.peterRitchie.com/Blog | MSDN Forums Moderator | Microsoft MVP - Visual Developer, C#
|
|
|
|
Report Abuse
|
|
|
|
12-20-2006, 1:28 PM UTC
|
Jay K
Posts 5
|
|
|
The redist is called "Microsoft Visual C++ 2005 Redistributable Package (x86)" available at http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=32BC1BEE-A3F9-4C13-9C99-220B62A191EEFrom the description: "
This package installs runtime components of C Runtime (CRT), Standard C++, ATL, MFC, OpenMP and MSDIA libraries."
I
also copied the mfc directory from a machine with VS 2005 professional
so that I could try to recompile on the VS express machine. That didn't
work either.
Jay.
|
|
|
|
Report Abuse
|
|
|
|
12-20-2006, 2:54 PM UTC
|
Jonas Nordlund
Posts 18
|
|
|
Note
that the redistributable above may not run applications compiled in
Visual Studio 2005 Service Pack 1 as such executables want slightly
revised versions of the runtime DLL's. It took us some while here to
figure that out and thought it wasn't well documented.
I'm unsure if a redistributable for that version is available online yet, but it's shipped with Visual Studio 2005 SP1 at:
"%PROGRAMFILES%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86"
|
|
|
|
Report Abuse
|
|
|
|
12-20-2006, 7:58 PM UTC
|
3d_developer
Posts 10
|
|
|
Hi Jonas,
Could you please provide more details on the issue you hit with
versions of C Runtimes? We're seeing a rash of issues with our
executables being unable to find C Runtime DLLs (MSVCR80.DLL being the
most common one) on some XP SP2 machines and haven't found a solution
yet. The executables and most dlls are native C++ with one
mixed-mode C++ dll and one C# dll. The C++
code uses MFC and the C# dll uses WPF and COM interop,
etc.
We also see the DWMAPI.DLL missing issue when we run dependes, but
other forum threads indicate that's a false missing dependency.
We are embedding manifests in our executables and the manifests
are correct, the Windows\WinSxS folder seems to contain the correct
versions of the C Runtime DLLs (8.0.50727.42 and 8.0.50727.163),
etc. We do install the .NET 3.0 redistributable on machines as
part of the install. And on the machine where the executable is
built, everything runs fine. So I'm hoping you might have
some information that would help us solve this problem.
For example, if the Visual Studio 2005 Extensions for WPF
install something special on machines that they don't get from the
normal VC redistributable, that would explain it. I haven't tried
that yet...
Thanks -Bob
|
|
|
|
Report Abuse
|
|
|
|
12-22-2006, 11:28 PM UTC
|
JohnReid
Posts 5
|
|
|
I've
installed visual studio express 2005 SP1 and now some DLLs I build
can't be loaded because of a msvcr80.dll dependency. DWMAPI.dll is also
listed as missing as 3d_developer noted.
I might also have installed this earlier:
Visual C++ 2005 Express Service Pack 1 Betacould this be causing these problems?
Please note this is all on my developer machine. I have not even tried installing this stuff on others' machines.
Any ideas on how I can go about tracking this problem down. What more info might be relevant?
Merry xmas! John.
|
|
|
|
Report Abuse
|
|
|
|
01-03-2007, 5:38 PM UTC
|
Jay K
Posts 5
|
|
|
Jonas Nordlund wrote: | Note
that the redistributable above may not run applications compiled in
Visual Studio 2005 Service Pack 1 as such executables want slightly
revised versions of the runtime DLL's. It took us some while here to
figure that out and thought it wasn't well documented.
I'm unsure if a redistributable for that version is available online yet, but it's shipped with Visual Studio 2005 SP1 at:
"%PROGRAMFILES%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86"
|
|
Thanks Jonas, that looks promising. I was using the redist from the
website but I have SP1 on my development machine so I'll try the
updated version.
Jay.
|
|
|
|
Report Abuse
|
|
|
|
12-20-2006, 4:16 PM UTC
|
Peter Ritchie
MVP
Posts 2,737
|
|
|
Your
original message only mentioned running the application on the machine
with Express installed. Now you're saying you're trying to
compile it with Express? Express does not support MFC or ATL.
http://www.peterRitchie.com/Blog | MSDN Forums Moderator | Microsoft MVP - Visual Developer, C#
|
|
|
|
Report Abuse
|
|
|
|
12-21-2006, 7:25 PM UTC
|
Nikola Dudar - MSFT
Posts 379
|
|
|
It looks like there are several issues mixed up in this thread.
Jay K wrote: |
I'm trying to get an MFC application compiled with VC++ 2005 to run on a machine with VC++ 2005 express.
|
|
Jay, is there a reason you are trying to do this? As Peter has
already pointed out, you cannot build MFC applications with
VC++2005 Express, not matter you install or you do not install VC++
Redistributable Package.
Jay K wrote: |
I've tried both the debug and release builds (I understand the redist doesn't include the debug libs).
|
|
You can only redistribute release version of VC++ libraries. Once
you have built a release version of your MFC application, you can run
it on a computer that does not have VS2005 installed after you have
deployed MFC and CRT DLLs using ways described here, http://msdn2.microsoft.com/en-us/library/ms235316(VS.80).aspx
Jonas Nordlund wrote: |
Note that the redistributable above may not run applications
compiled in Visual Studio 2005 Service Pack 1 as such executables want
slightly revised versions of the runtime DLL's. It took us some while
here to figure that out and thought it wasn't well documented. I'm
unsure if a redistributable for that version is available online yet,
but it's shipped with Visual Studio 2005 SP1 at: "%PROGRAMFILES%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86"
|
|
This is correct. VS2005 SP1 installs new versions of VC++ libraries
that contain fixes requested by customers for the SP1 release. Once Sp1
is installed it updates all VC++ assemblies in WinSxS folder,
vcredist_*.exe in bootstrapp packages folder, associated .lib and .pdb
for VC++ libraries and many other source files. Once application is
rebuilt with VS2005 SP1, it depends on SP1 version of libraries and SP1
version of VC++ libraries have to be redistributed. This is not new
policy for VS2005. In all previous versions of Visual Studio and Visual
C++, QFE and SP releases of DLLs replace previous versions of DLLs in
place. VC maintains full backward binary-compatibility in hotfix and SP
releases of VC++ DLLs if compared to RTM versions. Once an application
is rebuilt with SP or a hotfix version of VC++ libraries, it depends on
that version of libraries and have to use them at runtime. This is also
described in docs, http://msdn2.microsoft.com/en-us/library/aa983349(VS.80).aspx
We have no plans of posting SP1 version of VCRedist for download.
You should be using version of vcredist_*.exe installed by VS2005 SP1.
3d_developer wrote: |
We're seeing a rash of issues with our executables being unable to
find C Runtime DLLs (MSVCR80.DLL being the most common one) on some XP
SP2 machines and haven't found a solution yet.
...
We are embedding manifests in our executables and the manifests
are correct, the Windows\WinSxS folder seems to contain the correct
versions of the C Runtime DLLs (8.0.50727.42 and 8.0.50727.163),
etc.
|
|
Bob, I think you have a different issue. Perhaps start another
discussion on this. Please be specific in description of your build
environment and mention what versions of VS2005 you have installed.
Identify specifically what VC++ libraries your application depends on,
what versions of them, etcs. Make sure your application installs the
same versions of the libraries on another computer by using VC++
redistributable MSMs or VC++ Redistributable Package, http://msdn2.microsoft.com/en-us/library/ms235316(VS.80).aspx. You may find more information about how troubleshoot loading issues here, http://msdn2.microsoft.com/en-us/library/ms235342(VS.80).aspx
Nikola
VC++
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
Report Abuse
|
|
|
|
12-21-2006, 8:01 PM UTC
|
DaveMellor
Posts 6
|
|
|
I
thought Manifests were an end to DLL hell - but it just seems that now
we have manifest hell. The CRT seems to change rapidly so there are new
VCREDIST_x86 releases for each change - but where are the corresponding
merge modules? The only merge modules I can find for CRT Version 8 are
for old builds - is it the case that developers should
ship VCREDIST_X86 as the preferred method of redistribution or are
merge modules preferrable? From an installation (end user) point of
view including merge modules is cleaner and adding new versions of the
CRT to a target system shouldn't break any existing applications
(providing they are strongly bound to the cache DLLs on which they
depend). So why no merge modules for each corresponding VCREDIST_X86 et
al?
Or should all deployments use private side by side installs of the CRT/MFC dependancies (sigh)?
Dave Mellor
|
|
|
|
Report Abuse
|
|
|
|
12-22-2006, 3:49 PM UTC
|
3d_developer
Posts 10
|
|
|
Thanks
Nikola. I'm embarrassed to say that my problem turned out to be
old application manifest files were sometimes being left in the same
install folder as the executable, causing the embedded manifest to be
ignored. Once we fixed our install to remove the old manifest
files, everything works great.
But I do agree with another poster that it would be great if
Microsoft had a clear set of web pages explaining manifest files and
with links to all the various versions of the C runtime listed
explaining what changed for each and merge modules / developer installs
for each available. For example, I have versions 8.0.50727.163
and 8.0.50727.42 on one of my machines, but only version 8.0.50727.42
on most others. I have no clue what install installed
8.0.50727.163 and nothing on Microsoft's web site has told me
yet. Additionally, I found that SQL Server 2005 installed its own
copy of MSVC80 DLLs in their install folders, not in the WinSxS
folders, which caused additional confusion as on those machines some of
the DLLs were found.
|
|
|
|
Report Abuse
|
|
|
|
12-23-2006, 2:36 PM UTC
|
JohnReid
Posts 5
|
|
|
I
have very similar symptoms to 3d_developer but I don't have old
manifest files hanging around. Again this is all on the development
machine. I have vc++ express with sp1 installed. I may have installed
sp1 beta a while ago. All the dlls I build depend on msvcr80.dll and
dwmapi.dll and do not load because they cannot be found.
Any ideas as to how I can find out what is wrong? I have tried rebuilding everything from scratch.
How can I uninstall sp1? Do I need to uninstall everything and start again?
Thanks, John.
|
|
|
|
Report Abuse
|
|
|
|
12-22-2006, 8:08 PM UTC
|
oflebbe
Posts 4
|
|
|
>We
have no plans of posting SP1 version of VCRedist for download. You
should be using >version of vcredist_*.exe installed by VS2005 SP1.
I
like to kindly remind you that the SP1 does not install/upgrade a
vcredist_*.exe for C++ Express Edition. My posting regarding this issue
is not answered in the Express Forum. Microsoft should place an
upgraded vcredist.exe on their websites, otherwise many express users
will have to work with private assemblies.
Olaf
|
|
|
|
Report Abuse
|
|
|
|
12-22-2006, 9:27 PM UTC
|
Peter Ritchie
MVP
Posts 2,737
|
|
|
And actually, the Microsoft documentation
recommends that VCRedist be used for deployment of applications built
with Visual C++ Express. That's ridiculous if the VCRedist
binaries are not installed with SP1 and there are no plans on making an
SP1 VCRedist available!
http://www.peterRitchie.com/Blog | MSDN Forums Moderator | Microsoft MVP - Visual Developer, C#
|
|
|
|
Report Abuse
|
|
|
|
12-23-2006, 12:43 AM UTC
|
Ted.
Posts 747
|
|
|
Agreed, the SP1 vcredist files should be made available for download.
|
|
|
|
Report Abuse
|
|
|
|
MSDN Forums » Visual C++ » Visual C++ General » VC++ 2005 redistributable
|
|
|