BUG: "Library not registered" error message when you start a new application project by using Visual C# .NET (823244)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition
  • Microsoft Visual C# .NET (2003)
  • Microsoft Visual C# .NET (2002)

SYMPTOMS

You have Visual Studio .NET 2002 or Visual Studio .NET 2003 installed on your computer. You create a setup project that includes Extensibility and VSLangProj assemblies, and then you install the setup project on your computer.

When you remove the setup project, and then create a new project by using Visual C# .NET, you receive the following error message:
Library not registered

CAUSE

This problem occurs because the setup project adds a dependency to the following files:
  • VSLangProj.dll
  • VsLangProj.tlb
  • Extensibility.dll
  • Extensibility.tlb
When you remove the setup project, the VSLangProj.tlb file and the Extensibility.tlb file are unregistered. However, Visual Basic .NET and Visual C# .NET use these TLB files. When you try to create a new application project, the project cannot find the Extensibility.tlb file and the VSLangProj.tlb file. Therefore, you receive the error message that is described in the "Symptoms" section.

WORKAROUND

To work around this problem, do one of the following:
  • Repair or re-install Visual Studio .NET 2002 or Visual Studio .NET 2003. To do this, follow these steps:
    1. Quit Visual Studio .NET.
    2. In Control Panel, double-click Add or Remove Programs.
    3. Click Microsoft Visual Studio .NET, and then click Change/Remove.
    4. In Microsoft Visual Studio .NET Setup, click Visual Studio .NET, and then click Repair/Reinstall.
    -or-
  • Exclude the Extensibility assembly and the VSLangProj assembly from the setup project when you install the setup project on your computer.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to reproduce the behavior

Note To reproduce this behavior, you must have Visual Studio .NET 2002 or Visual Studio .NET 2003 installed on your computer.
  1. In Microsoft Visual Studio .NET, use Visual Basic .NET or Visual C# .NET to create a new Windows Application project. By default, Form1 is created.
  2. Add a new reference to this project, and then build the project. To do this, follow these steps:
    1. In Solution Explorer, right-click WindowsApplication1, and then click Add Reference.
    2. Click the .NET tab, click extensibility. Hold down the CTRL key, and then click VSLangProj. Release the CTRL key, and then click Select. Click OK.
    3. On the Build menu, click Build Solution.
  3. Add another project to the project that you created in step 1. To do this, follow these steps:
    1. On the File menu, point to Add Project, and then click New Project.
    2. In the Add New Project dialog box, click Setup and Deployment Projects under Project Types, click Setup Project under Templates, and then click OK. By default, Setup1 is created.
    3. In Solution Explorer, click Setup1.
    4. On the Project menu, point to Add, and then click Project Output.
    5. In the Add Project Output Group dialog box, click Primary output, and then click OK.
    6. On the Build menu, click Build Setup1.
  4. Install the project that you have created. To do this, follow these steps:
    1. On the Project menu, click Install.
    2. On the Welcome to the Setup1 page of the setup wizard, click Next.
    3. On the Select Installation Folder page, type the location where you want to install the project in the Folder text box.
    4. Click Next.
    5. On the Confirm Installation page, click Next.
    6. On the Installation Complete page, click Close.
  5. On the Project menu in Visual Studio .NET, click Uninstall.
  6. After the uninstall process is completed, quit Visual Studio .NET.
  7. Start Visual Studio .NET 2002 and Visual Studio .NET 2003, and then use Visual C# .NET to create a new Windows Application project.

    You receive the error message that is described in the "Symptoms" section of this article.

    Note If you use Visual Basic .NET to start the new Windows Application project, you do not receive an error message and the application project starts as expected.

REFERENCES

For more information, visit the following Microsoft Web site:

Modification Type:MinorLast Reviewed:2/10/2006
Keywords:kbvs2005doesnotapply kbvs2005swept kbvs2002sp1sweep kbpending kbsetup kbDLL kbbug KB823244 kbAudDeveloper