-
-
Notifications
You must be signed in to change notification settings - Fork 464
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
Should be able to compile on macOS with 'dotnet build' #222
Comments
Hi, I've never heard of this properly before. Does adding this option allow at least one of the dnSpy frontends (CLI or GUI) to compile without issues on Linux or MacOS? Asking this since I don't have a MacOS or Linux computer handy at the moment. If this option does indeed allow dnSpy to compile on other platforms without having any impact on the windows compilation/output binaries, I'd be willing to do this change, perhaps, if you want to you can even PR it as part of DnSpyCommon.props for example. As for running natively on other platforms, the possibility of this is rather slim since dnSpy runs on WPF, a non-cross-platform Windows UI framework, and porting it to a different UI framework would be an enormous undertaking. As for the CLI, there is a chance it could run on Linux since I don't remember there being anything Windows specific there. I would have to look into that further. |
Yes, I added the property to a few places (probably a few too many but who cares) and did build an net48 exe that I then ran via Parallels emulation. Pretty sure it's the real deal. If I get the time I do a PR. Regarding WPF, yeah I know. We have the same question at work and no good solution. I did waste a few hours and tried to run it under Wine and/or Mono but without success. Such a shame, I miss dnSpy on the macOS platform a lot. |
Just adding to
Avalonia (the cross platform UI framework for .NET) offers a solution for WPF apps to run without rewrites on top of Avalonia. Its called XPF, however it’s only a commercial solution and not designed for open source projects :/ Here is a link if you are perhaps interested: https://avaloniaui.net/XPF
Interesting, I heard some people had some degree of success with running it under Wine on Linux. |
For what it's worth, I was able to get the .NET Framework version to work using |
On Apple Silicon? Could you walk me through it? |
I'll try tonight |
Yeah, on Apple Silicon and MacOS Ventura. I think all I really did was To be specific, I'm using the wine version from the Apple Game Porting Toolkit (following https://www.applegamingwiki.com/wiki/Game_Porting_Toolkit) and I installed winetricks from x86_64 brew and ran it from an x86_64 shell but not sure whether that matters. But maybe it helps, here should be more or less the exact equivalent of what I did originally (i didn't have wine installed before this):
I then adjusted my
so it selects the right homebrew depending on the arch configuration of the shell and then restarted my shell and ran
I might have started it via the game porting toolkit but that also just starts wine:
And I then also created a dnSpy "application" using Automator following the Apple Gaming Wiki Guide:
Though just |
@benediktwerner my first naive approach gives me
I am going to try follow all your detailed steps and see if that helps. My current installation is kind of frankensteined... |
Great to hear that, the changes there have been merged into |
Great that I could help. Let's close this. |
dnSpyEx version
master
Describe the Bug
By adding
as described in NETSDK1100: Set the EnableWindowsTargeting property to true you are enabling macOS users to build the project too.
Motivation: I use Visual Studio on my MacBook to compile my projects because it is running native. I also use Parallels to run windows applications (especially dnSpy because I am a modder). If I want to do small changes to the source of dnSpy I would need to build it in Parallels which is slow.
How To Reproduce
Run
dotnet build
on macOS with the proper .NET SDk installed. It will tell you the link I posted above.Expected Behavior
It should build
Actual Behavior
It does not build
Additional Context
Maybe it should even run native on macOS - that would make my day because I do mod development at home with my stationary PC and when on the go, I prefer my lightweight MacBook Air.
The text was updated successfully, but these errors were encountered: