Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.35k stars 1.03k forks source link

No compatibility with .NET 5 / 6 #1762

Open PhilippElhaus opened 2 years ago

PhilippElhaus commented 2 years ago

Wanted to add here that in order for Squirrel to work properly .NET 4.7.2 or similar needs to be used. Custom events won't fire in .NET 5, neither in .NET 6: the App does not detect Squirrel Aware Assembly Attribute as well. It's broken on a couple smaller details. Took me the entire morning to figure this out, hope this helps for anyone having the same issues looking around.

wiggleforlife commented 2 years ago

.NET 4.7.2 is actually .NET Framework, .NET 5 is based on .NET Core and not Framework. Squirrel needs to be converted to .NET 5 and this has not been done. Unfortunately, the solution is to either fork Squirrel and convert it yourself or create a custom solution that suits your project's needs. I am converting a project to .NET 5 and the team has just made a Batch (+ Unix SH for .NET MAUI when that comes out) script to replace Squirrel, at least temporarily. See #1737

Thieum commented 2 years ago

See also https://github.com/Squirrel/Squirrel.Windows/pull/1692#issuecomment-932863504 - it solves this too.

simader commented 2 years ago

I am a little bit confused, because already several branches exists which should support .net5/6 https://github.com/AArnott/Squirrel.Windows https://github.com/clowd/Clowd.Squirrel

Is there any news if the orginial package will ever support .net6? Or when is there a next release of at least the development branch?

anaisbetts commented 2 years ago

I'll try to get to it soon. Remember that I am paid approximately $0 for this library despite literally several billion-dollar companies relying on it, and also I have three kids 🤣

theresia-tobii commented 2 years ago

@anaisbetts maybe you should set up some way to donate to the project? I am sure such a popular library would attract donations.

caesay commented 2 years ago

Custom events won't fire in .NET 5, neither in .NET 6: the App does not detect Squirrel Aware Assembly Attribute as well.

This is fixed in the fork here https://github.com/clowd/Clowd.Squirrel, which is now net6 and has no additional runtime dependencies, for all variations of published apps. It also includes support for PublishSingleFile bundles which is not fixed by #1692. In a single file bundle, the VersionBlock is un-settable (opening the resources corrupts the appended bundle) and the C# attribute is unreadable (as it's compressed/trimmed) - the only thing preserved from the entry assembly is assembly manifest - so it reads the SquirrelAwareVersion from there. Assembly manifest is also easily settable in both native and C# applications, so also adds some additional consistency. (See Clowd.Squirrel#2)

It is a available as a nuget package, but there have been many other breaking changes, fixes, improvements, etc - so read the github release notes carefully if interested.