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 (842457)



The information in this article 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 'Namespace' already contains a definition for 'Property'

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 "Applies to" section.

MORE INFORMATION

Steps to reproduce the behavior

  1. Open Visual Studio .NET.
  2. Create an empty BizTalk Server project, and then name the project "CompileError."
  3. Add a schema to the project, and then name the schema "Result.xsd."
  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 "Result."
  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.
  7. Change the value of the Namespace property of the new PropertySchema.xsd file from CompileError.PropertySchema to CompileError.
  8. 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:

Modification Type:MinorLast Reviewed:5/23/2006
Keywords:kbbiztalk2004-2006swept kbBTSOrchestration kbBug KB842457 kbAudDeveloper kbAudITPRO