2013-11-15 285 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添加爲項目引用時,消息消失。

相關問題