jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Side-by-side error - Microsoft.VC80.CRT

Hi,

After installing my application on Vista I get a side-by-side error when I try to run my application. The event log reports "Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762" could not be found."

The first time I saw this error I added the MergeModule "Microsoft_VC80_CRT_x86_x64.msm" to the installer.

The first time this allowed it to install and run ok.

If I change the application, bump the product version in the installer, rebuild, and reinstall, I get the same error message.

Running the installer again and choosing "repair" always fixes the problem.

Any ideas?

Thanks,

Nick
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

More info...

I have verified the embedded manifest file in the executable - it requires this one CRT assembly.

I have verified that the merge module is part of the install and is the correct version.

I have verified that the runtime libraries of the correct version already exist on the target machine.

I am trying to run one of the applications as a custom action - this fails the the above noted sidebyside error which causes the entire install to fail.

Nick
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Nick,

In order to investigate the problem please sent a small test AIP file reproducing the issue and the generated MSI file to support at advancedinstaller dot com.

Waiting for your reply.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Hi,

After more testing...

1) Installing on a new machine always works.

2) Removing the previous installation and then installing always works.

3) Running the installer when a previous version (differing only in the version number) is already present has a problem. The installation works correctly but when attempting to run our application results in a side-by-side error. The DLL in question ships is present on the machine where expected.

The installer added the following line to the registry which looks to be correct:
>msvcr80.dll\Microsoft.VC80.CRT,type="win32",version="8.0.50727.762",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64"
This line is the same between a failed upgrade and a working clean install.

Could the problem be related to how the installer does the in-place upgrade while preserving rollback?

BTW - Running the installer again and choosing "repair" also fixes the problem.

Nick
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Nick,

We cannot reproduce this behavior on our test computers. Please send a small test project reproducing this issue (send a .zip archive containing the AIP, MSM and project file) to support at advancedinstaller dot com.

Waiting for your reply.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Hi,

Following up on this - we couldn't reproduce it for a while but customers were still complaining.

Figured out how to reproduce it...

The problem is when the application needs the C++ Redistributable merge module AND it is the ONLY installed application to need it AND the application is upgraded.

Steps to reproduce:

1) New Vista install. No applications installed. C++ Redistributable components not installed.

2) Create a installer. Add the Microsoft_VC80_CRT_x86_x64.msm merge module. Add an application executable that needs this merge module to run.

3) Install application on new Vista install. AI installer will install the merge module.

4) Run application - it should work ok.

5) Bump installer version and product code.

6) Install the updated application.

7) Run application - it will fail with a side by side error.

If you uninstall the application and re-install then it will work.

If there is at least one other application installed that has registered this merge module then the application can be upgraded without error (This is why we couldn't reproduce the problem for a while).

The problem only occurs when upgrading an install and only occurs if the application is the only application to install the merge module.

I suspect the merge module is reference counted and AI is uninstalling the merge module as part of the upgrade and not installing it again.

Nick
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Bump.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

After studying this problem we discovered that the cause of this behavior is a Windows Installer bug (many users have encountered it when updating with the automated upgrade feature).

The solution is to edit the merge module with Orca and set the "Version" field for all the files in the "File" table to 65535.65535.65535.65535.
I suspect the merge module is reference counted and AI is uninstalling the merge module as part of the upgrade and not installing it again.
Please note that when adding a merge module to an Advanced Installer project, after building the project the merge module is integrated in the package. Therefore, when uninstalling, only the MSI package will be uninstalled (the merge module is contained by the package).

Regards,
Cosmin
Last edited by Cosmin on Fri Dec 14, 2007 11:42 am, edited 1 time in total.
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Thanks!
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Hi,

The workaround suggested causes the installer to re-install the merge module every upgrade.

This causes AI to ask the user to close all applications that use the vcredist module. If I run an upgrade on my machine it asks me to close:
- Firefox (all windows).
- Thunderbird.
- Visual Studio.
- Advanced Installer.

Are there any other ways to work around the issue?

For example, is there a way to detect how many other apps have registered use of vcredist and only trigger the merge module install if our app is the only application?

Nick
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In order to resolve this problem you need to follow these steps:
- you set the "Permanent" attribute for the component of the merge module (this is done in the "Organization" page)
http://www.advancedinstaller.com/user-g ... rties.html
- in the "Searches" page you create a search for the merge module
http://www.advancedinstaller.com/user-guide/search.html
- you use the property of the search (usually it's RESULT_PROPERTY) to condition the component of the merge module (in the "Organization" page).

This way, the merge module will not be removed by the upgrade process and it will be installed only if it is not found.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jafa
Posts: 51
Joined: Fri Feb 23, 2007 7:13 pm

Hi,

The merge modules are not listed on the Organization page.

Nick
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I forgot to mention that this needs to be done in the merge module (because you need access to the component(s) of the merge module). For this, you can edit the merge module with Orca (since it is not created by you).

In order to add the search to the MSM file you open it with Orca and add the tables "AppSearch", "Signature" and "DrLocator". In the "AppSearch" table you add this property:

Code: Select all

Property                  Signature_
RESULT_PROPERTY.GUID      FileSearchSign.GUID
where "GUID" is the GUID of the merge module.

In the "Signature" table you add this signature:

Code: Select all

FileSearchSign.GUID      my_file.exe
where "my_file" is a file which is present only if the merge module is installed.

Also, you need to add the "DrLocator" table and add a signature similar to this:

Code: Select all

Signature              Path                   Depth
FileSearchSign.GUID    [CommonFilesFolder]    0
This will search the file in the "Program Files\Common Files" folder with the depth 0. Now you can use "RESULT_PROPERTY.GUID" as a condition for the components of the merge module.

Note that "GUID" must be replaced by the actual GUID of the merge module.

A simpler solution is to use patches to upgrade your installation. This way, the merge module will not be uninstalled. You can read more about patches here:
http://www.advancedinstaller.com/user-g ... patch.html
http://www.advancedinstaller.com/user-g ... tches.html
http://www.advancedinstaller.com/user-g ... oject.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
chrisb1980
Posts: 9
Joined: Thu Jul 30, 2009 2:47 pm

Re: Side-by-side error - Microsoft.VC80.CRT

I'm having this issue with the VC90 redistributables. I have installed Orca, and I'm trying to follow your instructions.

My installer uses the following merge modules:
Microsoft_VC90_CRT_x86.msm
policy_9_0_Microsoft_VC90_CRT_x86.msm
Microsoft_VC90_MFC_x86.msm
policy_9_0_Microsoft_VC90_MFC_x86.msm
where "my_file" is a file which is present only if the merge module is installed.
This will search the file in the "Program Files\Common Files" folder with the depth 0. Now you can use "RESULT_PROPERTY.GUID" as a condition for the components of the merge module.
Can you suggest appropriate "my_file" and path values for the VC90 redistributables?

Also, how do I find out the GUID for these merge modules?

Thanks,

Chris
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Side-by-side error - Microsoft.VC80.CRT

Hi Chris,
Can you suggest appropriate "my_file" and path values for the VC90 redistributables?
You can try using one of the files in "File" table. Please note that you should use the long file name, for example "msvcr90.dll".
Also, how do I find out the GUID for these merge modules?
In the "ModuleSignature" table you should find a row with this form:

Code: Select all

<module_name_id>.<module_GUID>
You can copy the <module_GUID> part.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”