WGet.NET
3.0.0-alpha2
See the version list below for details.
dotnet add package WGet.NET --version 3.0.0-alpha2
NuGet\Install-Package WGet.NET -Version 3.0.0-alpha2
<PackageReference Include="WGet.NET" Version="3.0.0-alpha2" />
paket add WGet.NET --version 3.0.0-alpha2
#r "nuget: WGet.NET, 3.0.0-alpha2"
// Install WGet.NET as a Cake Addin #addin nuget:?package=WGet.NET&version=3.0.0-alpha2&prerelease // Install WGet.NET as a Cake Tool #tool nuget:?package=WGet.NET&version=3.0.0-alpha2&prerelease
WGet.NET
β What is WGet.NET
WGet.NET is a WinGet wrapper library for .Net.
I created it for another project and then made a library out of it in hope it might be usefull to someone else too.
If you tried this library, please give me some feedback. And if you miss a feature, you can create an issue to let me know.
π Documentation
https://basicx-strgv.github.io/WGet.NET/
β‘ Features
Support: .Net Core 3.1, .Net Standard 2.0
- WinGet
- Get a list of installed packages
- Search installed packages
- Search packages
- Install packages
- Uninstall packages
- Upgrade packages
- Get a list of upgradeable packages
- Export and Import packages
- Check if WinGet is installed
- Get the WinGet version number
- Get installed sources
- Add sources
- Remove sources
- Update sources
- Export and Import sources
- Reset sources
- Calculate file hash
- Export Settings
- Other
- Asynchronous Execution
π¦ NuGet Package
You can get the NuGet package here: https://www.nuget.org/packages/WGet.NET/
β Requirements
WinGet needs to be installed on the system.
If WinGet is not installed on your system you can get it here: https://github.com/microsoft/winget-cli
π‘ Getting started
The needed namespace is WGetNET (using WGetNET;
).
This namespace contains the three classes, that are used to perform actions or get information with winget.
WinGetInfo:
The WinGetInfo class can be used to get information about WinGet itself.
This class is inherited by the WinGetPackageManager and WinGetSourceManager class.
USing this class to check if winget is installed could look like this:
WinGetInfo wingetInfo = new WinGetInfo();
if (wingetInfo.WinGetInstalled)
{
Console.WriteLine("WinGet is installed.");
}
else
{
Console.WriteLine("WinGet is NOT installed.");
}
WinGetPackageManager:
The WinGetPackageManager class is used for everything that has to do with packages.
It can install, remove, upgrade, search, list, export and import packages.
The code for installing a package could look like this:
WinGetPackageManager packageManager = new WinGetPackageManager();
packageManager.InstallPackage("Git.Git");
WinGetSourceManager:
The WinGetSourceManager class is used for everything that has to do with sources.
It can list, add, update, export, reset and remove sources.
To use the add, remove and reset functions, the process needs to have administrator privileges.
(WinGet canβt perform these actions without administrator privileges)
The code for adding a source could look like this:
WinGetSourceManager sourceManager = new WinGetSourceManager();
sourceManager.AddSource("msstore", "https://storeedgefd.dsx.mp.microsoft.com/v9.0", "Microsoft.Rest");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- System.Security.Principal.Windows (>= 5.0.0)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
- System.Security.Principal.Windows (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on WGet.NET:
Repository | Stars |
---|---|
nkdAgility/azure-devops-migration-tools
Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Work Items, Tasks, Test Cases, and Plans & Suits from one Project to another in Azure DevOps / TFS both within the same Organisation, and between Organisations.
|
|
yoshiask/FluentStore
A unifying frontend for Windows app stores and package managers
|
Version | Downloads | Last updated | |
---|---|---|---|
4.2.0 | 1,197 | 9/11/2024 | |
4.1.1 | 458 | 8/27/2024 | |
4.1.0 | 1,810 | 4/13/2024 | |
4.0.1 | 1,158 | 1/17/2024 | |
4.0.0 | 149 | 1/15/2024 | |
3.2.0 | 656 | 11/4/2023 | |
3.1.0 | 215 | 10/19/2023 | |
3.0.0 | 197 | 10/17/2023 | |
3.0.0-alpha2 | 132 | 10/13/2023 | |
3.0.0-alpha1 | 128 | 10/13/2023 | |
2.3.0 | 300 | 5/23/2023 | |
2.2.0 | 184 | 5/8/2023 | |
2.1.0 | 233 | 4/23/2023 | |
2.0.3 | 210 | 4/22/2023 | |
2.0.2 | 673 | 9/18/2022 | |
2.0.1 | 495 | 6/14/2022 | |
2.0.0 | 497 | 2/26/2022 | |
1.2.0 | 422 | 9/7/2021 | |
1.1.0 | 401 | 9/5/2021 | |
1.0.1 | 412 | 6/21/2021 | |
1.0.0 | 466 | 6/19/2021 |