I'm encountering Side-by-Side configuration error when launching an EXE with arguments in CommandPrompt. This EXE is a third party EXE and it's ensured to be a working one.
But it does not work in my system - Am I missing anything? I used sxstrace in the eventlog to view the details - below is what I got. I'm not able to interpret.
I've VS 2012 installed in my machine already - also VC++2012/2010/2008 redistributable packages additionally.
================= Begin Activation Context Generation. Input Parameter: Flags = 0 ProcessorArchitecture = x86 CultureFallBacks =
en-US;en ManifestPath = C:\Users\20121011_PR2_1\Desktop\HotPlugUnplug
Stress\SourceCode\Soft_BIOS\bin\DvmuInstaller\Installer.exe
AssemblyDirectory = C:\Users\20121011_PR2_1\Desktop\HotPlugUnplug
Stress\SourceCode\Soft_BIOS\bin\DvmuInstaller\ Application Config
File =
----------------- INFO: Parsing Manifest File C:\Users\20121011_PR2_1\Desktop\HotPlugUnplug
Stress\SourceCode\Soft_BIOS\bin\DvmuInstaller\Installer.exe. INFO:
Manifest Definition Identity is (null). INFO: Reference:
Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Reference:
Microsoft.VC90.DebugMFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference
Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
INFO: Resolving reference for ProcessorArchitecture x86. INFO:
Resolving reference for culture Neutral. INFO: Applying Binding
Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found. INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Users\20121011_PR2_1\Desktop\HotPlugUnplug
Stress\SourceCode\Soft_BIOS\bin\DvmuInstaller\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Users\20121011_PR2_1\Desktop\HotPlugUnplug
Stress\SourceCode\Soft_BIOS\bin\DvmuInstaller\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Users\20121011_PR2_1\Desktop\HotPlugUnplug
Stress\SourceCode\Soft_BIOS\bin\DvmuInstaller\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Users\20121011_PR2_1\Desktop\HotPlugUnplug
Stress\SourceCode\Soft_BIOS\bin\DvmuInstaller\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. ERROR: Cannot resolve reference
Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed. End Activation Context
Generation.
The executable is looking for the Debug version of the VC 9.0 Common Run Time (Microsoft.VC90.DebugCRT). This library is not a part of the redistributable package for the Common Runtime. I forget why Microsoft has this stipulation. Maybe it's a security or a legal issue.
You have three options:
Ask the person who gave you the executable to rebuild the executable in release mode so that the executable links against the release version of the CRT. That's the version you have installed from the redistributable package.
Ask the person who gave you the executable to send the DebugCRT versions of the CRT. Look in the Visual Studio install location for the VC folder. Then look for redist\Debug_NonRedist\x86.
Install Visual Studio/Visual Studio express with C++. This will install the debug version of the CRT on your machine.
Related
We have a ASP.NET project in the company that runs for 5/6 developers. All Visual Studio 2017 and debug on IIS Express, no crazy setting or anything to make it run.
1 colleague cannot get it to work, he always gets the following exception:
We had this problem a few months back, then out of frustration the PC was re-installed and the problem was gone. He didn't develop for a few weeks and today the problem appeared again.
I searched long and far but it's such a generic error I can't really figure this one out.
When I run the fusion log viewer I see the following result:
https://pastebin.com/aCVZn3EB
The operation failed.
Bind result: hr = 0x80131018. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\IIS Express\iisexpress.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/User/Projects/project/project.UserSite/
LOG: Initial PrivatePath = C:\Users\User\Projects\project\project.UserSite\bin
LOG: Dynamic Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: Cache Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: AppName = 38c6ff11
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\User\Projects\project\project.UserSite\web.config
LOG: Using host configuration file: C:\Users\User\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Binding succeeds. Returns assembly from C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll.
LOG: Assembly is loaded in default load context.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80131018).
*** Assembly Binder Log Entry (7/18/2017 # 8:55:15 AM) ***
Are you trying to load a .NET 4 assembly with an EXE that asked for a diferrent CLR version? That requires an app.exe.config file that forces CLR 4 to be used.
Also please check the he has the same version of .NET installed.
1- Close Visual Studio
2- Delete all files from "C:\WINDOWS\Microsoft.NET\Framework......\Temporary ASP.NET"
3- Open VS
4- Rebuild then run
I have the same issue, its random. Just install missing package via Nuget for that project. Open Package Manager Console and type:
PM> Install-Package System.ServiceModel.Activities
and go on installing packages till there is no more error: then stop.
Turns out with the help of Fusion Log I found 1 file that was 0kb in size: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll
I restored the file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.ServiceModel.Activities.dll and it worked again!
I'm getting the same error message as in this question: Could not load type 'Microsoft.Cct.Services.Sqm.IWatSqmService' Unfortunately, I cannot upgrade to Azure SDK 2.9, as the top answer there suggests.
Specifically, I get this error in a message box whenever I try to package my Azure Cloud Service project:
What's interesting is that I can start the same project in the emulator, which I would assume involves packaging it.
Things I've tried:
Ensuring that I only have version 2.8.2 of the emulator installed (I may have had 2.9 installed initially)
Reinstalling version 2.8.2 of the SDK
Manually copying the Windows Azure Tools from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 to the v14.0 equivalent.
Ensuring that C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.8 exists
Reinstalling Visual Studio (so you know I'm desperate!)
And I've no idea what to try next. I can't work out which DLL is supposed to hold the Microsoft.VisualStudio.WindowsAzure.Services assembly, I can't find any references in any config files, and all the Google hits seem to point back to the SO question linked above.
What's going on? And how can I fix it?
In case I'm being an idiot, here's all the Azure-related things I've got installed:
Also (just in case it's relevant) I'm on Windows 7 SP1.
Update 17/01/16
Following some advice from the excellent Rest Azured Slack channel, I've tried using ProcMon and Fusion Log to diagnose this (spoiler: without success)
ProcMon filtered to that assembly returns nothing:
Fusion log (set to log everything) yields lots of entries like this:
* Assembly Binder Log Entry (17/01/2017 # 11:52:02) *
The operation was successful. Bind result: hr = 0x0. The operation
completed successfully.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under
executable C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\devenv.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: DisplayName = Microsoft.VisualStudio.WindowsAzure.Services, Version=1.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio
14.0/Common7/IDE/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = devenv.exe Calling assembly
: Microsoft.VisualStudio.WindowsAzure, Version=2.9.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
=== WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with
Assembly.Load(). WRN: No matching native image found. LOG: IL assembly
loaded from C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\Extensions\Microsoft\Windows Azure Tools\Microsoft.VisualStudio.WindowsAzure.Services.dll.
When I explore the DLL mentioned, I can find Microsoft.Cct.Services.Sqm, but it doesn't contain a type IWatSqlService:
This feels like it's the crux of the issue, but I've no idea what to do next. Presumably I'd need to replace the DLL with a version that does define IWatSqlService, but I'm not sure where I'd get one. Or, for that matter, why it would even be necessary.
Next stop is probably a full wipe of the machine.
I've had the same problem, and solved it by not using the Web Platform Installer.
Download all parts (Microsoft Azure SDK for .NET - 2.8.2) from the Microsoft site: https://www.microsoft.com/en-us/download/details.aspx?id=50041 and follow the instructions how to install them.
For anyone else with this problem. I ended up resolving this by nuking it from orbit. Fresh install of Windows, reinstall VS and the SDK.
Confusingly, you can also see this error when you add a new
<setting name="TODO" />
element to your *.csdef file but either:
forget to add the corresponding <setting name="TODO" value="TODO" /> element to every *.cscfg file, or
accidentally add a duplicate <setting name="TODO" value="TODO" /> element to any of the *.cscfg files.
I have finally succeeded converting my desktop app to AppX with Desktop App Converter, and to sign it with the insight from Franklin Chen.
Step by step, I am getting closer to completion. But I am now bumping into a new hurdle (hopefully the last). I tried to follow the advice at
https://blogs.msdn.microsoft.com/vcblog/2016/07/07/using-visual-c-runtime-in-centennial-project/
I did install on my machine vc_uwpdesktop.110.exe, vc_uwpdesktop.120.exe and vc_uwpdesktop.140.exe.
But still not joy. When I try to install the AppX, I get this error message :
Ask the developer for a new app package. This
package may conflict with a package already
installed, or it depends on things not installed
here (package dependencies), or is made for a
different architecture (0x80073CF3)
20161015 - More information :
I tried to use add-appxpackage as instructed.
PS C:\Windows\system32> add-appxpackage –register C:\output\CheckWriterIII\PackageFiles\AppxManifest.xml
Here is the result on the command line :
add-appxpackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.
Windows cannot install package CheckWriterIII_3.2.0.0_x86__eqr0y32pbpypt because this package depends on a framework that could not
be found. Provide the framework "Microsoft.VCLibs.120.00.UWPDesktop" published by "CN=Microsoft Corporation, O=Microsoft
Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and minimum version 12.0.40652.5, along
with this package to install. The frameworks with name "Microsoft.VCLibs.120.00.UWPDesktop" currently installed are: {}
NOTE: For additional information, look for [ActivityId] 147c2bae-26c2-0005-268c-7c14c226d201 in the Event Log or use the command
line Get-AppxLog -ActivityID 147c2bae-26c2-0005-268c-7c14c226d201
At line:1 char:1
+ add-appxpackage –register C:\output\CheckWriterIII\PackageFiles\AppxM ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\output\Check...ppxManifest.xml:String) [Add-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
As instructed, I have fetched the log :
PS C:\Windows\system32> Get-AppxLog -ActivityID
147c2bae-26c2-0005-268c-7c14c226d201
Time ID Message
---- -- ------- 10/15/2016 5:41:58 PM 301 The calling process is powershell.exe 10/15/2016 5:41:58
PM 603 Started deployment Register operation on a package
with main parameter: AppxManifest.xml and
Options: DevelopmentModeOption. See http://go.microsoft.com/fwlink/?LinkId=235160 for help
diagnosing app deployment issues. 10/15/2016 5:41:58 PM 10002 Creating Resiliency
File
C:\ProgramData\Microsoft\Windows\AppRepository\76c1ec66-a626-417f-be
73-95fd9ce4b88f_S-1-5-21-2501171662-860024267-76414939-1001_1.rslc for
Register Operation on
Package CheckWriterIII_3.2.0.0_x86__eqr0y32pbpypt. 10/15/2016 5:41:58 PM
607 Deployment Register operation on package
CheckWriterIII_3.2.0.0_x86__eqr0y32pbpypt has been
de-queued and is running for user DESKTOP-V1EBBS5\mitch. 10/15/2016 5:41:58 PM 613
Adding uri to the list of Uris:
C:\output\CheckWriterIII\PackageFiles\AppxManifest.xml. 10/15/2016
5:41:58 PM 628 Windows cannot install package
CheckWriterIII_3.2.0.0_x86__eqr0y32pbpypt because this
package depends on a framework that could not be found. Provide the framework
"Microsoft.VCLibs.120.00.UWPDesktop" published by "CN=Microsoft
Corporation, O=Microsoft
Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and
minimum version 12.0.40652.5, along with this package to install. The frameworks with name
"Microsoft.VCLibs.120.00.UWPDesktop" currently installed are: {}
10/15/2016 5:41:58 PM 605 The last successful state
reached was Indexed. Failure occurred before reaching the next
state Resolved. hr: 0x80073CF3 10/15/2016 5:41:58 PM 401 Deployment Register operation
with target volume C: on Package
CheckWriterIII_3.2.0.0_x86__eqr0y32pbpypt from: (AppxManifest.xml)
failed with error
0x80073CF3. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
deployment issues. 10/15/2016 5:41:58 PM 404 AppX Deployment operation failed for
package CheckWriterIII_3.2.0.0_x86__eqr0y32pbpypt with
error 0x80073CF3. The specific error text for this failure is: Windows cannot install
package CheckWriterIII_3.2.0.0_x86__eqr0y32pbpypt because this package depends
on a
framework that could not be found. Provide the framework
"Microsoft.VCLibs.120.00.UWPDesktop" published by "CN=Microsoft
Corporation, O=Microsoft
Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and
minimum version 12.0.40652.5, along with this package to install. The frameworks with name
"Microsoft.VCLibs.120.00.UWPDesktop" currently installed are: {}
Now I don't understand why it does not find Microsoft.VCLibs.120.00.UWPDesktop. I have downloaded and installed vc_uwpdesktop.120.exe 12.0.40653.00 and double verify it as not only in programs and features, but on the disk where it is supposed to be.
Thanks for the update. That confirms what the problem is. It was actually described in your original post, but it's quite subtle:
I did install on my machine vc_uwpdesktop.110.exe, vc_uwpdesktop.120.exe and vc_uwpdesktop.140.exe.
Unfortunately this did not do what you think. It installed the .appx files that can be used to redistribute the framework dependencies. It did not actually install the framework dependencies themselves.
To install them, you have to find the .appx files they installed (or at least the 120 x86 version) and ensure they are also installed. You can do so directly with the App Installer, with Add-AppxPackage separately (and ahead of time), or, I believe, as part of your package's installation by referencing the framework dependency in a -DependencyPath argument.
The path to the .appx file in question looks something like this; tweak the version numbers and platform for your case as required. Just make sure you don't accidentally use a variant without "Desktop" in its name.
C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs.Desktop.110\14.0\Appx\Retail\x86
Once you install or reference the correct package here, your main package should install (or register) successfully.
I'm using VS 2010 SP1 and I've created a VS setup project to install my app. My app uses a DLL written in C++ so I need to include the VC++ 2010 Runtime Libraries.
One of my users reported getting an error while running my installer and I traced it down to the fact that this user already has the SP1 version of the VC++ 2010 Runtime Library installed. My installer tried to install the non-SP1 version and then quit when it saw a newer version already installed (the SP1 version).
I've confirmed this is the source of the problem here: http://social.microsoft.com/Forums/en/crm/thread/db84d4c3-c58e-4ff9-997f-f4e0116bf043 and http://notepad.patheticcockroach.com/1666/installing-visual-c-2010-and-windows-sdk-for-windows-7-offline-installer-and-installation-troubleshooting/
It seems like the only workaround for users is to uninstall the SP1 runtime library and then run my installer. Obviously this is not ideal so I'm looking for a better solution.
The only one I've come up with is to tell my VS setup project to download the runtime library from Microsoft's SP1 link instead (http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe). I'm a little worried because this feels like a hack. Anyone have any better ideas?
If it's helpful, here's the install log from the user who hit this bug:
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.1 {version}
Running checks for package 'Windows Installer 3.1', phase BuildList
The following properties have been set for package 'Windows Installer 3.1':
Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true
Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
'Windows Installer 3.1' RunCheck result: No Install Needed
Running checks for package 'Visual C++ 2010 Runtime Libraries (x86)', phase BuildList
Running MsiProductCheck with ProductCode '{196BB40D-1578-3D01-B289-BEFC77A11A1E}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ 2010 Runtime Libraries (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ 2010 Runtime Libraries (x86)' RunCheck result: Install Needed
Running checks for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)', phase BuildList
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client'
Read string value '4.0.30319'
Setting value '4.0.30319 {string}' for property 'DotNet40Client_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)':
Property: [DotNet40Client_TargetVersion] = 4.0.30319 {string}
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Client_TargetVersion' and value '4.0.30129': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4 Client Profile (x86 and x64)' RunCheck result: No Install Needed
Installation of components 'Visual C++ 2010 Runtime Libraries (x86)' was accepted.
Copying files to temporary directory "C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\"
Downloading files to "C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\"
(14-12-2011 14:03:32) Downloading 'vcredist_x86\vcredist_x86.exe' from 'http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x409' to 'C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\'
Download completed at 14-12-2011 14:05:00
Verifying file integrity of C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe
WinVerifyTrust returned 0
File trusted
Running checks for package 'Visual C++ 2010 Runtime Libraries (x86)', phase BeforePackage
Running MsiProductCheck with ProductCode '{196BB40D-1578-3D01-B289-BEFC77A11A1E}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ 2010 Runtime Libraries (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ 2010 Runtime Libraries (x86)' RunCheck result: Install Needed
Verifying file integrity of C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe
WinVerifyTrust returned 0
File trusted
Installing using command 'C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe' and parameters ' /q:a '
Process exited with code 5100
Status of package 'Visual C++ 2010 Runtime Libraries (x86)' after install is 'InstallFailed'
Predefined prerequisites in Visual Studio setup projects are not very good. The fact that they are rarely updated is also a problem.
So the best solution is to create your own custom prerequisite. Visual Studio setup projects do not support custom prerequisite creation. However, it can be done by manually generating the required manifests.
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
This way you can select the prerequisite in your setup project property pages.
Your custom prerequisite can detect both the original runtime and the SP1. You can find the SP1 detection criteria here: http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx
I was able to solve this by adding the target output of my c++ DLL to the setup project. Once I did this, the setup project automatically bundled the appropriate c++ dll's with my installer and now everything runs fine.
The original problem was caused by the fact that I had manually checked "C++ Runtime libraries" in the setup project's prerequisites.
#Cosmin Pirvu -- your solution may work, but this is what I ended up doing.
I created a setup project with VS2005 for an application that I'm developing, which installs fine on Windows 2000 and XP, but when I try to run the installer on Vista, it gives the following error:
There is a problem with this Windows
Installer package. A program required
for this install to complete could not
be run.
This error occurs at the very end of the install process, after it has already copied all of the files over to the disk, and it's occurring when it tries to run my custom actions executable.
The custom actions binary is a file called InstallCustom.exe, and is written in C++. It is very basic, and just handles the Install, Commit, Uninstall, and Rollback actions and does nothing more than set some registry entries and fire off a couple batch scripts to finalize the install.
I ran SXSTrace during the install to see what it was failing on and got the following trace:
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = x86
CultureFallBacks = en-US;en
ManifestPath = C:\Program Files\MyApp\InstallCustom.exe
AssemblyDirectory = C:\Program Files\MyApp\
Application Config File =
-----------------
INFO: Parsing Manifest File C:\Program Files\MyApp\InstallCustom.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053"
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\Windows\WinSxS\manifests\x86_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_516c10c30f4aae68.manifest
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
ERROR: Activation Context generation failed.
End Activation Context Generation.
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = x86
CultureFallBacks = en-US;en
ManifestPath = C:\Program Files\MyApp\InstallCustom.exe
AssemblyDirectory = C:\Program Files\MyApp\
Application Config File =
-----------------
INFO: Parsing Manifest File C:\Program Files\MyApp\InstallCustom.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053"
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\Windows\WinSxS\manifests\x86_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_516c10c30f4aae68.manifest
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
ERROR: Activation Context generation failed.
End Activation Context Generation.
As you can see, it is failing to find Microsoft.VC80.CRT, the Visual C++ runtime dll.
The weird thing is that this runtime is already included in the installer, by adding the merge modules: "Microsoft_VC80_CRT_x86.msm" and "policy_8_0_microsoft_vc80_crt_x86.msm"
However, I suspect that these merge modules don't actually get applied until after this error is occurring...
But I have not been able to figure out how to include these needed files before the InstallCustom.exe runs. I've even tried copying the runtime over to the directory that file is in before the install.
Is there anyway to fix this issue? And why would this not be an issue on XP and 2000, but on Vista...I would think it should have this runtime.
You should use static version of the CRuntime (if possible), it is best practice that custom action will have as little as possible prerequisites. It will make the custom action a little bit bigger (in 10th of KB range) but it's worth it.
To compile using the static CRuntime library goto Project Properties\C/C++\Code Generation\Runtime Library.
Don't forget that if your exe needs other dll that require that version of CRuntime they also need to compile use the static version.