小编car*_*osm的帖子

标识符"提交#0"在Azure功能中不符合CLS

我希望有人可以帮助我.我正在实现一个Azure功能,我试图将XML消息序列化为.Net对象.这是我目前使用的代码:

public static void Run(string input, TraceWriter log) 
{
    System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(App));
    // more code here....
}
public class App
{
    public string DataB { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

但是,我总是遇到这个错误:

2017-01-17T12:21:35.173 Exception while executing function: Functions.ManualXmlToJson. mscorlib: Exception has been thrown by the target of an invocation. System.Xml: Identifier 'Submission#0' is not CLS-compliant.
Run Code Online (Sandbox Code Playgroud)

参数名称:ident.

我尝试过没有它们的XmlAttributes.我在文件中添加了buildOptions:warningsAsErrorsas 但没有任何反应.说实话,我没有想法,因为这段代码实际上是在App Console中运行的.falseproject.json

我想是某些参数,我真的很感激,如果有人可以建议我如何解决它.

谢谢!

azure azure-functions

5
推荐指数
1
解决办法
844
查看次数

标签 统计

azure ×1

azure-functions ×1