question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version number is missing from dotnet publish output in linux docker images

See original GitHub issue

File Version and Product Version information are missing from .exe files that are created using dotnet publish -c Release -r win-x64 inside of a linux based docker image (mcr.microsoft.com/dotnet/core/sdk:3.1).

exe files created by dotnet build -c Release do contain File Version and Product Version information.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

2reactions
clane2812commented, Jul 23, 2021

This topic is discussed and yet open https://github.com/dotnet/sdk/issues/4127 (duplicate) https://github.com/dotnet/runtime/issues/3828 (main-topic)

1reaction
eric10k93commented, Jun 7, 2023

Just an update on this, in case it’s helpful to anyone. I realized that for a .exe file build, dotnet ALSO produces a .dll file. I WAS building with SingleFilePublish=true, but setting this to false allows me to see the .dll file that dotnet produces. The FileVersionInfo is then contained within the .dll file, just not the .exe

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet build with version is not working in docker
Hovewer the command dotnet publish overrides the desired Version number by value taken from the .csproj file. This is the reason, why Major ......
Read more >
dotnet publish command - .NET CLI
The dotnet publish command's output is ready for deployment to a hosting system (for example, a server, PC, Mac, laptop) for execution.
Read more >
Why isn't my ASP.NET Core app in Docker working?
NET Core supports CentOS, they don't provide Docker images with it preinstalled. Currently, they provide Linux Docker images based on:.
Read more >
I get ".NET location: not found" error on Linux when running ...
I get an error telling me that dotnet location is not found, even though I already have dotnet sdk installed. Reproduce. I have...
Read more >
Dotnet build linux. The answer you're looking for is basically
Building using Docker will require that you choose the correct image for your ... Hovewer the command dotnet publish overrides the desired Version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found