Squirrel.Windows: Squirrel namespace not available in .NET Core

Squirrel version(s) 2.0.0 and 1.9.1

Description The Squirrel namespace is not available, after squirrel.windows was installed.

Steps to recreate

mkdir testapp
cd testapp
dotnet new wpf
dotnet add package squirrel.windows --version 2.0.0
dotnet build

Open the project with VS2019 and try to access the namespace.

Actual behavior Cannot access Squirrels namespace.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Also having this issue on .NET 5.0, .NET Core 3.0 and .NET Core 3.1

GitHub sponsoring / open collective (if Squirrel has one) / etc would be great. It’s a way to show appreciation for the hard work being done by others.

I would like to emphasize again: you can simply wrap the executable and run it. You can use this from any app (even VBA or whatever your preference is). You don’t have to reference Squirrel directly.

You can view an example implementation here:

https://github.com/WildGums/Orc.Squirrel/blob/develop/src/Orc.Squirrel/Services/UpdateService.cs

Or you can just consume that package (Orc.Squirrel) and use it directly as wrapper for your .NET Core / 5 projects.

I am happy to look into this. I don’t really need this feature myself but happy to contribute.

Interested in a deal that helps out all of us? If so, then either support @anaisbetts (preferred) for her hard work on Squirrel or me and I’ll implement this.

I am happy to look into this, but I have another PR (#1656) open and would like to see that one closed first.

The workaround for now is this:

  <ItemGroup>
    <PackageReference Include="Squirrel.Windows" Version="2.0.1" GeneratePathProperty="true" />
  </ItemGroup>
  <ItemGroup>
    <!-- workaround for https://github.com/Squirrel/Squirrel.Windows/issues/1649 -->
    <Reference Include="$(PkgSquirrel_Windows)\lib\Net45\*.dll" />
  </ItemGroup>

Of course this is just one of the issues that a .NET Core app will hit in using squirrel.

Hi, could you please a little sample o give me more details. Thanks!

Add a new library to your solution, which is targeting the old .NET Framework (.NET Framework 4.7 for example). Add Squirrel as NuGet dependency, then paste these classes.

In your main project add a reference to this project and use the proxy UpdateManager class.

This works for me at this time.

I’ve been using 1.9.0 on .net core due to this problem, and it’s working well. Not sure what’s causing it, though!

I am preparing a PR for this repo that adds proper .NET Standard 2.0 support. I hope they’ll take it.

Nope, not dead. Squirrel is just a lower priority than WiX v4 is for me right now. No one pays us to work on Squirrel yet so it remains a lower priority than things that pay the bills.

We wrapped the executable for our .NET Core implementation. You can find it here as a reference: https://github.com/WildGums/Orc.Squirrel/blob/develop/src/Orc.Squirrel/Services/UpdateService.cs

The exe wrapper works as good as calling the libs, and we no longer need to update references for updates to Squirrel (you can independently update Squirrel in your infrastructure only).