Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set AssemblyTitle from Title or Description #35145

Open
AchimStuy opened this issue Sep 5, 2023 · 4 comments
Open

Set AssemblyTitle from Title or Description #35145

AchimStuy opened this issue Sep 5, 2023 · 4 comments
Labels
Area-WebSDK untriaged Request triage from a team member

Comments

@AchimStuy
Copy link

Is your feature request related to a problem? Please describe.

In order to set the File description of an assembly file, one must set the <AssemblyTitle>.

Describe the solution you'd like

Instead this could be infered from the package properties <Description> (that's what I actually expected) or <Title>.

Additional context

See also https://stackoverflow.com/questions/73736846/how-to-specify-assembly-description-in-an-sdk-style-project

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-WebSDK untriaged Request triage from a team member labels Sep 5, 2023
@AchimStuy
Copy link
Author

AssemblyTitle is currently inferred from AssemblyName in src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.DefaultAssemblyInfo.targets.

@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Sep 5, 2023

IIRC, Windows has some undocumented limit on the size of the VERSIONINFO resource. If a project sets a long Description for NuGet purposes, and .NET SDK starts copying that to AssemblyTitleAttribute, then the limit might be exceeded and Windows Explorer might not display any version information for that file, even though the VERSIONINFO resource was successfully written into the file.

The limit was discussed in dotnet/msbuild#8720.

@KalleOlaviNiemitalo
Copy link

In Windows 10, if you right-click a taskbar button, then the menu that pops up shows the AssemblyTitleAttribute, truncating it with an ellipsis if it is too long. I think this is another reason not to default AssemblyTitle from Description, which may be longer.

(The task bar caches the title and may keep showing the previous title even after you rebuild the assembly with a different title.)

@AchimStuy
Copy link
Author

Okay, I didn't know that. I still wonder, why Description is inferred from AssemblyTitle, but that's another discussion. In order to help my request, could AssemblyTitle be inferred from Title property, or is there also something against this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-WebSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants