小编Gor*_*onS的帖子

Visual Studio 2022 中 .Net Core 6 解决方案版本信息的中心位置

对于使用 Visual Studio 2019 的 ASP.Net,我创建了一个共享的 AssemblyInfo.cs 文件,然后在解决方案的每个项目中引用该文件。从而为我提供了一个位置来设置版本信息,然后为每个项目设置该版本信息。

\n
using System.Reflection;\nusing System.Runtime.InteropServices;\nusing JetBrains.Annotations;\n\n[assembly: AssemblyConfiguration("")]\n[assembly: AssemblyCompany("Company Name")]\n[assembly: AssemblyProduct("Product name")]\n[assembly: AssemblyCopyright("Copyright \xc2\xa9 Company. All Rights Reserved.")]\n[assembly: AssemblyTrademark("")]\n[assembly: AssemblyCulture("")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n[assembly: AssemblyVersion("1.15.0")]\n[assembly: AssemblyFileVersion("1.15.0.7156")]\n[assembly: AssemblyInformationalVersion("1.15.0")]\n
Run Code Online (Sandbox Code Playgroud)\n

每个项目都有一个简化的 AssemblyInfo.cs 文件:

\n
using System.Reflection;\nusing System.Runtime.InteropServices;\n\n// General Information about an …
Run Code Online (Sandbox Code Playgroud)

visual-studio asp.net-core-6.0 visual-studio-2022

4
推荐指数
1
解决办法
4483
查看次数