<Title> tag not reflected in AssemblyInfo.cs

Hideo Yamada 20 Reputation points
2024-07-11T09:58:48.1333333+00:00

Hello

<Title> tag is not reflected in the generated AssemblyInfo.cs.

ConsoleApp1.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <Title>Title</Title>
    <Product>Product</Product>
    <Description>Description</Description>
    <Company>Company</Company>
    <Authors>Authors</Authors>
    <PackageId>PackageId</PackageId>
  </PropertyGroup>
</Project>

Generated ConsoleApp1.AssemblyInfo.cs

//------------------------------------------------------------------------------
// <auto-generated>
//     このコードはツールによって生成されました。
//     ランタイム バージョン:4.0.30319.42000
//
//     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
//     コードが再生成されるときに損失したりします。
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("Company")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Description")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Product")]
[assembly: System.Reflection.AssemblyTitleAttribute("ConsoleApp1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// MSBuild WriteCodeFragment クラスによって生成されました。


It seems that AssemblyTitleAttribute is always using $(AssemblyName).Does anyone have the same problem?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,937 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,218 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,039 questions
0 comments No comments
{count} votes

Accepted answer
  1. gekka 9,826 Reputation points MVP
    2024-07-11T10:23:27.5266667+00:00

    The AssemblyTitleAttribute value is output from the AssemblyTitle tag in your project file

    <PropertyGroup>
        <!--<GenerateAssemblyInfo>false</GenerateAssemblyInfo>-->
        <AssemblyTitle>たいとる</AssemblyTitle>
    </PropertyGroup>
    
    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Hideo Yamada 20 Reputation points
    2024-07-11T10:33:18.6533333+00:00

    Thank you for your quick response, and not it works fine.

    ありがとうございました。

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.