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

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

      使用程序集属性的最佳实践是什么?

      What are the best practices for using Assembly Attributes?(使用程序集属性的最佳实践是什么?)
      • <bdo id='XoOT2'></bdo><ul id='XoOT2'></ul>

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

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

        1. <legend id='XoOT2'><style id='XoOT2'><dir id='XoOT2'><q id='XoOT2'></q></dir></style></legend>

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

                <tbody id='XoOT2'></tbody>

                本文介绍了使用程序集属性的最佳实践是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个包含多个项目的解决方案.我正在尝试通过链接一个解决方案范围的程序集信息文件来优化 AssemblyInfo.cs 文件.这样做的最佳做法是什么?哪些属性应该在解决方案范围的文件中,哪些是项目/程序集特定的?

                I have a solution with multiple project. I am trying to optimize AssemblyInfo.cs files by linking one solution wide assembly info file. What are the best practices for doing this? Which attributes should be in solution wide file and which are project/assembly specific?

                如果您有兴趣,有一个后续问题 AssemblyVersion、AssemblyFileVersion 和 AssemblyInformationalVersion 有什么区别?

                推荐答案

                我们正在使用一个名为 GlobalAssemblyInfo.cs 的全局文件和一个名为 AssemblyInfo.cs 的本地文件.全局文件包含以下属性:

                We're using a global file called GlobalAssemblyInfo.cs and a local one called AssemblyInfo.cs. The global file contains the following attributes:

                 [assembly: AssemblyProduct("Your Product Name")]
                
                 [assembly: AssemblyCompany("Your Company")]
                 [assembly: AssemblyCopyright("Copyright  2008 ...")]
                 [assembly: AssemblyTrademark("Your Trademark - if applicable")]
                
                 #if DEBUG
                 [assembly: AssemblyConfiguration("Debug")]
                 #else
                 [assembly: AssemblyConfiguration("Release")]
                 #endif
                
                 [assembly: AssemblyVersion("This is set by build process")]
                 [assembly: AssemblyFileVersion("This is set by build process")]
                

                本地 AssemblyInfo.cs 包含以下属性:

                The local AssemblyInfo.cs contains the following attributes:

                 [assembly: AssemblyTitle("Your assembly title")]
                 [assembly: AssemblyDescription("Your assembly description")]
                 [assembly: AssemblyCulture("The culture - if not neutral")]
                
                 [assembly: ComVisible(true/false)]
                
                 // unique id per assembly
                 [assembly: Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")]
                

                您可以使用以下过程添加 GlobalAssemblyInfo.cs:

                You can add the GlobalAssemblyInfo.cs using the following procedure:

                • 在项目的上下文菜单中选择Add/Existing Item...
                • 选择 GlobalAssemblyInfo.cs
                • 通过点击右侧的小向下箭头来展开添加按钮
                • 在按钮下拉列表中选择添加为链接"

                这篇关于使用程序集属性的最佳实践是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                How to store delegates in a List(如何将代表存储在列表中)
                Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                CreateDelegate with unknown types(具有未知类型的 CreateDelegate)
                Does Funclt;Tgt;.BeginInvoke use the ThreadPool?(Funclt;Tgt;.BeginInvoke 使用线程池吗?)
                How to create a delegate to an instance method with a null target?(如何为具有空目标的实例方法创建委托?)
                    <tbody id='7RPLo'></tbody>

                  1. <legend id='7RPLo'><style id='7RPLo'><dir id='7RPLo'><q id='7RPLo'></q></dir></style></legend>

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

                      <small id='7RPLo'></small><noframes id='7RPLo'>