-
Notifications
You must be signed in to change notification settings - Fork 141
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
Migrate to dotnet core 3.1 #28
Migrate to dotnet core 3.1 #28
Conversation
Hey I'm pretty noob with that stuff. What does it change? |
This PR migrates the runtime over to .NET Core 3.1 instead of using .NET Framework 4.6.1. The major benefit is that .NET Core has a few new language features, and is the direction Microsoft is pushing for in modern apps. My main reason for doing this is that I think the current release and auto update process is a bit overly complicated so I wanted to look to simplify it a bit in some upcoming PRs. Here's an idea for a simpler release process that I could implement after this change:
This PR is a bit "out there" so if we don't want it then that's fine 👍 |
@JackRhodes I ended up implementing an updater that uses .NET 4.6.1 and github releases. feel free to take a peek at sir-wilhelm#5 for the changes. I think it's cleaner than the current implementation, but does rely on versioning the project and tagging/creating a release in github. I've not had a chance to play with publishing a self contained .netcore version yet. It might not be that bad since MHW only runs on 64bit windows machines, but it would really just be a fun thing to try. I don't see .net core happening until it can bundle the app into a self contained .exe, and behaves like the .net framework exe. |
@sir-wilhelm Just took a look, and that approach looks much better 👍 .
👆 this is definitely possible. I think I may just expand the scope of this PR to include that, else changing the dependency and not bundling the runtime will just confuse consumers of the app. I'll spend some time over the weekend doing so 👍 |
0db8435
to
654db89
Compare
44bcb2b
to
b4d8478
Compare
|
||
settings.Converters.Add(new StringEnumConverter()); | ||
settings.Converters.Add(new StringFloatConverter()); | ||
|
||
var jsonString = JsonConvert.SerializeObject(Values, settings); | ||
|
||
File.WriteAllText(FullPathFileName, jsonString); | ||
using (var fileStream = new FileStream(FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Write, 4096, FileOptions.None)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue here is that it fails to resolve the file stream correctly. So we need to explicitly grab it rather than relying on File.WriteAllText to auto resolve it for us
Ok I've been playing around with this locally, and have pushed the minimum changes needed to get .NET Core working while compiling to a single .exe with the framework bundled with it, and keeping all of the existing config files in the directory I've also added a simple github action that builds it (it's basically the default one that github gives you) |
This PR migrates to .NET Core 3.1