Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
AssemblyConfigurationAttribute在 .Net 程序集文件中设置是一种好习惯吗?
AssemblyConfigurationAttribute
我没有发现这特别有用(因为只有最底层的工具才会显示此信息),而且我从未见过它在我处理过的生产代码中使用过。
无论如何,如果您需要,只需将以下行添加到您的 AssemblyInfo.cs 文件中:
#if DEBUG [assembly: AssemblyConfiguration("Debug")] #else [assembly: AssemblyConfiguration("Release")] #endif