Home > database >  Assembly information not found in C#
Assembly information not found in C#

Time:12-20

I'm looking to change my assembly and file version like this enter image description here

However, in my new project this does not appear enter image description here

I also tried to add it directly to the AssemblyInfo.cs file but it created a duplicate error. enter image description here

CodePudding user response:

.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

CodePudding user response:

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.

  •  Tags:  
  • c#
  • Related