2013-11-15 281 views
0

我在项目中添加了wsdl作为服务引用,并且当我的代码移动到托管时出现以下错误服务器它在本地服务器上运行良好。CS0234:命名空间'System.Runtime.Serialization'中不存在类型或命名空间名称'IExtensibleDataObject'

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'IExtensibleDataObject' does not exist in the namespace 'System.Runtime.Serialization' (are you missing an assembly reference?)

Source Error:

[No relevant source lines]

Source File: App_WebReferences.fcpcl-q0.0.cs Line: 20

Show Detailed Compiler Output:

Show Complete Compilation Source:

Version Information: Microsoft .NET Framework Version:2.0.50727.4241; ASP.NET Version:2.0.50727.4223

因此,如果有人知道答案,请帮忙解决问题。

回答

1

IExtensibleDataObject被添加到.NET 3.0中。托管服务器是否具有.NET 3.0或更高版本?从你问题中的版本看,它看起来可能不会。

+0

我的托管服务器设置已在此框架版本2.0-3.0-3.5上设置。该错误是在wsdl编译后生成的代码中 –

1

我运行VS 2013并有同样的问题。我的代码包含“使用System.Runtime.Serialization”,但是当我将System.Runtime.Serialization添加为项目引用时,消息消失。

相关问题