PRB: "Mscoree.dll Could Not Be Found" Error Message When You Try to Run a .NET Executable File (316091)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition

This article was previously published under Q316091

SYMPTOMS

When you create a .NET application executable (.exe) file, copy the file to a computer on which the .NET Framework is not installed, and then attempt to run the .exe file from that computer, you may receive the following error message (or messages):
Unable to Locate DLL - The Dynamic Link Library mscoree.dll could not be found in the specified path.
Please set registry key HKLM\Software\Microsoft\.NETFramework\InstallRoot to point to the .NET Framework install location.

CAUSE

This behavior occurs if the Microsoft .NET Framework is not installed on the target computer. Applications and controls written for the .NET Framework require that it be installed on the computer on which the application or control runs.

RESOLUTION

To resolve this issue, install the .NET Framework on the target computer. To do this, browse to the following MSDN Web site:

How to Get the Microsoft .NET Framework
http://msdn2.microsoft.com/en-us/netframework/default.aspx

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Create a Microsoft Visual Basic .NET Windows application.

    Form1 is created by default.
  2. Place a command button on Form1, and then double-click to open the code window.
  3. Add the following to the Button1_Click event:
    MessageBox.Show("Hello World")
    					
  4. Save your project, and then build the .exe file for the project.
  5. Copy the .exe file to a computer on which the .NET Framework is not installed, and then attempt to run the file. You receive one or both of the error messages described in the "Symptoms" section of this article.

Modification Type:MajorLast Reviewed:10/17/2006
Keywords:kbDeployment kberrmsg kbprb KB316091