Set EnableWindowsTargeting
to true
#223
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
totrue
allows the target packs to be downloaded and used when building dnSpy usingdotnet 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 ofWindowsGui
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?