kuiperzone / PupNet-Deploy

PupNet Deploy is a cross-platform deployment utility which packages your .NET project as a ready-to-ship installation file in a single step.
GNU Affero General Public License v3.0
193 stars 6 forks source link

Installing PupNet as a global dotnet tool for .NET 6 #8

Closed stuarthillary closed 1 year ago

stuarthillary commented 1 year ago

I tried to install PupNet as a global dotnet tool on a Redhat instance that has version 6.0.109 of the .NET SDK installed.

dotnet tool install -g KuiperZone.PupNet

/tmp/ee3wivvg.bfh/restore.csproj : error NU1202: Package KuiperZone.PupNet 1.2.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0) / any. Package KuiperZone.PupNet 1.2.1 supports: net7.0 (.NETCoreApp,Version=v7.0) / any
The tool package could not be restored.
Tool 'kuiperzone.pupnet' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

Would it be possible to widen the .NET version compatibility of PupNet when installing as a global tool?

kuiperzone commented 1 year ago

Yup that's unfortunate it. I wrote it for .NET7 as at the time as I wasn't planning on building a dotnet tool like this, and the other installations are self-contained.

Could you not simply install the .NET7 SDK or runtime? That will not stop you building for .NET6.

stuarthillary commented 1 year ago

Ordinarily, I would just install the .NET 7 SDK. I am working on a CI server where we are working with .NET 6 SDK (which is LTS) rather than .NET 7 (which is STS). There is a workaround though, which is to use the RPM package for PupNet installation.

kuiperzone commented 1 year ago

I guess if I sound reluctant it is because I wouldn't want to have to release two versions: one for .NET6 and one for 7, with .NET8 just around the corner.

It isn't clear to me with a .NET6 app will run on an .NET7 runtime. However, I guess we can try it.

https://github.com/dotnet/runtime/issues/35556

stuarthillary commented 1 year ago

I think, in principle an app compiled with the .NET 6 SDK should run on the .NET 7 runtime. However, there may be some breaking changes that affect things

https://learn.microsoft.com/en-us/dotnet/core/compatibility/7.0

kuiperzone commented 1 year ago

Done: https://github.com/kuiperzone/PupNet-Deploy/releases/tag/v1.2.2

Will address RPM issues separately.