我想将XML文件的属性值读入变量,但是似乎没有任何作用。我在网上搜索解决方案,但没有运气。下面是我的XML。
<asmv1:assembly>
<assemblyIdentity name="product.application"
version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral"
processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1"/>
<description asmv2:publisher="Company" asmv2:product="product"
xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="false" mapFileExtensions="true" trustURLParameters="true" />
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
<framework targetVersion="4.6.1" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>
<dependency>
<dependentAssembly dependencyType="install" codebase="Application Files\product_1_0_0_1\product.exe.manifest" size="11613">
<assemblyIdentity name="product.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral"
processorArchitecture="msil" type="win32" />
</dependentAssembly>
</dependency>
</asmv1:assembly>
我想从第二个dependentAssembly / assemblyIdentity标记中读取名称和版本属性,然后创建一个将这些值连接为Product_1_0_0_1的名称,并使用该名称创建一个文件夹。