Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

.NET Core 3.0 support

Open themightylc opened this issue 6 years ago • 22 comments

Are there any plans to support .NET Core 3.0? I've run the compatibility analysis tool and quite a few issues with Squirrel pop up - all of them categorized as "not supported". I am very much interested to moving my WPF application to .NET Core 3.0 and it would be a shame (mildly put) to lose Squirrel. I am quite confident that I won't be able do it myself. :)

themightylc avatar Aug 18 '18 06:08 themightylc

@themightylc You can use Squirrel with .NET Core similarly to how non-C# applications use Squirrel, by running Update.exe, instead of using the C# API

anaisbetts avatar Aug 18 '18 17:08 anaisbetts

Oh cool, i wasn't even aware of that. I'll look into it when/if the time comes to do the port.

Got a couple of other third-party-dependencies, whose developers I have to pester first ;)

Thank you for the quick response!

Paul Betts [email protected] schrieb am Sa., 18. Aug. 2018, 19:12:

@themightylc https://github.com/themightylc You can use Squirrel with .NET Core similarly to how non-C# applications use Squirrel, by running Update.exe, instead of using the C# API

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Squirrel/Squirrel.Windows/issues/1374#issuecomment-414072803, or mute the thread https://github.com/notifications/unsubscribe-auth/AF5xDosqNoT_QDeW_uVEoiFiTIZ8TU-uks5uSErugaJpZM4WCdQx .

themightylc avatar Aug 18 '18 19:08 themightylc

@anaisbetts You mean by calling Update.exe from c# code like below?

Process.Start("Update.exe");

mihaimyh avatar Sep 13 '19 14:09 mihaimyh

@mihaimyh u got it, but you need to use GetEntryAssembly to get your own path, then go up a directory

anaisbetts avatar Sep 18 '19 06:09 anaisbetts

@anaisbetts How should I handle this situation in debugging mode? I won't have Update.exe in my debugging folder. Should I include Squirrel.exe in the solution?

mihaimyh avatar Sep 18 '19 07:09 mihaimyh

Another suggestion is: with net .net-core 3 we are able to generate a nuget package for our project right from Visual Studio by adding the following to the .csproj:

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

It will be useful if squirrel can releasify that package instead.

mihaimyh avatar Sep 18 '19 07:09 mihaimyh

@mihaimyh don't run updates in debug mode, that's silly!

As to .Net Core, the packages they generate are useless, you have to package manually, sorry

anaisbetts avatar Sep 18 '19 07:09 anaisbetts

@anaisbetts Thanks, my question was rather about debugging the updates, but I found my answer here https://github.com/Squirrel/Squirrel.Windows/blob/develop/docs/using/debugging-updates.md

mihaimyh avatar Sep 18 '19 07:09 mihaimyh

Is there a way to find if the .net-core version of the app was installed successfully by Squirrel before I should proceed with uninstalling the ClickOnce version?

mihaimyh avatar Sep 21 '19 12:09 mihaimyh

If your app is running, it worked! Put the ClickOnce uninstaller in your app

anaisbetts avatar Sep 21 '19 12:09 anaisbetts

Are there any plans to port the squirrel.windows NuGet package to .NET Standard/.NET Core so we can use the UpdateManager in a .NET Core 3 WPF application (for example)?

eduardomhg avatar Oct 09 '19 20:10 eduardomhg

@eduardomhg Squirrel ports to .Net core pretty cleanly. The most irritating part was that its dependent packages need to be upgraded to .Net Standard versions, and there were some breaking API changes in at least a couple (Splat and SharpCompress IIRC), and a couple others didn't offer .Net Standard packages at all (Delta Compression, WpfAnimation). But fortunately everything is open source, so it was fairly straightforward to track down the relevant commits and see what changes were required, and to create builds of the projects that hadn't yet been ported.

There's a special circumstance with migrating to Core, though. Anyone with an existing legacy framework application in the field (like me) is in a weird spot. Squirrel handles the underlying framework dependency via its setup program, but users are past that step. So we either have to ask them to install the Core runtime, or live with self-contained dists.

Anyway, I am doing functional and integration testing on the migrated projects as time allows. If I make it as far as a successful Squirrel deployment of my own application's .Net Core port, I'll consider my efforts successful and share what I've done.

Macready31 avatar Oct 16 '19 19:10 Macready31

Are there any plans to port the squirrel.windows NuGet package to .NET Standard/.NET Core so we can use the UpdateManager in a .NET Core 3 WPF application (for example)?

No, Squirrel's current API is basically set in stone. vNext would probably provide a similar API as a shim, but afaik zero people are working on it. I would not try to port Squirrel to .NET Core wholesale, I'd try to write a version of UpdateManager that uses the non-C# API

anaisbetts avatar Oct 16 '19 19:10 anaisbetts

I have got it working with a Winforms .net core 3.0 application

Stijn98s avatar Nov 09 '19 13:11 Stijn98s

I have got it working with a Winforms .net core 3.0 application

Mind sharing implementation details?

mihaimyh avatar Nov 11 '19 05:11 mihaimyh

it is the same as .net framework. you can use de example .nuspec and change the implementing files to bin\Debug\netcoreapp3.0\*.*. Here is mine https://pastebin.com/wVEZSxnr. Also with .net core you can automaticly generate the .nuspec and .nupkg with setting <GeneratePackageOnBuild>true</GeneratePackageOnBuild> in the .csproj (https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli)

Stijn98s avatar Nov 11 '19 08:11 Stijn98s

and downgrade to 1.9.0. with 1.9.1 i couldn't access the namespace. still debugging why

Stijn98s avatar Nov 11 '19 09:11 Stijn98s

it is the same as .net framework. you can use de example .nuspec and change the implementing files to bin\Debug\netcoreapp3.0\*.*. Here is mine https://pastebin.com/wVEZSxnr. Also with .net core you can automaticly generate the .nuspec and .nupkg with setting true in the .csproj (https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli)

exclude worked like this <file src="bin\Release\netcoreapp3.1\publish\*.*" target="lib\netcoreapp3.1\" exclude="**\*.pdb;**\*.nupkg;**\*.vshost.*"/>

thanks for your comments

bbilginn avatar May 15 '20 14:05 bbilginn

it is the same as .net framework. you can use de example .nuspec and change the implementing files to bin\Debug\netcoreapp3.0\*.*. Here is mine https://pastebin.com/wVEZSxnr. Also with .net core you can automaticly generate the .nuspec and .nupkg with setting true in the .csproj (https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli)

exclude worked like this <file src="bin\Release\netcoreapp3.1\publish\*.*" target="lib\netcoreapp3.1\" exclude="**\*.pdb;**\*.nupkg;**\*.vshost.*"/>

thanks for your comments

If my app is a standalone publish Im assuming I dont have any framework dependencies?

Jonesie avatar May 26 '20 01:05 Jonesie

it is the same as .net framework. you can use de example .nuspec and change the implementing files to bin\Debug\netcoreapp3.0\*.*. Here is mine https://pastebin.com/wVEZSxnr. Also with .net core you can automaticly generate the .nuspec and .nupkg with setting true in the .csproj (https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli)

exclude worked like this <file src="bin\Release\netcoreapp3.1\publish\*.*" target="lib\netcoreapp3.1\" exclude="**\*.pdb;**\*.nupkg;**\*.vshost.*"/> thanks for your comments

If my app is a standalone publish Im assuming I dont have any framework dependencies?

Unfortunately. I think it will happen when squirrel gives for 3.x support in the future.

bbilginn avatar Jun 22 '20 06:06 bbilginn

@anaisbetts any complete example with .NET 5.0?

MuhammadNoman-SE avatar Apr 08 '21 06:04 MuhammadNoman-SE

@themightylc You can use Squirrel with .NET Core similarly to how non-C# applications use Squirrel, by running Update.exe, instead of using the C# API

@anaisbetts is there any documentation for how to do this? Thanks!

legistek avatar Oct 08 '21 19:10 legistek