-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ApplicationManifest
is not respected when building for Windows on Linux
#23627
Comments
This seems a duplicate of dotnet/runtime#3828. The Roslyn compiler embeds the manifest as a Win32 resource to the DLL all right, but a separate tool is supposed to copy the Win32 resources to the apphost EXE, and that part still uses the Windows API so cannot work on Linux. ResourceUpdater.IsSupportedOS(), CreateAppHost.ExecuteCore() |
If it had been a GUI app, then you'd have got warning NETSDK1074. But there's no warning about losing resources of a console app in a similar way. |
Oh dammit ... :/ |
@vitek-karas @agocke this looks like an longstanding issue in the host model code. Is that something ya'll are considering looking into? |
Looks like a dupe of dotnet/runtime#3828. Have not scheduled it for a release yet. |
Adding to the severity is that I couldn't make |
Just chiming in here to voice my need for this feature as well. |
Any update on this? |
This has not been implemented yet -- the recommendation is still to build your Windows build on Windows in CI. There's no functionality difference here for Core vs Desktop, it's just a requirement that you build on Windows when creating a Windows GUI app. |
Is it planned for any future release? To be clear, this is a console app rather than GUI (which of course would have to be built on windows) and since we're building all the other parts of this solution on linux it would be much simpler if we didn't need windows just to embed the manifest into the final exe. |
Definitely something we would like to implement, it just hasn't yet raised in priority enough to beat out a variety of other bug fixes and features. We would accept a community PR if someone wants to offer one. |
Just to be clear, there is no real reason why we couldn't build Windows GUI apps on linux. It's just the manifest that is broken, even for GUI apps. |
dotnet/runtime#3828 has been fixed. According to dotnet/runtime#3828 (comment), the fix will be in .NET 8. |
Just tested this on .NET 8. It does indeed support embedding application manifests on Linux. The issue can be closed. |
Describe the bug
We want to create a Windows .EXE from our application, in our Linux build chain. We can sucessfully create and run the exectuable on windows, but it comes without the manifest we put in the
ApplicationManifest
property in our csproj file.When building on Windows, the manifest is embedded correctly.
To Reproduce
Create a manifest file to embed, like
MyApp.manifest
:In a new console app, add the
ApplicationManifest
to aPropertyGroup
:Build it on Windows:
Build it in Linux (f.ex. the Dotnet 6 SDK docker images):
Exceptions (if any)
N/A
Further technical details
Windows
Docker (Linux)
The text was updated successfully, but these errors were encountered: