Troubleshooting 1935 and 2908 errors during installation

Hey all, first off I want to apologize for not posting anything in a couple of weeks. I have had a couple of mini-vacations and been wrapped up with some other stuff, but I'm back now! I've been working with some Product Support folks I know to turn some documents I wrote for internal troubleshooting into knowledge base articles, and I decided that I wanted to go ahead and post some of the information here so it would be available sooner rather than later. The first installment is some detailed information about the dreaded 1935 (or 2908) error that sometimes happens when trying to install the .NET Framework or other MSI-based products that install managed assemblies to the GAC. This is a long post, but hopefully with some useful info. Let me know if you see any scenarios not covered by this information or have any questions....

 

1935 Errors in Setup

Abstract

The following document describes causes of 1935 errors during .NET Framework, J# redistributable package, language pack, or Visual Studio setup. It also explains how to diagnose the root cause of a 1935 error and workaround or fix the error.

Introduction

A 1935 error is one of the most common problems that can prevent a user from being able to install the .NET Framework, J# redistributable package, Visual Studio or any other application that uses the Windows Installer MSIAssembly and MSIAssemblyName tables to install assemblies.

In general, this error means that Windows Installer encountered an error while trying to install assemblies to the Global Assembly Cache (GAC) or the Win32 GAC (WinSxS). This error is considered fatal and causes setup to fail and initiate rollback.

If the setup is run in UI mode, the user will see a message box indicating that a 1935 error occurred, and it will list the HRESULT and the Windows Installer component GUID of the assembly that caused the error. If the setup is run in silent mode, the user will see no visible error. In both cases, more detailed information about the error can be found in the Windows Installer verbose log file.

Affected Products

· .NET Framework 1.0

· .NET Framework 1.1

· .NET Framework 1.1 language packs

· Visual J# .NET redistributable 1.1

· Visual J# .NET redistributable 1.1 language packs

· Visual Studio .NET 2002 (all versions)

· Visual Studio .NET 2003 (all versions)

Finding log information for 1935 errors that occur during setup

Where to find the log files

In order to diagnose the cause of a 1935 error, it is first necessary to locate information in the Windows Installer verbose log. If the error occurred during Visual Studio setup or during the .NET Framework or J# redistributable setups that are run as a part of Visual Studio Prerequisites (or Windows Component Update) setup, verbose logging is enabled by default. The log files vsmsilog*.txt, netfx.log, or jsredistmsi.log in %temp% will provide the necessary information, depending on which product’s setup failed.

If the error occurs during standalone setup for the .NET Framework, .NET Framework SDK or J# redistributable package setup, it will be necessary to rerun the failing setup with an extra command line parameter to enable Windows Installer verbose logging in order to produce a log file with the necessary information to debug the failure. To enable verbose logging, rerun the setup with the following command line syntax:

Product

Command line syntax

Log file location

.NET Framework

dotnetfx.exe /c:”install.exe /l”

%temp%\netfx.log

.NET Framework SDK

setup.exe /c:”install.exe /l”

%temp%\netfxsdk.log

.NET Framework Language Pack

langpack.exe /c:”inst.exe /l”

%temp%\langpackmsi.log

J# Redistributable Package

vjredist.exe /c:”inst.exe /l”

%temp%\jsredistmsi.log

J# Redistributable Package Language Pack

Vjredist-LP.exe /c:”inst.exe /l”

%temp%\langpackmsi.log

Note: The log file location can be controlled by passing a full path after the /l switch to install.exe or inst.exe. The locations listed in the table are the default locations if no path is provided.

Where to find error information in the log file

To pinpoint the cause of a 1935 error, search for the string return value 3 in a verbose Windows Installer log file. This will show the exact point in which setup failed and initiated a rollback. The following is an example of the information written to a Windows Installer verbose log file in the case of a 1935 error:

Error 1935.An error occured during the installation of assembly component {7D4B5591-4C80-42BB-B0E5-F2C0CEE02C1A}. HRESULT: -2146234301. assembly interface: IAssemblyCacheItem, function: Commit, assembly name: Microsoft.Vsa.Vb.CodeDOMProcessor,Version="7.0.5000.0", PublicKeyToken="b03f5f7f11d50a3a", Culture="neutral",FileVersion="7.10.3052.4", ProcessorArchitecture="neutral"

In this example, the assembly named Microsoft.Vsa.Vb.CodeDOMProcessor.dll failed to install properly due to an error with HRESULT value -2146234301.

List of causes of 1935 errors and their HRESULT values

There are many different underlying causes of a 1935 error, each represented by a different HRESULT. Once you locate the information in the Windows Installer verbose log file indicating which assembly is causing the error and what the HRESULT of the error is, you can use the table below to determine more specific information about the cause:

Return type

Return code

HRESULT

Description of error

TYPE_E_DLLFUNCTIONNOTFOUND

0x8002802F

-2147319761

Function not defined in specified DLL

ERROR_ACCESS_DENIED

0x7FF8FFFB

-2147024891

Access is denied

COR_E_MODULE_HASH_CHECK_FAILED

0x80131039

-2146234311

The check of the module's hash failed

FUSION_E_REF_DEF_MISMATCH

0x80131040

-2146234304

The located assembly's manifest definition does not match the assembly reference

FUSION_E_INVALID_PRIVATE_ASM_LOCATION

0x80131041

-2146234303

The private assembly was located outside the app-base directory

FUSION_E_ASM_MODULE_MISSING

0x80131042

-2146234302

A module specified in the manifest was not found

FUSION_E_UNEXPECTED_MODULE_FOUND

0x80131043

-2146234301

Modules which are not in the manifest were streamed in

FUSION_E_PRIVATE_ASM_DISALLOWED

0x80131044

-2146234300

A strongly-named assembly is required

FUSION_E_SIGNATURE_CHECK_FAILED

0x80131045

-2146234299

The check of the signature failed

FUSION_E_DATABASE_ERROR

0x80131046

-2146234298

An unexpected error was encountered in the Assembly Cache database

FUSION_E_INVALID_NAME

0x80131047

-2146234297

The given assembly name or code-base is invalid

FUSION_E_CODE_DOWNLOAD_DISABLED

0x80131048

-2146234296

HTTP download of assemblies has been disabled for this app-domain

FUSION_E_UNINSTALL_DISALLOWED

0x80131049

-2146234295

Uninstall of given assembly is not allowed

FUSION_E_NGEN_DEPENDENCY_NOT_FOUND

0x80131050

-2146234288

One of the native image dependencies cannot be found

FUSION_E_NGEN_INDEX_CORRUPTED

0x80131051

-2146234287

ngen index corrupted

NOTE: The Windows Installer team created separate error codes for 3 of the above return types starting with the version that shipped with Windows Server 2003. The following are the new error codes and the return types they correspond to in Windows Server 2003 and in versions of Windows Installer greater than 2.0 (all other return types from the above table continue to be represented by error code 1935):

Error code

Return Type

1936

FUSION_E_PRIVATE_ASM_DISALLOWED

1937

FUSION_E_SIGNATURE_CHECK_FAILED

1938

FUSION_E_ASM_MODULE_MISSING

Resolving 1935 errors that occur during setup

Most of the above HRESULT values in the table of 1935 errors above indicate some kind of setup authoring problem, and they require that the MSI package or some of the files in the package be patched and repackaged. All return types that begin with FUSION fit into this category.

1935 errors with HRESULT -2147319761 (function not defined in specified dll)

The most common source of a 1935 error is HRESULT -2147319761 (which means that a function is not defined in specified DLL). This error is typically caused by a mismatch or incompatibility between the version of mscoree.dll in the Windows system directory and the version needed by the product being installed. Often this can occur if a user has a previous beta version or technology preview build of the .NET Framework installed on their machine (even if they then uninstall it).

There are several possible ways to workaround this type of 1935 error. The workarounds depend on the product being installed and the OS that the product is being installed on. Refer to the sections below for more details for the individual products.

.NET Framework

This workaround applies to all versions of the .NET Framework.

The following steps will fix most cases of a 1935 error with HRESULT -2147319761 on operating systems that do not contain the .NET Framework as part of the operating system (applies to Windows 98, Windows Me, Windows NT 4, Windows 2000, and Windows XP except as noted below):

  1. Rename the file %windir%\system32\mscoree.dll (or %windir%\system\mscoree.dll on Windows 98 and Windows Me). Also, please take note of what the version of this file is to aid in tracking down why this error is occurring.

  2. Delete the folder %windir%\system32\urttemp (or %windir%\system\urttemp on Windows 98 and Windows Me) if it exists.

  3. Re-run the .NET Framework setup that failed originally.

Because the .NET Framework ships as part of the OS for Windows XP Tablet PC Edition, Windows XP Media Center Edition and Windows Server 2003, it is dangerous to delete mscoree.dll from the system directory because it can affect OS functionality. In some cases, it is impossible to delete this file because it is under system file protection. The following steps will fix most cases of a 1935 error with HRESULT -2147319761 on these OS types:

  1. Rename the file %windir%\system32\mscoree.dll. Also, please take note of what the version of this file is to aid in tracking down why this error is occurring.

  2. Extract the file mscoree.dll from netfx.cab in the i386 directory of your original OS installation media or network path.

  3. Copy mscoree.dll from netfx.cab to %windir%\system32.

  4. Re-run the .NET Framework setup that failed originally.

NOTE: This error should not ever be seen for .NET Framework v1.1 on Windows Server 2003 because .NET Framework v1.1 shipped as part of the operating system, and the Windows Installer package for this version should block if a user attempts to install it on this OS. This error should also not ever be seen for .NET Framework v1.0 on Windows XP Tablet PC or Media Center editions because .NET Framework v1.0 shipped as part of the OS.

J# Redistributable Package, Language Packs, and Visual Studio

In most cases, a 1935 error with HRESULT -2147319761 during installation of the J# redistributable package, .NET Framework or J# redistributable package languages packs, or Visual Studio will require a repair of the highest version of the .NET Framework currently installed on the machine.

If you have the .NET Framework installed via a Windows Installer MSI package, you can perform the following steps to repair the .NET Framework:

  1. Rename the file %windir%\system32\mscoree.dll (or %windir%\system\mscoree.dll on Windows 98 and Windows Me). Also, please take note of what the version of this file is to aid in tracking down why this error is occurring.

  2. Delete the folder %windir%\system32\urttemp (or %windir%\system\urttemp on Windows 98 and Windows ME) if it exists.

  3. If you are trying to repair the .NET Framework v1.0, locate the file repair.htm in the folder %windir%\Microsoft.NET\Framework\v1.0.3705 and follow the instructions on that page.

  4. If you are trying to repair the .NET Framework v1.1, locate the file repairRedist.htm in the folder %windir%\Microsoft.NET\Framework\v1.1.4322\1033 and follow the instructions on that page.

  5. Rerun the setup that failed originally.

If you have the .NET Framework installed as part of the operating system and find that it needs to be repaired, you should first try the following steps:

  1. Rename the file %windir%\system32\mscoree.dll. Also, please take note of what the version of this file is to aid in tracking down why this error is occurring.

  2. Extract the file mscoree.dll from netfx.cab in the i386 directory of your original OS installation media or network path.

  3. Copy mscoree.dll from netfx.cab to %windir%\system32.

  4. Re-run the setup that failed originally.

If these steps fail, you may need to rerun OS setup to trigger a repair of the entire .NET Framework.

What to do if the above troubleshooting steps do not work

In some cases, the 1935 error with HRESULT -2147319761 can be caused by orphaned registry keys from a different version of the .NET Framework, and replacing mscoree.dll or repairing the .NET Framework will not fix the error. In these cases, try to look in the registry key HKLM\Software\Microsoft\.NETFramework and look for any sub-keys or values containing version numbers of previous builds of the .NET Framework. If any are present, rename or delete them, then try to rerun the previously failing setup.

In addition if you are trying to install the .NET Framework v1.0, delete the following registry keys and any sub-keys and values, if present:

· HKLM\Software\Microsoft\NET Framework Setup\Full

· HKLM\Software\Microsoft\NET Framework Setup\Product

NOTE:   Be very careful when directly modifying the registry in this way, particularly on operating systems where the .NET Framework ships as part of the OS. It is always recommended to backup your registry prior to making direct modifications to it so that you can roll back to a known state.

If there are no orphaned registry keys or deleting orphaned keys did not fix the problem, it may be necessary to completely uninstall and reinstall the highest version of the .NET Framework on the machine. This can be done by locating the entry in the Add/Remove Programs control panel applet and choosing to uninstall, then reinstalling from the original source.

If uninstalling and reinstalling also does not work, it may be necessary to perform a manual removal of the highest version of the .NET Framework on the machine.

NOTE: Manual removal is not recommended and can be very dangerous if the .NET Framework shipped as part of the operating system. In these cases, it is recommended to repair the OS by rerunning OS setup.

Additional Information

· https://support.microsoft.com/default.aspx?scid=kb;en-us;308096

· https://support.microsoft.com/default.aspx?scid=kb;en-us;824643

· https://support.microsoft.com/default.aspx?scid=kb;en-us;830646

· https://support.microsoft.com/default.aspx?scid=kb;en-us;839547

· https://support.microsoft.com/default.aspx?scid=kb;en-us;872904