问题描述
如果我们进行更改,则在AssemblyInfo.cs上的.net的previos版本中
In previos version of .net on AssemblyInfo.cs if we change
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
到
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.*")]
并编译我们的项目构建版本编译器会自动将构建版本设置为dll或..文件.
and compile our project build version compiler sets automatically build version to dll or.. files.
在.net核心中,我们有这个
in .net core we have this
{
"version": "1.0.0",
"dependencies": {
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0"
},
我们如何在UI层的.net核心上做到这一点?
how can we do it on .net core on UI tier?
推荐答案
您可以进入应用程序"选项卡下的项目"属性,并使用可用的装配信息"按钮设置装配信息.这样可以设置标题/说明/版权声明/程序集版本和中性语言.但是最终它只是将值设置到Project.json文件
You can go into the Project properties under Application Tab and set the assembly information usig the available "Assembly Information" button. This allows the Title/description/Copyright notice/Assembly version and neutral language to be set. But ultimately it just sets the values into the Project.json file
"title": "project name",
"copyright": "company copyright",
"description": "project description",
"version": "1.0.0-*",
这篇关于如何在.net核心项目中自动设置构建版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!