FIX: Error message when you use DEVPATH environment variables in a .NET Framework 2.0 ASP.NET Web application: "Could not load file or assembly '<AssemblyName>' or one of its dependencies"

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

On This Page

SYMPTOMS

When assemblies are loaded for the first time in a Microsoft .NET Framework 2.0 ASP.NET Web application, you receive the following error message:
System.IO.FileNotFoundException
Could not load file or assembly 'AssemblyName' or one of its dependencies. The system cannot find the file specified.
You may receive this error message if the following conditions are true:
  • The .NET Framework 2.0 ASP.NET Web application references one or more class library assemblies.
  • You create DEVPATH environment variables so that these assemblies locate the version of the assemblies that you want to use.
This problem does not occur if you use Microsoft ASP.NET 1.1 to develop the application.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft .NET Framework 2.0 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Restart information

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix replaces the hotfixes that are described in the following articles in the Microsoft Knowledge Base:
917507 FIX: JIT compilation may take much longer when you run a .NET Framework 2.0 application on a 64-bit computer
917882 FIX: A synchronized method that has security callouts may not save a return value after control returns to the calling function in an application that is built by using the 64-bit version of the .NET Framework 2.0
919514 FIX: When you use the MSIL Assembler in the .NET Framework 2.0 to generate a PE file from the MSIL code, the PE file may close unexpectedly, and you may receive an access violation error message
923319 FIX: Error message when you compile MSIL code into an executable program in the .NET Framework 2.0: "IndexOutOfRangeException"
928208 FIX: Custom applications that use the Visual Studio for Applications Visual Basic Runtime may be unable to compile macros or to run macros

Hotfix file information

This hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain all the files that you must have to fully update a product to the latest build.

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.
The .NET Framework 2.0, x86-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.796802,30424-Jan-200718:54x86
Mscorjit.dll2.0.50727.796326,65624-Jan-200718:54x86
Mscorlib.dll2.0.50727.7964,308,99224-Jan-200718:54x86
Mscorpe.dll2.0.50727.796102,91224-Jan-200718:54x86
Normalization.dll2.0.50727.79615,36024-Jan-200718:54x86
Peverify.dll2.0.50727.796136,19224-Jan-200718:54x86
Sos.dll2.0.50727.796382,46424-Jan-200718:54x86
Vsavb7rt.dll8.0.50727.7961,330,68824-Jan-200718:54x86
The .NET Framework 2.0, x64-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.7961,597,44024-Jan-200710:43x64
Mscordacwks.dll2.0.50727.796802,30424-Jan-200718:54x86
Mscorjit.dll2.0.50727.7961,587,71224-Jan-200710:41x64
Mscorjit.dll2.0.50727.796326,65624-Jan-200718:54x86
Mscorlib.dll2.0.50727.7963,960,83224-Jan-200714:00x64
Mscorlib.dll2.0.50727.7964,308,99224-Jan-200718:54x86
Mscorpe.dll2.0.50727.796157,18424-Jan-200710:36x64
Mscorpe.dll2.0.50727.796102,91224-Jan-200718:54x86
Mscorpjt.dll2.0.50727.7962,004,99224-Jan-200710:42x64
Mscorwks.dll2.0.50727.79610,320,89624-Jan-200710:39x64
Mscorwks.dll2.0.50727.7965,625,34424-Jan-200718:54x86
Normalization.dll2.0.50727.79618,43224-Jan-200710:40x64
Normalization.dll2.0.50727.79615,36024-Jan-200718:54x86
Peverify.dll2.0.50727.796205,82424-Jan-200710:41x64
Peverify.dll2.0.50727.796136,19224-Jan-200718:54x86
Sos.dll2.0.50727.796480,76824-Jan-200710:50x64
Sos.dll2.0.50727.796382,46424-Jan-200718:54x86
Vsavb7rt.dll8.0.50727.7961,330,68824-Jan-200718:54x86
The .NET Framework 2.0, Itanium architecture versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.7962,719,23224-Jan-200710:45IA-64
Mscordacwks.dll2.0.50727.796802,30424-Jan-200718:54x86
Mscorjit.dll2.0.50727.7962,705,92024-Jan-200710:43IA-64
Mscorjit.dll2.0.50727.796326,65624-Jan-200718:54x86
Mscorlib.dll2.0.50727.7963,960,83224-Jan-200714:10IA-64
Mscorlib.dll2.0.50727.7964,308,99224-Jan-200718:54x86
Mscorpe.dll2.0.50727.796313,85624-Jan-200710:36IA-64
Mscorpe.dll2.0.50727.796102,91224-Jan-200718:54x86
Mscorpjt.dll2.0.50727.7963,501,05624-Jan-200710:43IA-64
Mscorwks.dll2.0.50727.79621,309,44024-Jan-200710:41IA-64
Mscorwks.dll2.0.50727.7965,625,34424-Jan-200718:54x86
Normalization.dll2.0.50727.79644,03224-Jan-200710:42IA-64
Normalization.dll2.0.50727.79615,36024-Jan-200718:54x86
Peverify.dll2.0.50727.796383,48824-Jan-200710:43IA-64
Peverify.dll2.0.50727.796136,19224-Jan-200718:54x86
Sos.dll2.0.50727.796862,72024-Jan-200710:53IA-64
Sos.dll2.0.50727.796382,46424-Jan-200718:54x86
Vsavb7rt.dll8.0.50727.7961,330,68824-Jan-200718:54x86
Windows Vista, x86-based versions
Collapse this tableExpand this table
File name File version File size Date Time Platform
Mscorlib.dll 2.0.50727.821 4,308,992 22-Mar-2007 22:14 x86
Mscordacwks.dll 2.0.50727.821 802,304 16-Apr-2007 22:53 x86
Mscorjit.dll 2.0.50727.312 326,656 16-Apr-2007 22:53 x86
Mscorpe.dll 2.0.50727.312 102,912 16-Apr-2007 22:53 x86
Mscorwks.dll 2.0.50727.821 5,633,024 16-Apr-2007 22:53 x86
Normalization.dll 2.0.50727.821 15,360 16-Apr-2007 22:53 x86
Peverify.dll 2.0.50727.312 136,192 16-Apr-2007 22:53 x86
Sos.dll 2.0.50727.312 382,464 16-Apr-2007 22:53 x86
Vsavb7rt.dll 8.0.50727.812 1,330,688 16-Apr-2007 22:53 x86
Windows Vista, x64-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Mscorlib.dll2.0.50727.8213,960,83222-Mar-200722:13x64
Mscordacwks.dll2.0.50727.8211,597,44022-Mar-200722:13x64
Mscorjit.dll2.0.50727.3121,588,22407-Jan-200705:30x64
Mscorpe.dll2.0.50727.312157,18407-Jan-200705:30x64
Mscorwks.dll2.0.50727.82110,334,20822-Mar-200722:13x64
Normalization.dll2.0.50727.82118,43222-Mar-200722:13x64
Peverify.dll2.0.50727.312205,82407-Jan-200705:31x64
Sos.dll2.0.50727.312480,76807-Jan-200705:31x64
Mscorlib.dll2.0.50727.8214,308,99222-Mar-200722:14x86
Mscordacwks.dll2.0.50727.821802,30416-Apr-200722:53x86
Mscorjit.dll2.0.50727.312326,65616-Apr-200722:53x86
Mscorpe.dll2.0.50727.312102,91216-Apr-200722:53x86
Mscorwks.dll2.0.50727.8215,633,02416-Apr-200722:53x86
Normalization.dll2.0.50727.82115,36016-Apr-200722:53x86
Peverify.dll2.0.50727.312136,19216-Apr-200722:53x86
Sos.dll2.0.50727.312382,46416-Apr-200722:53x86

STATUS

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

MORE INFORMATION

You must apply this hotfix to the assemblies that are explicitly referenced from other assemblies or from the ASP.NET Web application.

Sometimes, assemblies that exist in the DEVPATH location may not be found even though you have applied this hotfix. For example, an application contains the following code to reference the DevPathClassLibrary.dll assembly and to reference the MyCustomControl.dll assembly by their partial names.
<%@ Assembly Name="DevPathClassLibrary" %>
<%@ Register TagPrefix="SimpleControlSamples" Namespace="MyCustomControl" Assembly="MyCustomControl" %>
If these assemblies exist in the DEVPATH location, the assemblies are not found. This occurs because later versions of the common language runtime (CLR) do not support the loading of assemblies by partial name. This is a design change from earlier versions of the CLR.

To work around this change, make sure that all assemblies that are referenced by using partial names have strong names. Also, make sure that the assemblies use the qualifyAssembly element in the configuration file for the application. When the assemblies use the qualifyAssembly element, the application redirects the partial name to the strong-named assembly that you install in the global assembly cache. Then, you can put the version of the assembly that you want to use in the DEVPATH location. The application loads this assembly instead of the copy that exists in the global assembly cache.

For more information about the DEVPATH location, visit the following Microsoft Developer Network (MDSN) Web sites:
http://msdn2.microsoft.com/en-us/library/cd71chf0(vs.80).aspx

http://msdn2.microsoft.com/en-us/library/cskzh7h6.aspx
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

REFERENCES

For more information about this issue, click the following article number to view the article in the Microsoft Knowledge Base:
915430 FIX: Not all paths that are specified in the DEVPATH environment variable will be considered by the .NET binding infrastructure (fusion) in the .NET Framework 2.0

Properties

Article ID: 931338 - Last Review: October 8, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft .NET Framework 2.0
Keywords: 
kbvistasp1fix kbexpertiseadvanced kbfix kbqfe KB931338

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