.NET Framework - x64 Vista install of MSI failure

Asked By dhmot
04-Sep-09 11:44 AM
Hello,

I am having problems installing an MSI I created with VS 2008 (with or
without SP1) onto an x64 Vista SP1 or SP2 system.  Specifically, I get the
following side-by-side error when the package attempts to execute my
CustomAction routine on installation:

Dependent Assembly
Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found

However, this file
(Microsoft_VC90_CRT_x64.50FC30FE_9758_3B08_B886_7BAABC047B61 &
policy_9_0_Microsoft_VC90_CRT_x64.D8FD5D7A_D7AD_3E2F_9ACB_44D8D43BD919) is in
my Installation project and seems to be present in the MSI when I check the
MSI via Orca.  This MSI installs successfully on x64 XP.  A similar MSI built
for Win32 installs successfully on both XP and Vista.  (FYI: There are
several drivers in this MSI and it was much easier to create two MSIs rather
than one MSI with Win32 & x64).

The only Vista versus XP differences I can find in Orca is in the
for the MSMs.  There are two versions: an "uplevel" and a "downlevel" version
of the MSMs.  The uplevel goes to Vista (VersionNT >= 600) while the
downlevel goes to XP (VersionNT < 600).  The XP version also has a
downlevel_manifest.  There is no corresponding uplevel_manifest.  However,
I am not convinced this is the problem because the Win32 package looks the
same.

I realize I could probably fix this by simply installing the VS
redistributables on the x64 Vista system.  However, I also realize that is
not the correct solution - I do not want an end user of an x64 Vista system
to have to install another package just to get my MSI to install.  I could
also probably statically link in the stuff that I needed, but that is also not
really a correct solution.

I have kind of hit a dead end with my knowledge.  How should I go about trying
to fix this?

Thanks,
Michael
Windows Installer
(1)
Vista
(1)
XP
(1)
VersionNT
(1)
MSIs
(1)
X64
(1)
  Wilson, Phil replied to dhmot
04-Sep-09 12:59 PM
Vista installs the CRT to SxS in the same way that assemblies to the GAC
have always been imstalled by MSI, using the .NET Fusion interfaces. These
have the unfortunate effect that the file is not actually available until
the Commit phase of the install, and this has broken pretty much every
install that used C++ merge modules and runs code (or starts a service) that
depended on them. You might find that a Commit custom action works because
by this time (InstallFinalize) the files are available.

Static linking is another choice, as is installing the C++ runtime
beforehand, as you mentioned.

--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972
  dhmot replied to Wilson, Phil
04-Sep-09 01:43 PM
Phil,

I modified my MSI to run the install custom action during the commit phase
as per your suggestion.  Since I was already performing the "install" during
the commit phase on upgrade, this was no major change.  The package
successfully installed.

I will monitor this thread for a while to see if there is another solution, as
there are possible corner cases where the install could fail.  However, I
prefer your solution to the other two I mentioned (statically linking and
installing the redistributables).

Thanks,
Michael
Create New Account
help
ContentAlignment (1) GraphicsUnit (1) EventHandler (1) FontStyle (1) CheckBox (1) TextBox (1) Is this a Windows Forms application? If so, there ishould be a region titled is not totally packed with InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InvoiceForm)); this.textBox17 = new System.Windows.Forms.TextBox(); this.textBox15 = new System.Windows.Forms.TextBox(); this.textBox7 = new System.Windows.Forms.TextBox(); this.textBox6 = new System.Windows.Forms.TextBox(); this.textBox5 = new System.Windows.Forms.TextBox(); this.textBox4 = new System Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms
Windows Programmier Richtlinien .NET Framework Servus! Kennt jemand einen Link zu Windows-Richlinien bzgl der nutzung vom Verzeichnissen in Programmen? Das ist etwas unpr??zise. Im Speziellen schicken wo derartiges erkl??rt wird. MfG, Ulf C# - German Discussions Visual Studio .NET (1) Windows XP (1) Application.CommonAppDataPath (1) Application.UserAppDataPath (1) Application Compatibility (1) Windows Vista (1) Windows 7 (1) Outlook (1) Hallo Ulf, Einstellungen werden nicht unbedingt im Programm- Verzeichnis persistiert. Es gibt keinen Windows-Richtlinien-Zwang, Einstellungen dort zu persistieren. *Anwendungs* Einstellungen werden von .NET WInForms Programmen oft in
the default "hello world" app (F7), but got some message about "the Standard SDK for Windows CE .NET" and the choosen (not by me!) processor being incompatible and "cannot be run some help / directions. Regards, Rudy Wieser WindowsCE Embedded VC Discussions Pocket PC 2003 SDK (1) Windows Mobile 5.0 (1) Windows XP (1) Virtual PC (1) Internet Explorer 8 (1) Windows Mobile 2003 (1) Visual Studio 2008 (1) Visual Studio 2005 (1) You need to download pointer / link or two. By the way, do you have any idea to why that "Windows Mobile 5.0 Pocket PC SDK" refuses to install (its stated reason does not match http: / / www.pocketpcfaq.com / faqs / comparison / wm50ppcphone.php So now I know you have a Windows Mobile 5 Pocket PC Phone Edition, and so you should use the SDK for that is very fussy about differences between the target platform (Pocket PC 2003) and actual platform (Windows Mobile 5 Pocket PC Phone Edition). Each SDK targets a specific "platform". A "platform" is
How to determine Windows flavor in .NET .NET Framework I did a test using the Environment.OSVersion property on various flavors of the Windows operating system. Here are my results: Windows 7 Ultimate x64 Microsoft Windows NT 6.1.7600.0 Vista Ultimate SP2 x64 Microsoft Windows NT 6.0.6002 Service Pack 2 Windows 7 Ultimate x86 Microsoft Windows NT 6.1.7600.0 Vista Ultimate SP2 x86 Microsoft Windows NT 6.0.6002
top-most or so. . . Any suggestions are really grateful. Thanks!!!! C# Discussions Visual Studio (1) Windows 7 (1) EventHandler (1) Exception (1) EventArgs (1) Class (1) VB (1) XP (1) try { Enabled = false; } finally { Enabled = true; } Thanks a lot Jeff!!!!!!!! it works really fine scenario, but definitely the same root cause): https: / / connect.microsoft.com / VisualStudio / feedback / details / 581382 / windows-taskbar-can-activate-a-non-modal-window-when-a-modal-window-is-active-wpf-winforms use the ShowInTaskbar property to make a dialog box that is not displayed in the Windows taskbar." Each sample has an explicit comment about setting the form's ShowInTaskbar property to form2 to receive focus. . ." If you attempt to reproduce the same behavior with just two windows, one modal and one not, it works differently: selecting the non-modal window from the active window), I see no reason to believe that the behavior is intentional. Even in XP, there were potential reasons to not hide a window's presence in the taskbar, and with the "live" thumbnail views available in Windows 7, there is every reason to want to keep the window there, even when the not be? The OP offered no reason why it is necessary to show the modal windows in the taskbar. Making the window accessible is the source of the unexpected behavior. The