Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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'

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


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'

↑ Back to the top


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

↑ Back to the top


Keywords: KB842457, kbbug, kbbtsorchestration, kbbiztalk2004-2006swept

↑ Back to the top

Article Info
Article ID : 842457
Revision : 4
Created on : 4/3/2007
Published on : 4/3/2007
Exists online : False
Views : 410