<tfoot id='j4V44'></tfoot>
    <bdo id='j4V44'></bdo><ul id='j4V44'></ul>
  • <small id='j4V44'></small><noframes id='j4V44'>

    1. <i id='j4V44'><tr id='j4V44'><dt id='j4V44'><q id='j4V44'><span id='j4V44'><b id='j4V44'><form id='j4V44'><ins id='j4V44'></ins><ul id='j4V44'></ul><sub id='j4V44'></sub></form><legend id='j4V44'></legend><bdo id='j4V44'><pre id='j4V44'><center id='j4V44'></center></pre></bdo></b><th id='j4V44'></th></span></q></dt></tr></i><div id='j4V44'><tfoot id='j4V44'></tfoot><dl id='j4V44'><fieldset id='j4V44'></fieldset></dl></div>
    2. <legend id='j4V44'><style id='j4V44'><dir id='j4V44'><q id='j4V44'></q></dir></style></legend>

        在构建期间自动化 xsd.exe

        时间:2023-06-02

        <legend id='the94'><style id='the94'><dir id='the94'><q id='the94'></q></dir></style></legend>
        <i id='the94'><tr id='the94'><dt id='the94'><q id='the94'><span id='the94'><b id='the94'><form id='the94'><ins id='the94'></ins><ul id='the94'></ul><sub id='the94'></sub></form><legend id='the94'></legend><bdo id='the94'><pre id='the94'><center id='the94'></center></pre></bdo></b><th id='the94'></th></span></q></dt></tr></i><div id='the94'><tfoot id='the94'></tfoot><dl id='the94'><fieldset id='the94'></fieldset></dl></div>
          <bdo id='the94'></bdo><ul id='the94'></ul>

          <small id='the94'></small><noframes id='the94'>

              <tfoot id='the94'></tfoot>

                  <tbody id='the94'></tbody>

                  本文介绍了在构建期间自动化 xsd.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我需要一种在构建过程中根据 *.xsd 文件自动重新生成 *.cs 文件的方法,最好不涉及任何自定义加载项.这也需要在 CI 构建上运行.

                  I need a way to automatically regenerate *.cs files during build, based on *.xsd files, preferably without involving any custom add-ins. This needs to run on the CI build as well.

                  我不确定我是否遗漏了一些明显的东西,或者在我看来这真的很棘手吗?

                  I'm not sure if I'm missing something obvious, or is this really tricky as it seems to me?

                  推荐答案

                  我用这个脚本:

                  @echo off
                  cd %1
                  call :treeProcess %2 "XSDs"
                  cd ..
                  goto :eof
                  
                  :treeProcess
                  rem From http://stackoverflow.com/a/8398621/298754
                  echo Processing %2
                  for %%f in (*.xsd) do call :buildXSD %%f %1 %2 %%~nf
                  for /D %%d in (*) do (
                      cd %%d
                      call :treeProcess %1 %2.%%d
                      cd ..
                  )
                  exit /b
                  
                  :buildXSD
                  %2 %1 /c /n:%3.%4%
                  

                  带有预构建事件

                  call "$(ProjectDir)"XSDBuilder.bat "$(ProjectDir)"XSDs "$(Registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SDKsWindowsv7.0A@InstallationFolder)binxsd.exe"
                  

                  这将递归解析项目根目录中名为 XSDs 的文件夹中的每个 .xsd 文件,并根据文件夹结构分配命名空间.

                  This will recursively parse every .xsd file in a folder in the project root called XSDs, and will assign a namespace based on the folder structure.

                  这篇关于在构建期间自动化 xsd.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:是否有一个类可以从 .NET 中的 XSD 模式生成示例 下一篇:C# - 解析 XSD 架构 - 将所有元素获取到组合框

                  相关文章

                  最新文章

                  <tfoot id='1ZEAp'></tfoot>
                  • <bdo id='1ZEAp'></bdo><ul id='1ZEAp'></ul>
                  <legend id='1ZEAp'><style id='1ZEAp'><dir id='1ZEAp'><q id='1ZEAp'></q></dir></style></legend>

                  <i id='1ZEAp'><tr id='1ZEAp'><dt id='1ZEAp'><q id='1ZEAp'><span id='1ZEAp'><b id='1ZEAp'><form id='1ZEAp'><ins id='1ZEAp'></ins><ul id='1ZEAp'></ul><sub id='1ZEAp'></sub></form><legend id='1ZEAp'></legend><bdo id='1ZEAp'><pre id='1ZEAp'><center id='1ZEAp'></center></pre></bdo></b><th id='1ZEAp'></th></span></q></dt></tr></i><div id='1ZEAp'><tfoot id='1ZEAp'></tfoot><dl id='1ZEAp'><fieldset id='1ZEAp'></fieldset></dl></div>

                    1. <small id='1ZEAp'></small><noframes id='1ZEAp'>