-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Linux dotnet publish fails to add metadata to exe #5338
Comments
win-x64 is a Windows identifier. If you're running on Linux and you want to specify a Linux runtime, then you should use the appropriate RID listed at https://docs.microsoft.com/dotnet/core/rid-catalog. Probably linux-x64 would be the right one for your machine. |
I am running the compiled code on Windows, not Linux. I did attempt to change that option on the compile command but that did not help with the metadata. |
@mairaw don't know if you subscribe to the issues you respond in. Pinging so that you can see I responded :) |
This is a known problem - no Win32 resources will be added to the executable if built on non-Windows platform. |
@vitek-karas is this by design or is there another issue capturing that? |
There is an issue - I just can't find it right now :sad: |
Finally found it - at least one (there are many copies of this, I'm trying to consolidate): dotnet/runtime#3828 |
Thanks @vitek-karas. So closing this one as a duplicate. |
For those reviewing the upstream issue: I've also have this problem when building inside a Windows Container (namely |
Although my csproj contains the values to add to the file metadata, running dotnet publish on CentOS 7 Linux fails to apply metadata without any errors...
When I build on Windows 10 it applies the metadata as expected.
On both OSes I use the following publish command...
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true
The text was updated successfully, but these errors were encountered: