Squirrel / Squirrel.Windows

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

Squirrel namespace doesn't exist even after installing #1789

Closed Clonkex closed 2 years ago

Clonkex commented 2 years ago

This feels like it has to be a noob error but I have absolutely no clue what's going on. I've installed the squirrel.windows package through VS's built-in NuGet package manager, but when I try to do using Squirrel; the namespace doesn't seem to exist.

I also tried a ctrl+dot on the text UpdateManager but it doesn't suggest anything useful. I can't find anything in google either.

What the heck am I doing wrong???

image

image

caesay commented 2 years ago

Are you are trying to use .net core or .net5/6? The current version of Squirrel on nuget only supports the legacy/full framework. Additionally, the rest of Squirrel has not been updated to properly support detecting .net/core aware apps or running within a PublishSingleFile context, and it can't install the newer frameworks beyond .net framework 4.8.

If you require any of the above features, I maintain a fork here with all of those improvements and others.

Clonkex commented 2 years ago

I believe I'm using .NET Core 3.1. I'm not really sure what the versions mean or how they relate to anything. If Squirrel doesn't support those versions, why doesn't it say so in big letters in the readme? I spent so much time trying to get this working.

I also have absolutely no clue what a PublishSingleFile context is lol.

caesay commented 2 years ago

The readme can't possibly be long enough to explain the whole language ecosystem and how everything fits together, and I'm sure you'll run into lots of other things like this on your journey to learn C#. The issue about Squirrel not supporting .net core or .net 5/6 has been discussed in many other issues here on this repo.

If you open your project file (ending in .csproj) with a text/code editor, or using the VS properties dialog, you can see if you are using the Legacy .Net Framework 4, .Net Core 3.1, or the newer .Net 5/6. If you're using one of the latter, you'll need to use a fork that supports it.

Clonkex commented 2 years ago

A simple statement like "Not compatible with .NET Core, .NET 5 or .NET 6" would have covered it and saved me a lot of time. I would never expect to have to go digging through the issues in a repo to find compatibility information, that's just insane. Compatibility information is a critical and should be front and centre.

I want to try get across how confused I am by this without being rude. Imagine you downloaded an actively-maintained and apparently popular Windows program, only to find that it only runs on Windows XP for some reason. That's what this feels like to me.

Aw man I just swallowed my lolly that I was sucking on :(

Anyway this seems to be a known issue and I've discovered that ClickOnce is integrated into VS and is vastly easier to use than any other form of self-updating so I'm using that for now and closing this issue.