Skip to content
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

Why WinExe (win-x64) app publishing is host OS dependent #11162

Closed
sergey-tihon opened this issue Apr 5, 2020 · 1 comment
Closed

Why WinExe (win-x64) app publishing is host OS dependent #11162

sergey-tihon opened this issue Apr 5, 2020 · 1 comment
Assignees
Labels
untriaged Request triage from a team member

Comments

@sergey-tihon
Copy link

sergey-tihon commented Apr 5, 2020

Why dotnet publish -r win-x64 -c release /p:PublishSingleFile=true produce different exe files on Windows and macOS?

It is strange that behavior of dotnet publish depends on my host OS and does not allow me to use my working machine (MacBook) to publish app for Windows users. Also I cannot publish app from Linux CI machine.

image

WinExe application published on macOS:

  1. smaller than the same exe generated on Windows
  2. does not have application icon
  3. start as console application

Here is the repo with hello world Avalonia application https://github.com/sergey-tihon/avalonia-win-exe

uses latest sdk

{
  "sdk": {
    "version": "3.1.201"
  }
}

project file targets netcoreapp3.1 with output type WinExe

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <ApplicationIcon>icon.ico</ApplicationIcon>
    <PublishTrimmed>true</PublishTrimmed>
  </PropertyGroup>

both generated exe files are committed in result-exe folder

on the first screen you see the difference in size and application icon, here is the difference in application start. Application exe generated on macOS start console window first and only then show the window (this does not happened for exe published on Windows)

image

Original issue AvaloniaUI/Avalonia#3723

@marcpopMSFT marcpopMSFT added the untriaged Request triage from a team member label Apr 6, 2020
@swaroop-sridhar
Copy link
Contributor

This is a dup of dotnet/runtime#3828
Currently HostModel uses Win32 API to update resources. Need to implement this functionality in managed code.

CC: @wli3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

4 participants