Microsoft KB Archive/824495

= FIX: You receive a &quot;MissingManifestResourceException&quot; error message when you add a linked resource in Visual Studio .NET 2003 =

Article ID: 824495

Article Last Modified on 10/25/2005

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition

-





SYMPTOMS
When you debug your Microsoft Windows Forms-based application in Microsoft Visual Studio .NET 2003, you may receive the following error message:

An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll



CAUSE
This problem occurs if the following conditions are true:
 * Your Visual Studio .NET solution contains two or more projects.
 * The projects that contain the common resource are not in the same namespace.
 * Two or more projects create an instance of the common resource at run time.

When a resource is shared between two or more projects that are in different namespaces, and the projects are in the same solution, the run time environment may experience a MissingManifestResourceException error.



RESOLUTION
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it 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 Visual Studio .NET 2003 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product 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.

The English version of this hotfix has the file attributes (or later) 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 tool in Control Panel. Date Time Version Size File name - 17-Jul-2003 11:01 7.10.3198.0 1,437,696 Msvb7.dll



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Steps to reproduce the problem
 Create a solution and two Windows Application Projects:  In Visual Studio .NET 2003, create a solution. Name the solution Solution1. Create a new Microsoft Visual Basic .NET Windows Application project. Name the project WindowsApplication1. In the New Project dialog box, click Add to Solution. Create another Visual Basic .NET Windows Application project. Name the project WindowsApplication2. In the New Project dialog box, click Add to Solution. </li> Create a shared folder:  In Microsoft Windows Explorer, locate the Solution1 folder. The Solution1 folder contains the WindowsApplication1 folder and the WindowsApplication2 folder.</li> In the Solution1 folder, create a new folder. Name the folder Shared.</li></ol> </li> Create a new Windows Form:  In Visual Studio .NET 2003, add a new Windows Form to the WindowsApplication1 project. Name the form Form2.</li> Set the Icon property of the Form2 form to any .ico file to create a .resx file for the Form2 form.</li> On the File menu, click Save All.</li></ol> </li> Close the Solution1 solution.</li> In Windows Explorer, copy the Form2.vb file and the Form2.resx file from the Solution1 folder to the Shared folder.</li> Open the Solution1 solution.</li> Link the Form2 form to the WindowsApplication1 project and to the WindowsApplication2 project:  Delete the Form2 form from the WindowsApplication1 project.</li> Right-click WindowsApplication1, and then click Add Existing Item.</li> <li>In the Add Existing Item dialog box, open the Shared folder.</li> <li>In the Shared folder, click Form2, click the down-arrow next to the Open button, and then click Link File.</li> <li>Right-click WindowsApplication2, and then click Add Existing Item.</li> <li>In the Add Existing Item dialog box, open the Shared folder.</li> <li>In the Shared folder, click Form2, click the down-arrow next to the Open button, and then click Link File.</li></ol> </li> <li> Add the following code to the Form1_load event procedure of both the WindowsApplication1 project and the WindowsApplication2 project: Dim frm As New Form2 frm.Show </li> <li>Build the Solution1 solution.</li> <li>Run WindowsApplication1.</li> <li>In Solution Explorer, right-click the WindowsApplication2 project folder, and then click Set as StartUp Project.</li> <li>Run WindowsApplication2.</li></ol>

For additional information about the terminology that is used to describe Microsoft product updates, 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

Keywords: kbbug kbfix kbqfe kbvsnet2003presp1fix kbhotfixserver KB824495

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.