You may receive a "Could not find file 'Microsoft.Windows.CommonLanguageRuntime" error message when you build a solution of a Visual Basic 2005 Windows Application project in Visual Studio 2005

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

On This Page

SYMPTOMS

When you build a solution of a Microsoft Visual Basic 2005 Windows Application project in Microsoft Visual Studio 2005, you may receive an error message that is similar to the following:
error MSB3113: Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0'.

CAUSE

This problem may occur if all the following conditions are true:
  • The solution contains an application that has a reference to another application in the same solution.
  • You publish the referenced application to a UNC share or to a Web page.

WORKAROUND

To work around this problem, use a file reference instead of a project reference in the solution of the Visual Basic 2005 Windows Application project.

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

  1. In Visual Studio 2005, create a Visual Basic Windows Application project.
  2. Add a Visual Basic console application to the project that you created in step 1.
  3. In the Visual Basic console application, add a reference to the project that you created in step 1.
  4. Build the solution.
  5. Publish the Visual Basic Windows Application project to a UNC share or to Web page.
  6. Rebuild the solution.

Properties

Article ID: 907757 - Last Review: December 6, 2006 - Revision: 1.3
APPLIES TO
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition
  • Microsoft Visual Basic 2005
Keywords: 
kbdev kbbug kbprb KB907757

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