解析Visual Studio .csproj
文件使用python進行進一步修改的最佳方法是什麼?使用python解析VisualStudio .csproj文件的最佳方法
這是一些.csproj
文件:
...
<ItemGroup>
<Reference Include="SomeAssembly, Version=1.1.1.1"/>
...
</ItemGroup>
...
我想插入此:
<HintPath>path/to/SomeAassembly.dll</HintPath>
到<Reference/>
節點。
比什麼好? – delnan
比找到像「Reference」這樣的字符串更好,並用正則表達式分割字符串的其他部分。然後,插入HintPath標籤並關閉引用標籤。 – Eugen
更好地更改爲最好 – Eugen