microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.38k stars 2.22k forks source link

.NET 5.0 RC2 - self-contained build on Linux - version missing in generated file #1258

Closed rasmk closed 3 years ago

rasmk commented 4 years ago

When I build a self-contained app on Linux (in a Docker container), targeted to win-64, the generated exe file misses version, copyright, and other information. When built on Windows, the information is built into the exe file as expected.

See screenshot: left side is macOS build, right - Windows build. image

My build task in VS Code is

        {
            "label": "publish - windows, self-contained",
            "command": "dotnet",
            "type": "process",
            "args": [
                "publish",
                "-c",
                "release",
                "-r",
                "win-x64",
                "-p:PublishSingleFile=true",
                "-p:UseAppHost=true",
                "--self-contained",
                "true"
            ],
            "options": {
                "cwd": "${workspaceFolder}/MessageBroker",
            },
            "problemMatcher": "$msCompile"
        },
kalaskarsanket commented 3 years ago

Since this issue was with RC2, closing it for now. If you experience the same issue with .NET 5.0 GA kindly raise the issue with dotnet/runtime .