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

Set EnableWindowsTargeting to true #223

Merged
merged 1 commit into from
Jul 30, 2023
Merged

Conversation

ElektroKill
Copy link
Member

Link to issue(s) this pull request covers:
#222

Problem

dnSpy did not compile on macOS, or other non-windows platforms due to missing targeting packs.

Solution

Setting EnableWindowsTargeting to true allows the target packs to be downloaded and used when building dnSpy using dotnet build on platforms other than Windows.

It is worth mentioning that the builds compiled on non-Windows platforms are not 1:1 to the builds compiled on Windows due to the limitations mentioned in the note here:
https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting
Most notable of which is the presence of the console dialog when launching the compiled version on Windows due to the subsystem field in the PE being set incorrectly to WindowsCui instead of WindowsGui and the missing Win32 resources which cause the file icon as well as properties to be blank on Windows.

@pardeike Could you please verify if the changes in this PR allow you to compile dnSpy on macOS?

@ElektroKill ElektroKill force-pushed the feature/windowstargeting branch from 8477b66 to d9dde32 Compare July 27, 2023 20:21
@ElektroKill
Copy link
Member Author

It seems that the issues regarding the incorrect PE image subsystem and missing icon and properties are a known bugs that might get fixed in .NET 8
Related issue: dotnet/runtime#3828
Currently open PR to remedy this issue: dotnet/runtime#89303

@ElektroKill ElektroKill merged commit 6514274 into master Jul 30, 2023
@ElektroKill ElektroKill deleted the feature/windowstargeting branch July 30, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant