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

No compatibility with .NET 5 / 6

Open PhilippElhaus opened this issue 3 years ago • 6 comments

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.

PhilippElhaus avatar Oct 31 '21 09:10 PhilippElhaus

.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

wiggleforlife avatar Nov 03 '21 04:11 wiggleforlife

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

Thieum avatar Nov 03 '21 12:11 Thieum

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?

simader avatar Nov 18 '21 13:11 simader

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 🤣

anaisbetts avatar Nov 19 '21 15:11 anaisbetts

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

theresia-tobii avatar Nov 22 '21 14:11 theresia-tobii

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.

caesay avatar Dec 06 '21 15:12 caesay