Slazanger / SMT

Slazanger's Eve Map Tool
MIT License
264 stars 77 forks source link

migration to .NET 5.0 #74

Closed rafaga closed 2 years ago

rafaga commented 3 years ago

I'm running a mac eve client do you have plans to migrate this app to .Net 5.0 and make compatible with MacOS ?

Slazanger commented 3 years ago

yes, the plan is to move over to .net core 5

Yerodin011 commented 2 years ago

Any news on this? :)

Slazanger commented 2 years ago

been working on it the last couple of days.. eliminating a bunch of stuff that wont work on .net core :)

Yerodin011 commented 2 years ago

Good news indeed! :)

If I can help somehow to get it running on MacOS after the move I'd be happy to do so.

rafaga commented 2 years ago

do you have a fork or a branch , that I can test and debug to help ?

Slazanger commented 2 years ago

the initial upgrade is on a new dotnet6_upgrade branch.. the app now works on Windows (although heavily untested and with a ton of compat changes still required)

rafaga commented 2 years ago

as expected doesn't run on MacOS becase it has dependencies on Windows Forms or at least is what it says SMT.sln

    <UseWindowsForms>True</UseWindowsForms>
    <UseWPF>true</UseWPF>
    <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>

if the project isn't using Windows Forms, it should be removed the dependency. by other hand if it is being used, then needs to be migrated to MAUI, but I prefer that @Slazanger express his opinion on this.

aslo when building throws this error

/usr/local/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5) : error NETSDK1100: Windows is required to build Windows desktop applications.
Unable to create package spec for project. '/Users/username/projects/SMT/SMT.csproj'
Slazanger commented 2 years ago

Yeah I only got as far as the upgrade.. consolidated and removed a bunch of stuff, upgraded so I could have a smooth transition onto .net 6.. now the fun of moving it over.

I think the only thing winforms is used for is the directory selection for the log folders, so should be a simple switch; the rest is fairly standard WPF

rafaga commented 2 years ago

Update: it also throws an error when I restore the NuGet packages, in specific with the package System.ServiceModel.Federation

/usr/local/share/dotnet/sdk/6.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5) : error NETSDK1100: Windows is required to build Windows desktop applications.
Unable to create package spec for project. '/Users/projects/SMT/SMT.csproj'

There is any alternative to this package ?

testing on MacOS X 12.3.1

Slazanger commented 2 years ago

not yet; im working my way through the compatibility warnings at the moment. The current plan is to get the windows build running as correct as possible on .net 6 and then look at how much needs replacing/rebuilding

rafaga commented 2 years ago

Ok I resolved the previous problems ... but there is a roadblock to make it multiplataform with netcore 6.0 ... WPF is not available in MacOS or Linux ... so it is not possible to run SMT in other plataforms besides Windows...

There are alternatives ... like migrating to MAUI or using something like Avalonia.

Slazanger commented 2 years ago

Switching to Avalonia is the long term plan; the main two issues are that I use AvalonDock extensively and that the WPF Shapes are too slow for the universe view ( which is why it's a little more complicated with the VisualHosts and separated input handling.. if I use the shapes, because they all inherit from UIElements the layout phase with this many pieces takes a few minutes)

rafaga commented 2 years ago

If you have any working code, can you create a branch to begin working on it? I will try to help in my free time.

Slazanger commented 2 years ago

currently just the net6 branch; once this is done and back onto the mainline can start the UI conversion.

Slazanger commented 2 years ago

ive pulled the .net 6 branch into master and will push 1.10 on .net 6

rafaga commented 2 years ago

SMT is now compatible with .net 6 framework, Thank you for your work