Microsoft KB Archive/916649

= Error message when you build a BizTalk Server 2006 or BizTalk Server 2004 project in Visual Studio: &quot;The type or namespace name 'SerializableAttribute' does not exist&quot; or &quot;The type or namespace name 'NonSerializedAttribute' does not exist&quot; =

Article ID: 916649

Article Last Modified on 4/26/2006

-

APPLIES TO


 * Microsoft BizTalk Accelerator for RosettaNet 3.0 Standard Edition
 * Microsoft BizTalk Accelerator for RosettaNet 3.0 Enterprise Edition

-





SYMPTOMS
In Microsoft Visual Studio, you may receive an error message that resembles one of the following messages when you build a Microsoft BizTalk Server 2006 or Microsoft BizTalk Server 2004 project that uses XML Schema definition language (XSD)-based Partner Interface Process (PIP) schemas:

Error message 1

The type or namespace name 'SerializableAttribute' does not exist in the namespace ' .System' (are you missing an assembly reference?)

Error message 2

The type or namespace name 'NonSerializedAttribute' does not exist in the namespace ' .System' (are you missing an assembly reference?)

Note In this error message,  represents the name of the BizTalk Server project.

This problem occurs when the project contains XSD Schemas in a subfolder that is named System.



CAUSE
This problem occurs because the namespace that is created for the documents in the System folder is the  .System namespace.

Note  represents the name of the BizTalk Server 2004 project.

BizTalk Server generates code that uses the System.Serializable attribute and the System.NonSerialized attribute. Therefore, the C# compiler assumes that the Serializable attribute and the NonSerialized attribute are Microsoft .NET types that are defined under the  .System namespace.



RESOLUTION
To resolve this problem, change the namespace for the schemas in Visual Studio. To do this, follow these steps:
 * 1) In Visual Studio, click Solution Explorer on the View menu.
 * 2) On the Project menu, click Show All Files.
 * 3) In Solution Explorer, expand System.
 * 4) Click each file in the System folder and in any subfolders, and then change the namespace entry in the Properties window so that any occurrence of System becomes _System. For example, change the MyProject.System.SubFolder namespace to the MyProject._System.Subfolder namespace.



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

Keywords: kberrmsg kbtshoot kbbug kbprb kbbtsaccelerators kbbts KB916649

-

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

© Microsoft Corporation. All rights reserved.