clowd / Clowd.Squirrel

Quick and easy installer and automatic updates for cross-platform dotnet applications
426 stars 39 forks source link

Install ASP.NET Core Runtime by --framework parameter #152

Closed danilobreda closed 11 months ago

danilobreda commented 1 year ago

Its possible to install the ASP.NET Core Runtime by --framework parameter ? I think the only framework that i can download is the Desktop version.

https://dotnet.microsoft.com/en-us/download/dotnet/7.0

danilobreda commented 1 year ago

I discovered that static DotnetInfo Parse(string input) can translate the "net7-x86-asp" for {[net7-x86-asp] .NET 7 AspNetCore (x86)}, so its maybe possible to download it dinamically today. image

danilobreda commented 1 year ago

Its not, i get this error: https://github.com/clowd/Clowd.Squirrel/blob/ece754f45d49cc9b2e45ff04d35a02d225a4939d/src/Squirrel/Runtimes.cs#L136

caesay commented 1 year ago

I'll work on this for the next release of v3

caesay commented 1 year ago

I have just tested this with the latest version of the code in the develop branch and this appears to be working as expected. Can you clarify where you tested/got that error? The current develop code with the new -asp postfixes have not yet been released - so if you are testing via nuget that is why you saw the error.

danilobreda commented 1 year ago

@caesay i tested on the build pipeline that i think is the nuget version. Good news that its working on develop! When it release to nuget i will use it. For now im publishing my app as a selfcontained, that dont need to have the runtime installed.

luislhg commented 1 year ago

@caesay in develop, would this work? --framework net6, net6-asp? Meaning, install net6 desktop and net6 asp core runtimes? Also, any way to make this work in master version?

caesay commented 1 year ago

It has been developed but not released to nuget yet. Since it's on develop it will likely only be a v3 feature.

luislhg commented 1 year ago

Actually this has a bug even in develop, the URL is fixed to WindowsDesktop. In the logs you can see it wants to download asp, but the actual url it downloads is not.

2023-08-31 16:36:57.7444 [INFO] - Runtimes: Downloading net6.0.21-x64-asp from https://dotnetcli.azureedge.net/dotnet/WindowsDesktop/6.0.21/windowsdesktop-runtime-6.0.21-win-x64.exe to C:\Users\Admin\AppData\Local\SquirrelClowdTemp\tempa\net6.0.21-x64-asp.exe

I fixed and tested this here https://github.com/clowd/Clowd.Squirrel/pull/176

luislhg commented 1 year ago

I added support for aspnetcore runtime and .NET 7 in this PR https://github.com/clowd/Clowd.Squirrel/pull/177 Hopefully it fixes and closes this issue

caesay commented 11 months ago

Closed by 220588d7dffcf04407c89e309ab33a6110f80306