SteamQuery.NET 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package SteamQuery.NET --version 1.0.2                
NuGet\Install-Package SteamQuery.NET -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SteamQuery.NET" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SteamQuery.NET --version 1.0.2                
#r "nuget: SteamQuery.NET, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SteamQuery.NET as a Cake Addin
#addin nuget:?package=SteamQuery.NET&version=1.0.2

// Install SteamQuery.NET as a Cake Tool
#tool nuget:?package=SteamQuery.NET&version=1.0.2                

NuGet Version (SteamQuery.NET) NuGet Downloads (SteamQuery.NET)

SteamQuery.NET

Yet another Steam server queries .NET wrapper.

Supports GoldSource and Source protocols and The Ship: Murder Party, SiN, and Rag Doll Kung Fu servers.

Usage Example

You can check the ExampleApplication project!

var server = new Server("127.0.0.1:27015");

var information = await server.GetInformationAsync();

Console.WriteLine($"Server Name: {information.ServerName}");

server.Close();

Or you can use using keyword to let .NET take care of the disposal process of server object;

using var server = new Server("127.0.0.1", 27015);

var information = await server.GetInformationAsync();
Console.WriteLine($"Server Name: {information.ServerName}");

var players = await server.GetPlayersAsync();
Console.WriteLine($"Online Players: {players.Count}/{information.MaxPlayers}");

var rules = await server.GetRulesAsync();
foreach (var rule in rules)
{
    Console.WriteLine($"{rule.Name} = {rule.Value}");
}

You can also use a host name, instead of IP address. And also the synchronous methods!

using var server = new Server("localhost:27015");

var information = server.GetInformation();

Console.WriteLine($"Server Name: {information.ServerName}");

Supported Frameworks

❌ Not Supported ✅ Supported
.NET 5.0-8.0
.NET Core 1.0-1.1 2.0-3.1
.NET Framework<sup>[1]</sup> 1.0-4.6 4.6.1<sup>[2]</sup>-4.8.1

[1]

The versions listed for .NET Framework apply to .NET Core 2.0 SDK and later versions of the tooling. Older versions used a different mapping for .NET Standard 1.5 and higher.

[2]

The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.

To-Do

  • Obsolete, pre-Steam GoldSource protocol.
  • bzip2 decompression. (It's kind of implemented. I just couldn't find any server that uses bzip2 compression. If you know any, just hit me up. I'd appreciate it.)
  • Master Server Query Protocol.

For More Information

If you want to learn more about Steam's server queries and their weird behaviors, check Steam server queries developer community page and talk page about it.

Product 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 is compatible.  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 was computed. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.4 154 10/30/2024
1.1.3 77 10/29/2024
1.1.2 488 5/20/2024
1.1.1 687 2/9/2024
1.1.0 151 2/9/2024
1.0.2 121 2/7/2024
1.0.1 125 2/6/2024
1.0.0 125 2/6/2024