Share via

<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?

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

Developer technologies | C#
Developer technologies | 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.

0 comments No comments
{count} votes

Answer accepted by question author
  1. gekka 13,976 Reputation points MVP Volunteer Moderator
    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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.