2

I have a .Net Core v2.2 project and I set the Publish options as follows:

enter image description here

I also set the Package information:

enter image description here

Also modified the .csproj file as follows:

enter image description here

The Details of the generated(?) exe looks like this:

enter image description here

What else should I set to make those informations appear not only in the dll file but in the exe file as well?

UPDATE

According to the possible answer, there is a fundamental change in the upcoming version of the .Net Core SDK starting with version 3.0. After verification, this question and answer will help solving the issue instead of providing an explanation of why it can't be done.

Nestor
  • 8,194
  • 7
  • 77
  • 156
  • Possible duplicate of [Setup exe file version when publishing with dotnet](https://stackoverflow.com/questions/43516625/setup-exe-file-version-when-publishing-with-dotnet) – Thangadurai Sep 19 '19 at 04:52
  • Hi, any update for this issue? If it's resolved and won't block you, please let me know :) – LoLance Sep 19 '19 at 08:12
  • @LanceLi-MSFT Will it change in the upcoming v3.0 release? We can't tell if the actual version is okay, unless we do some assembly checking. – Nestor Sep 20 '19 at 08:31
  • @Nestor Try updating your VS2019 to latest 16.2.5, and then install the latest rc version 3.0 sdk [here](https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-3.0.100-rc1-windows-x64-installer). After that, though I create a simple .net core2.2 project, the FileVersion can work for the xx.exe now. Strange but it do work in my remote server :) – LoLance Sep 20 '19 at 09:32
  • @LanceLi-MSFT I'll try it on Tuesday, with the released version :) Add this information to your answer and I'll accept it on next week if it proves to be accurate with the release as well. – Nestor Sep 20 '19 at 10:25
  • @Nestor Updated, and since it also work for even .net 2.1 projects now, I will try to confirm this issue is solved by latest VS or latest .net core rc version, I'll update the answer after I can confirm it. – LoLance Sep 20 '19 at 10:33
  • Hi, any update for this issue? Can the latest VS2019 and latest .net core 3.0.1 rc sdk help resolves it in your machine :) – LoLance Sep 26 '19 at 05:11
  • @LanceLi-MSFT Yes, the new 3.0 release works well, it takes the _Version_ information. You can modify your answer by updating it to the released version, I'll accept it. – Nestor Sep 26 '19 at 13:56
  • @Nestor Hi, answer updated:) – LoLance Sep 27 '19 at 01:22

1 Answers1

2

What else should I set to make those informations appear not only in the dll file but in the exe file as well?

I updated my Visual Studio 2019 to version 16.2.5 (latest is 16.3.1) and installed the new .Net Core 3.0 SDK. After that the generated exe contains all the version information and can be used as expected.
SDK download link.

Community
  • 1
  • 1
LoLance
  • 25,666
  • 1
  • 39
  • 73