Version number is missing from dotnet publish output in linux docker images
See original GitHub issueFile 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:
- Created 3 years ago
- Reactions:6
- Comments:7
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This topic is discussed and yet open https://github.com/dotnet/sdk/issues/4127 (duplicate) https://github.com/dotnet/runtime/issues/3828 (main-topic)
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