• <bdo id='nIUb1'></bdo><ul id='nIUb1'></ul>

  • <tfoot id='nIUb1'></tfoot>

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

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

        新的.csproj格式 - 如何将整个目录指定为“链接文件".到子目录?

        时间:2023-05-21
          <i id='YVrVU'><tr id='YVrVU'><dt id='YVrVU'><q id='YVrVU'><span id='YVrVU'><b id='YVrVU'><form id='YVrVU'><ins id='YVrVU'></ins><ul id='YVrVU'></ul><sub id='YVrVU'></sub></form><legend id='YVrVU'></legend><bdo id='YVrVU'><pre id='YVrVU'><center id='YVrVU'></center></pre></bdo></b><th id='YVrVU'></th></span></q></dt></tr></i><div id='YVrVU'><tfoot id='YVrVU'></tfoot><dl id='YVrVU'><fieldset id='YVrVU'></fieldset></dl></div>

              <tbody id='YVrVU'></tbody>

              • <bdo id='YVrVU'></bdo><ul id='YVrVU'></ul>

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

                • <legend id='YVrVU'><style id='YVrVU'><dir id='YVrVU'><q id='YVrVU'></q></dir></style></legend><tfoot id='YVrVU'></tfoot>
                  本文介绍了新的.csproj格式 - 如何将整个目录指定为“链接文件".到子目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  与新 .csproj 格式(以及旧的),可以将文件添加为项目文件夹外面的链接:

                  With the new .csproj format (as well as the old), it is possible to add files as linked outside of the project folder:

                   <EmbeddedResource Include="......DemoSample.cs" Link="ResourcesSample.cs" />
                  

                  也可以使用 glob 模式来包含多个文件:

                  It is also possible to use a glob pattern to include multiple files:

                  <EmbeddedResource Include="......Demo*.cs" />
                  

                  但是如何将两者结合起来呢?

                  But how do you combine the two?

                  1. < embeddedResource include =.. .. .. demo *.CS"链接=资源 *.CS"/>
                  2. < embeddedResource include =.. .. .. demo *.CS"link =资源 *"/>
                  3. < embeddedResource include =.. .. .. demo *.cs"link =资源"/>

                  前两个只创建一个链接文件(究竟是名称 *.cs * ).第三个只是出错了.

                  The first two only create a single linked file (with exactly the name *.cs and * respectively). The third simply errors out.

                  有没有办法将 globbing 与链接文件结合到目标项目中的特定位置?如果没有,如何在不知道有多少或名称的情况下链接目录中的所有文件?

                  Is there a way to combine globbing with linked files to a specific location in the target project? If not, how can I link all the files in a directory without knowing how many or what their names are?

                  推荐答案

                  虽然以前可以在使用 glob 扩展时使用 %(RecursiveDir) 元数据(Link="Resources\%(RecursiveDir)%(Filename)%(Extension)"),2.0.0版本的.NET Core SDK允许使用新的LinkBase元数据:

                  While this was previously possible using the %(RecursiveDir) metadata when using glob expansion ( Link="Resources\%(RecursiveDir)%(Filename)%(Extension)"), the 2.0.0 version of the .NET Core SDK allows the use of a new LinkBase metadata:

                  <EmbeddedResource Include="......Demo***.cs" LinkBase="Resources" />
                  

                  注意,除了最近发布的 VS 2017 15.3 之外,还需要安装 2.0.0(并确保没有 global.json 选择较低的版本).

                  Note that you need to install the 2.0.0 in addition to the recently released VS 2017 15.3 (and ensure no global.json selects a lower version).

                  它被引入这个拉请求这可能是最佳的文档.

                  It was introduced with this pull request which is probably the best documentation at the moment.

                  这篇关于新的.csproj格式 - 如何将整个目录指定为“链接文件".到子目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:VS 2017 中的创建单元测试在哪里? 下一篇:Visual Studio 2017 和缺少的 EXE 文件

                  相关文章

                      <bdo id='2wyva'></bdo><ul id='2wyva'></ul>

                    <small id='2wyva'></small><noframes id='2wyva'>

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