FIX: On a computer that has the .NET Framework 3.5 Service Pack 1 installed, an exception is thrown when an application calls the GetOptionalCustomModifiers method or the GetRequiredCustomModifiers method on a ParameterInfo object of a generic interface

Article translations Article translations
Article ID: 957541 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

You have an application that calls the GetOptionalCustomModifiers method or the GetRequiredCustomModifiers method on the ParameterInfo object of a generic interface. When you run this application on a computer that has the Microsoft .NET Framework 3.5 Service Pack 1 (SP1) installed, an exception is thrown, and you receive an error message that resembles the following:
An unhandled exception of type 'System.ExecutionEngineException' occurred in mscorlib.dll
Additionally, event ID 1023 is logged in the Application log. This event resembles the following:

.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (734E7706) (80131506)

Event ID 1000 may also be logged in the Application log. This event resembles the following:

Faulting application ConsoleApplication1.exe, version 1.0.0.0, time stamp 0x48dce3f5, faulting module mscorwks.dll, version 2.0.50727.3053, time stamp 0x4889dc18, exception code 0xc0000005, fault offset 0x0002d2b5, process id 0x%9, application start time 0x%10.

CAUSE

This problem occurs because of an issue in the .NET Framework 3.5 SP1.

RESOLUTION

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To download this hotfix from the MSDN Code Gallery, visit the following Microsoft Web site:
http://code.msdn.microsoft.com/KB957541

Note The MSDN Code Gallery displays the languages for which the hotfix is available. If you do not see your language listed, it is because the Code Gallery resource page is not available for that language.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note If you must have this hotfix for Windows Server 2008 or for Windows Vista Service Pack 1, obtain hotfix 957542 instead. Hotfix 957542 resolves this issue and is available for those operating systems. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
957542 FIX: On a computer that is running the .NET Framework 3.5 Service Pack 1, the JIT compiler and the Native Image Generator (Ngen.exe) that use the Mscorjit.dll file may generate incorrect code

Prerequisites

You must have the .NET Framework 3.5 SP1 installed to apply this hotfix.

Restart requirement

You may have to restart the computer if any of the files that are updated are being used.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Windows 2000, Windows XP, and Windows Server 2003, x86 versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Mscordacwks.dll2.0.50727.3068992,26416-Sep-200813:13
Mscorlib.dll2.0.50727.30684,546,56016-Sep-200813:13
Mscorwks.dll2.0.50727.30685,815,80816-Sep-200813:13
Windows 2000, Windows XP, and Windows Server 2003, x64 versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.3068992,26416-Sep-200813:13x86
Mscorlib.dll2.0.50727.30684,546,56016-Sep-200813:13x86
Mscorwks.dll2.0.50727.30685,815,80816-Sep-200813:13x86
Mscordacwks.dll2.0.50727.30681,767,94416-Sep-200810:33x64
Mscorlib.dll2.0.50727.30684,562,94416-Sep-200810:33x64
Mscorwks.dll2.0.50727.306810,079,74416-Sep-200810:33x64
Windows 2000, Windows XP, and Windows Server 2003, IA-64 versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.3068992,26416-Sep-200813:13x86
Mscorlib.dll2.0.50727.30684,546,56016-Sep-200813:13x86
Mscorwks.dll2.0.50727.30685,815,80816-Sep-200813:13x86
Mscordacwks.dll2.0.50727.30683,087,88016-Sep-200810:44IA-64
Mscorlib.dll2.0.50727.30684,005,88816-Sep-200810:44IA-64
Mscorwks.dll2.0.50727.306820,153,85616-Sep-200810:44IA-64

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the problem

To reproduce this problem, create a Microsoft Visual C# project, and then run the following code on a computer that has the .NET Framework 3.5 SP1 installed.
using System;
namespace GetCustomModifiersBug
{
    public interface IGenericInterface<T1, T2>
    {
        void GenericIfcMethod<T3>(T3 t3);
    }
    class Program
    {
        static void Main()
        {
            
                Type ifc = typeof(IGenericInterface<int, int>);
                // Either of the following lines on their own will cause the problem
                ifc.GetMethod("GenericIfcMethod").GetParameters()[0].GetOptionalCustomModifiers();
                ifc.GetMethod("GenericIfcMethod").GetParameters()[0].GetRequiredCustomModifiers();
                       
        }
    }
}

REFERENCES

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 957541 - Last Review: October 8, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft .NET Framework 3.5 Service Pack 1
Keywords: 
kbexpertiseadvanced kbfix kbqfe KB957541

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com