<legend id='8N91u'><style id='8N91u'><dir id='8N91u'><q id='8N91u'></q></dir></style></legend>

        • <bdo id='8N91u'></bdo><ul id='8N91u'></ul>

        <small id='8N91u'></small><noframes id='8N91u'>

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

        <tfoot id='8N91u'></tfoot>
      1. 如何在一处更改我的解决方案中所有项目的 C# 语言版本?

        时间:2023-05-22

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

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

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

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

                  本文介绍了如何在一处更改我的解决方案中所有项目的 C# 语言版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有一个包含 20 个项目的解决方案,我想将所有项目的 C# 版本更改为 C# 7.3

                  I have a solution with 20 projects, I want to change the C# version for all of them to C# 7.3

                  有没有一种方法可以一次更改所有项目的版本?我知道我可以从 Project 的 Properties 更改 Language Version,但我不想重复 20 次.

                  Is there a way that I could change all project's version at one go? I know I can change the Language Version from Project's Properties, but I don't want to repeat this 20 times.

                  推荐答案

                  要一次为所有项目设置版本,您可以创建一个名为 Directory.Build.props 的文件(区分大小写在 Linux 上)位于存储库的根目录.此文件包含项目的常见属性列表:

                  To set a version for all your project at once, you can create a file named Directory.Build.props (case-sensitive on Linux) at the root of your repository. This file contains the list of common properties of your projects:

                  <Project>
                    <PropertyGroup>
                      <LangVersion>latest</LangVersion>
                      <!--<LangVersion>preview</LangVersion>-->
                      <!--<LangVersion>7.3</LangVersion>-->
                    </PropertyGroup>
                  </Project>
                  

                  https://www.meziantou.net/4-ways-to-enable-the-latest-csharp-features.htm#method-4-using-a-pro

                  这篇关于如何在一处更改我的解决方案中所有项目的 C# 语言版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 csproj 文件中进行多目标时生成错误 下一篇:我无法在 Visual Studio 2017 中添加参考

                  相关文章

                  <legend id='9cNYW'><style id='9cNYW'><dir id='9cNYW'><q id='9cNYW'></q></dir></style></legend>

                  1. <tfoot id='9cNYW'></tfoot>

                    <small id='9cNYW'></small><noframes id='9cNYW'>

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

                      • <bdo id='9cNYW'></bdo><ul id='9cNYW'></ul>