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

Assembly informational attributes not applied for .net core app #2197

Open
weshaggard opened this issue Apr 27, 2018 · 4 comments
Open

Assembly informational attributes not applied for .net core app #2197

weshaggard opened this issue Apr 27, 2018 · 4 comments
Milestone

Comments

@weshaggard
Copy link
Member

@karelz commented on Fri Apr 27 2018

From @Priya91 on April 27, 2018 1:33

Repro:

  1. Create a .net core app
  2. Set the following properties in the csproj
<PropertyGroup>
    <OutputType>Exe</OutputType>
    <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <AssemblyTitle>Assembly Information Repro</AssemblyTitle>
    <AssemblyProduct>Assembly Information Repro</AssemblyProduct>
    <AssemblyDescription>Assembly Information Repro</AssemblyDescription>
    <Product>Assembly Information Repro</Product>
    <PublisherName>tester</Publishername>
</PropertyGroup>
  1. Publish the app.

Expected:
The properties on <assemblyname>.exe are set as per the info provided in the csproj.

Actual:
The properties are set only for <assemblyname>.dll, not on the <assemblyname>.exe. Note, the .exe is the one that runs, and is shown in task manager, firewall prompts, etc. So without the process information, on task manager, it doesn't have a description, and on firewall prompts, it shows the publisher as unknown.

AssemblyMetadata.dll

image

AssemblyMetadata.exe

image

Copied from original issue: dotnet/corefx#29362


@karelz commented on Fri Apr 27 2018

From @kasper3 on April 27, 2018 6:21

Belongs to https://github.com/dotnet/sdk?

@livarcocc
Copy link
Contributor

This is a known bug.

@livarcocc livarcocc added this to the 2.2.1xx milestone Apr 27, 2018
@tannergooding
Copy link
Member

I have a prototype, which uses P/Invoke to get this working on Windows: https://github.com/tannergooding/sdk/tree/embed-verinfo

I am still investigating if we can use something like S.R.Metadata so that cross-platform publishing works as well (publishing for Windows, on Linux, should also embed this information).

https://github.com/dotnet/corefx/issues/7875 tracks official S.R.Metadata support for doing this.

@livarcocc livarcocc modified the milestones: 2.2.1xx, 3.0.1xx Jun 12, 2019
@marcpopMSFT marcpopMSFT modified the milestones: 3.0.1xx, Backlog Oct 26, 2021
@KalleOlaviNiemitalo
Copy link
Contributor

I am still investigating if we can use something like S.R.Metadata so that cross-platform publishing works as well (publishing for Windows, on Linux, should also embed this information).

That part may be a duplicate of dotnet/runtime#3828, which has since been fixed.

Is there anything remaining in this issue, or has everything been fixed now?

@ckuetbach
Copy link

I was able to create an executable for windows running a linux docker image with these information. It seems to be fixed with this PR: dotnet/runtime#89303

It should be working since RC1 of dotnet 8.0, I did test it with RC2 and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants