Microsoft KB Archive/836131

= BUG: You receive a &quot;'Microsoft.VisualStudio.VCProjectEngine.VCConfiguration' does not contain a definition for 'Project'&quot; error message when you try to build a project in Visual Studio .NET 2003 =

Article ID: 836131

Article Last Modified on 3/6/2006

-

APPLIES TO


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

-



SYMPTOMS
In Microsoft Visual Studio .NET 2002, you may create a project that contains a class that uses the Project property of the Microsoft.VisualStudio.VCProjectEngine.VCConfiguration class. When you try to build such a project in Microsoft Visual Studio .NET 2003, you may receive the following error message:

'Microsoft.VisualStudio.VCProjectEngine.VCConfiguration' does not contain a definition for 'Project'



CAUSE
In Visual Studio .NET 2002, the Microsoft.VisualStudio.VCProjectEngine.VCConfiguration class contains a property that is named Project. However, in Visual Studio .NET 2003, the corresponding property is named the project property (with a lowercase &quot;p&quot;). Therefore, because Visual Studio .NET 2003 does not contain the property that you used in your Visual Studio .NET 2002 project, the behavior that is mentioned in the &quot;Symptoms&quot; section of this article occurs.



RESOLUTION
To resolve this behavior, in Visual Studio .NET 2003, replace all occurrences of the incorrectly named Project property with the correctly named project property.



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



Steps to reproduce the problem
 Start Visual Studio .NET 2002. On the File menu, point to New, and then click Project. The New Project dialog box appears. Click Visual C# Projects under Project Types, and then click Windows Application under Templates. Type MyProjectTest in the Name box, and then click OK. By default, a Windows form that is named Form1 is created. On the Project menu, click Add Reference. The Add Reference dialog box appears. On the .NET tab, click Microsoft.VisualStudio.VCProjectEngine under Component Name, and then click OK.</li> Double-click the Form1 Windows form to switch to Code view.</li>  Add the following code to the top of the Form1.cs file: using Microsoft.VisualStudio.VCProjectEngine; </li>  Add the following code in the Form1_Load method: VCConfiguration MyVariable = null; Object MyObject = MyVariable.Project; </li> On the Build menu, click Build Solution to build the solution.</li> Start Visual Studio .NET 2003.</li> On the File menu, point to Open, and then click Project. The New Project dialog box appears.</li> Locate the folder that contains the MyProjectTest solution, and then click the MyProjectTest C# Project file.</li> In the Microsoft Development Environment dialog box, click Open, and then click Yes.</li> On the Build menu, click Build Solution to build the solution. You receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

Keywords: kbbug kbproperties kbpending kbideproject kbvs2005swept kbvs2005doesnotapply KB836131

-

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

© Microsoft Corporation. All rights reserved.