Microsoft KB Archive/842457

= FIX: You may receive a compile error when you build a project that has a promoted property whose name is the same as the Namespace property of the PropertySchema.xsd file in BizTalk Server 2004 =

Article ID: 842457

Article Last Modified on 4/3/2007

-

APPLIES TO


 * Microsoft BizTalk Server 2004 Developer Edition
 * Microsoft BizTalk Server 2004 Enterprise Edition
 * Microsoft BizTalk Server 2004 Partner Edition
 * Microsoft BizTalk Server 2004 Standard Edition

-





SYMPTOMS
You may receive a compile error when you build a project that has a promoted property whose name is the same as the Namespace property of the PropertySchema.xsd file in Microsoft BizTalk Server 2004. The compile error is similar to the following:

error CS0101: C:\BizTalk Projects\CompileError\Result.xsd(12): The namespace ' ' already contains a definition for ' '



CAUSE
This problem occurs when the Namespace property name of the property schema is the same as the name of a promoted property in a BizTalk Server 2004 project. When the project is compiled, identical class name and namespace combinations create a name conflict. This class name and namespace conflict may prevent the BizTalk Server 2004 project from being compiled.



WORKAROUND
To work around this problem, use one of the following methods:
 * Modify the Namespace property of the PropertySchema.xsd file.
 * Modify the schema that contains the properties that you promoted so that these schema files have different Namespace properties.

To modify the Namespace property of either schema file, locate and select the schema file in Solution Explorer. In the Properties window, locate the Namespace property, and type a new name for the property.



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 behavior

 * 1) Open Visual Studio .NET.
 * 2) Create an empty BizTalk Server project, and then name the project &quot;CompileError.&quot;
 * 3) Add a schema to the project, and then name the schema &quot;Result.xsd.&quot;
 * 4) In the new schema file, right-click the Root element, point to Insert Schema Node, and then click Child Field Element.
 * 5) Rename the newly inserted element &quot;Result.&quot;
 * 6) Right-click the Result element, point to Promote, and then click Quick Promotion.

If a dialog box appears that says that a PropertySchema.xsd file will be created, click OK.
 * 1) Change the value of the Namespace property of the new PropertySchema.xsd file from CompileError.PropertySchema to CompileError.
 * 2) On the Build menu, click Build Solution.

You may receive the following error:

C:\BizTalk Projects\CompileError\Result.xsd(12): The namespace 'CompileError' already contains a definition for 'Result'



For more information about promoting properties, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms965231.aspx

Keywords: kbbiztalk2004-2006swept kbbtsorchestration kbbug KB842457

-

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

© Microsoft Corporation. All rights reserved.