安裝studio 2012後,構建一個面向框架4.0的應用程序。 我得到的錯誤:使用studio 2012構建後的任務序列化問題
Type 'System.Threading.Tasks.Task' cannot be serialized.
Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with ....
我已經使用SvcUtil工具重新生成服務引用。 是否有任何指定從參考中排除所有異步內容的方法?
?
你對你的服務有一個公共的方法,它需要'Socket'作爲參數嗎? –
那麼,你有沒有記得用「DataContractAttribute」標記它? – Janman