DepotDownloaderSubProcess 3.4.0-sp1

This is a prerelease version of DepotDownloaderSubProcess.
There is a newer version of this package available.
See the version list below for details.
dotnet add package DepotDownloaderSubProcess --version 3.4.0-sp1
                    
NuGet\Install-Package DepotDownloaderSubProcess -Version 3.4.0-sp1
                    
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="DepotDownloaderSubProcess" Version="3.4.0-sp1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DepotDownloaderSubProcess" Version="3.4.0-sp1" />
                    
Directory.Packages.props
<PackageReference Include="DepotDownloaderSubProcess" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DepotDownloaderSubProcess --version 3.4.0-sp1
                    
#r "nuget: DepotDownloaderSubProcess, 3.4.0-sp1"
                    
#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.
#:package DepotDownloaderSubProcess@3.4.0-sp1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DepotDownloaderSubProcess&version=3.4.0-sp1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DepotDownloaderSubProcess&version=3.4.0-sp1&prerelease
                    
Install as a Cake Tool

DepotDownloaderSubProcess

NuGet Version .NET Core CI

A C# API wrapping Steam depot downloader in a sub-process utilizing Tmds.ExecFunction library.

This avoids many pitfalls of calling the original utility that has been specifically written for CLI usage. Original code remains largely unchanged to facilitate easy sync with upstream.

Install Metadata Format: Unlike upstream DepotDownloader, which stores local depot configuration as deflate-compressed protobuf in .DepotDownloader/depot.config, this project stores richer local install metadata (AppId, Branch, BuildId, and per-depot ManifestId and completion state) as JSON in .DepotDownloader/depot.json via LocalInstallInfo (queryable with DepotDownloaderApi.GetLocalInstallInfo).

Does not support trimming or AOT - this stems from DepotDownloader itself. Make sure <PublishTrimmed> and <PublishAot> are not true.

Usage

As per ExecFunction documentation, add the following to your Main method.

public static int Main(string[] args)
{
    // Starting a subprocess function? [Tmds.ExecFunction]
    if (ExecFunction.IsExecFunctionCommand(args))
    {
        return ExecFunction.Program.Main(args);
    }

    // Start normally..
}

App download

Prepare inputs:

var cts = new CancellationTokenSource();
var authenticator = new UserConsoleAuthenticator();
var cfg = new AppDownloadConfig
{
    // AccountSettingsFileName = "custom.config",
    // Username = "user",
    // Password = "pass",
    InstallDirectory = "C:/apps/244310",
    VerifyAll = true,
    AppId = 244310
};

Method A) Using an async enumerable:

try
{
    await foreach (var (message, isError) in DepotDownloaderApi.AppDownload(cfg, authenticator, cts.Token))
    {
        Console.WriteLine("DepotDownloader: " + message);
    }
}
catch (DepotDownloaderApiException e)
{
    Console.WriteLine("Download failed: " + e.Message);
}

Method B) Using a task and message callbacks:

void MessageHandler(object sender, DataReceivedEventArgs e)
{
    if (e.Data != null) Console.WriteLine("DepotDownloader: " + e.Data);
}

try
{
    await DepotDownloaderApi.AppDownload(cfg, MessageHandler, MessageHandler, authenticator, cts.Token);
}
catch (DepotDownloaderApiException e)
{
    Console.WriteLine("Download failed: " + e.Message);
}

Pubfile (Workshop) download

Pubfile download is similiar to App download, but uses PubFileDownloadConfig :

var cfg = new PubFileDownloadConfig
{
    AppId = ...,
    PublishedFileId = ...
};
... DepotDownloaderApi.PubFileDownload(cfg, ...)

UGC (Workshop) download

UGC download is similiar to App download, but uses UGCDownloadConfig :

var cfg = new UGCDownloadConfig
{
    AppId = ...,
    UGCId = ...
};
... DepotDownloaderApi.UGCDownload(cfg, ...)

Get app Build ID

Returns most recent build ID for an app and a branch (default: public)
Internally delegates to GetAppBranches call.

try
{
    uint buildId = await DepotDownloaderApi.GetAppBuildId(appId);
}
catch (DepotDownloaderApiException e)
{
    Console.WriteLine("Build ID check failed: " + e.Message);
}

Get app branches

Returns a list of available branches and their details (Name, BuildId, Description, PasswordRequired, TimeUpdated) for an app:

try
{
    List<AppBranchInfo> branches = await DepotDownloaderApi.GetAppBranches(appId);
}
catch (DepotDownloaderApiException e)
{
    Console.WriteLine("Branch check failed: " + e.Message);
}

Get local install info

Reads local install status (State, AppId, Branch, BuildId, Depots) from the metadata in .DepotDownloader/depot.json:

try
{
    LocalInstallInfo installInfo = DepotDownloaderApi.GetLocalInstallInfo("C:/apps/244310");
}
catch (DepotDownloaderApiException e)
{
    Console.WriteLine("Failed to read install info: " + e.Message);
}
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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
3.4.0 373 8/8/2025
3.4.0-sp1 132 10/26/2026
3.3.0 360 5/7/2025
3.1.0 285 4/7/2025