Perform XSLT Transform as Build-Step

后端 未结 2 690
温柔的废话
温柔的废话 2021-02-12 18:43

During a Visual Studio build, I need to have an XML file generated from another XML file. It is obvious to me an XSLT template and transform is exactly what I need.

The

相关标签:
2条回答
  • 2021-02-12 19:20

    I'd personally go with installing the MSBuild Community Tasks and invoking msbuild.exe from the PostBuild Event in the project settings.

    A shudder just went down my spine at the thought of XSLT files too! :P

    0 讨论(0)
  • 2021-02-12 19:34

    If you're using VS2010 you can use the built-in XslTransformation task of MSBuild 4 in a post build step.

    <Target Name="AfterBuild">
      <XslTransformation
        XslInputPath="transform.xslt"
        XmlInputPaths="in.xml"
        OutputPaths="out.xml" />
    </Target>
    
    0 讨论(0)
提交回复
热议问题