由于目标命名空间

问题描述

我有

public class MyClass
{
    [XmlAttribute("noNamespaceSchemaLocation",Namespace = XmlSchema.InstanceNamespace)]
    public string xmlShemaFile = "schema0.xsd";

    public string Property1 { get; set; }
    public string Property2 { get; set; }
}

当我序列化我得到的类

<?xml version="1.0" encoding="utf-8"?>
<MyClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="schema0.xsd">
    <Property1>Content</Property1>
</MyClass>

生成 xsd 文件失败并显示错误消息:

Fehler:Fehler beim Verarbeiten von 'XmlValidationNetFramework472.exe'。

translate.google.com:

错误:无法处理“XmlValidationNetFramework472.exe”。

当我删除命名空间或将其留空时,xsd.exe 可以工作,但不再找到该方案。

有什么想法可以让这一代人工作吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)