nbt-studio icon indicating copy to clipboard operation
nbt-studio copied to clipboard

Update to .NET 6

Open TetraTheta opened this issue 3 years ago • 2 comments
trafficstars

Since NBT Studio upgraded to .NET 5, it is mandatory to install .NET Runtime to use NBT Studio. (.NET Framework 4.8 is shipped with Windows 10/11)

But .NET doesn't have 'backward compatibility'. So even if you installed .NET 6 Runtime, you must install .NET 5 Runtime which is now marked as EOL to use NBT Studio. This makes me uncomfortable.

This is just suggestion. If you have some reason that makes you cannot update to .NET 6, it is ok.

TetraTheta avatar Jul 11 '22 08:07 TetraTheta

Would you prefer downgrade to 4.8 or upgrade to 6? I didn't know 4.8 shipped with Windows; if it does and 6 doesn't it may be worth the trade

tryashtar avatar Jul 11 '22 08:07 tryashtar

I personally prefer run program 'without dependencies'.
before v1.15, NBT Studio already has .NET Framework as dependency, but since that .NET Framework is already shipped with Windows, I consider that as 'no dependencies'.

As official documentation of .NET Framework, future Windows will have .NET Framework 4.x too.

.NET Framework 4.8 is the last version of .NET Framework. .NET Framework is serviced monthly with security and reliability bug fixes. .NET Framework will continue to be included with Windows, with no plans to remove it.

There are few other projects I use that require latest .NET Runtime to be installed. So, I end up installing multiple version of .NET Runtime installed. That's why I posted this issue.

So, I'm ok with both downgrading to 4.8 or upgrading to latest version of .NET. But if you want me to pick one, I'd prefer downgrading to 4.8 if there is no breakage for downgrading.

Should I change the issue title for reflecting both changing .NET version to 4.8 or 6?

PS. The tradeoff of downgrading to 4.8 would be no multi-platform support. As far as I know, Above version of .NET Core 3 has multi-platform GUI support. So if you downgrade to .NET Framework 4.8, people using OS rather than Windows won't be able to run NBT Studio in their OS.

PPS. this article describes about the difference between .NET and .NET Framework.

TetraTheta avatar Jul 11 '22 09:07 TetraTheta

The release could be single file containing all the dependencies: https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli#sample-project-file

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <PublishSingleFile>true</PublishSingleFile>
    <SelfContained>true</SelfContained>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <PublishReadyToRun>true</PublishReadyToRun>
  </PropertyGroup>
</Project>

RezaJooyandeh avatar Dec 03 '22 02:12 RezaJooyandeh

I've tried that, but it makes the file enormous

Ideally Microsoft would make installing the dependencies seamless but apparently they don't want to do that

tryashtar avatar Dec 03 '22 20:12 tryashtar

I think it is expected for the file to grow if all the dependencies are bundled in a single file. You could either install the dependencies separately or bundle in a single file.

RezaJooyandeh avatar Dec 20 '22 20:12 RezaJooyandeh

I was able to get this updated to .net6.0. Seems to be working fine, all tests passed. If anyone is still interested it's on my fork here.

Zoranan avatar Dec 23 '22 03:12 Zoranan

actually, this is already updated to .NET 6 according to the latest release

TetraTheta avatar Dec 23 '22 04:12 TetraTheta

Oh, odd. When I cloned down the code all the projects were set to .NET 5 still, but I didn't check the releases

Zoranan avatar Dec 23 '22 15:12 Zoranan