简体   繁体   中英

Assembly information not found in C#

I'm looking to change my assembly and file version like this在此处输入图像描述

However, in my new project this does not appear在此处输入图像描述

I also tried to add it directly to the AssemblyInfo.cs file but it created a duplicate error. 在此处输入图像描述

.NET Core projects don't support this dialog anymore. Edit your project file instead.

If you want to add your own assembly attributes, check this already answered question here: https://stackoverflow.com/a/42183749/7972419

The AssemblyInfo.cs is not included in the default templates anymore because SDK-style project type supports setting this kind of information within the csproj file.

You have a couple of options for doing this:

  1. You could set the Version property of your assembly within your project file. For example:

    netcoreapp3.0 1.2.3
  2. Another option is to set it during the build process - dotnet build /p:Version=1.2.3 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM