In .NETCore1.1, next code
typeof(Program).GetTypeInfo().Assembly.GetCustomAttributes().ToList()
returns list of custom assembly attributes and one of them is AssemblyTitleAttribute. By default this attribute value returns project name, but how can I set any other value?
Tried to add assembly information file AssemblyInfo.cs how it's described here, but getting error
error CS0579: Duplicate 'System.Reflection.AssemblyTitleAttribute' attribute
Right now properties could be defined in
.csprojor usingAssemblyInfo.cs, but only the one place could be used, otherwise "Duplicate" errors are generated.If you want to use
AssemblyInfo.cs, add the following into.csprojto avoid duplication errors:If you are interesting how does it work, look into GenerateAssemblyInfo task.
Otherwise remove
AssemblyInfo.csand add the following into your.csprojfile: