DotNetBrowser.Branding 1.0.2

Prefix Reserved
dotnet add package DotNetBrowser.Branding --version 1.0.2
                    
NuGet\Install-Package DotNetBrowser.Branding -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="DotNetBrowser.Branding" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotNetBrowser.Branding" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="DotNetBrowser.Branding" />
                    
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 DotNetBrowser.Branding --version 1.0.2
                    
#r "nuget: DotNetBrowser.Branding, 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.
#:package DotNetBrowser.Branding@1.0.2
                    
#: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=DotNetBrowser.Branding&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=DotNetBrowser.Branding&version=1.0.2
                    
Install as a Cake Tool

DotNetBrowser.Branding

DotNetBrowser.Branding is a NuGet package that applies custom branding to DotNetBrowser Chromium binaries during dotnet publish.

The package includes built-in Chromium extraction tasks, so it works as a single-package branding solution.

Installation

<ItemGroup>
  <PackageReference Include="DotNetBrowser.Branding" Version="x.y.z" />
</ItemGroup>

Quick Start

Add the following to your project file:

<PropertyGroup>
  <DotNetBrowserBrandingEnabled>true</DotNetBrowserBrandingEnabled>
  <DotNetBrowserBrandingParamsFile>$(MSBuildProjectDirectory)\branding.params.json</DotNetBrowserBrandingParamsFile>
</PropertyGroup>

Then publish:

dotnet publish -c Release

Repacking Into a Runtime-Extractable Container

By default, branding outputs a plain directory of Chromium binaries. If your app runs from a mapped network drive or UNC path, that means every Chromium file has to be shipped and verified individually. Enable repacking to pack the branded binaries back into the same compact container format DotNetBrowser normally uses, so it can be extracted to a local per-user directory at runtime instead:

<PropertyGroup>
  <DotNetBrowserBrandingEnabled>true</DotNetBrowserBrandingEnabled>
  <DotNetBrowserBrandingParamsFile>$(MSBuildProjectDirectory)\branding.params.json</DotNetBrowserBrandingParamsFile>
  <DotNetBrowserBrandingRepackEnabled>true</DotNetBrowserBrandingRepackEnabled>
</PropertyGroup>

This only works when the branding source is a Chromium container assembly (DotNetBrowser.Chromium.<Platform>.dll), not an already-unpacked directory. The repacked assembly must keep the same file name as the original, so make sure your app deploys and loads it from the DotNetBrowserBrandingRepackDestinationPath output (default: $(PublishDir)branded-container/) in place of the original one.

Repacking changes the assembly's bytes, which invalidates any Authenticode signature the original assembly carried. Set DotNetBrowserBrandingRepackSignCommand (same @@BINARY_PATH@@ placeholder convention as branding.params.json's signCommand) to re-sign the repacked assembly if required.

Do not embed a certificate password or token directly in that command. The command text is never written to the build log, but MSBuild records task inputs in binary logs and at diagnostic verbosity, and the command is handed to a shell, so it is visible in the machine's process list while it runs. Reference the certificate by thumbprint or store instead, or have the invoked script read the secret from an environment variable:

<DotNetBrowserBrandingRepackSignCommand>signtool sign /sha1 &lt;thumbprint&gt; /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 "@@BINARY_PATH@@"</DotNetBrowserBrandingRepackSignCommand>

Extraction Support Inside Branding

DotNetBrowser.Branding includes extraction tasks internally. If your source is DotNetBrowser.Chromium*.dll, extraction runs automatically before branding.

You can also enable standalone extraction targets from this package:

<PropertyGroup>
  <DotNetBrowserExtractionEnabled>true</DotNetBrowserExtractionEnabled>
  <DotNetBrowserExtractionDuringPublish>true</DotNetBrowserExtractionDuringPublish>
</PropertyGroup>

These properties use the same contract as the DotNetBrowser.Chromium.Extraction package.

branding.params.json Example

{
  "version": "1.2.3",
  "win": {
    "executableName": "myapp",
    "processDisplayName": "My App",
    "legalCopyright": "© 2025 MyCompany",
    "author": "Me",
    "productName": "MyApp",
    "icoPath": "assets/app.ico",
    "signCommand": "echo @@BINARY_PATH@@"
  },
  "mac": {
    "bundle": {
      "name": "MyApp",
      "id": "com.mycompany.myapp"
    },
    "icnsPath": "assets/app.icns",
    "codesignIdentity": "${CODESIGN_IDENTITY}",
    "codesignEntitlements": "assets/entitlements.plist",
    "teamID": "${TEAM_ID}",
    "appleID": "${APPLE_ID}",
    "password": "${PASSWORD}"
  },
  "linux": {
    "executableName": "myapp"
  }
}

Branding Properties

  • DotNetBrowserBrandingEnabled Default: false.

  • DotNetBrowserBrandingParamsFile Required when branding is enabled.

  • DotNetBrowserBrandingSourcePath Default: $(PublishDir).

  • DotNetBrowserBrandingDestinationPath Default: $(PublishDir)branded/.

  • DotNetBrowserBrandingToolPath Optional explicit path to chromium_branding.

  • DotNetBrowserBrandingToolArguments Optional custom arguments with placeholders: {source}, {destination}, {params}.

  • DotNetBrowserBrandingWorkingDirectory Optional working directory for tool execution.

  • DotNetBrowserBrandingStageAssets Default: true.

  • DotNetBrowserBrandingAssetsBasePath Default: directory of DotNetBrowserBrandingParamsFile.

  • DotNetBrowserBrandingKeepTemporaryExtraction Default: false.

  • DotNetBrowserBrandingRepackEnabled Default: false. Packs branded binaries back into a runtime-extractable container. See Repacking Into a Runtime-Extractable Container.

  • DotNetBrowserBrandingRepackDestinationPath Default: $(PublishDir)branded-container/.

  • DotNetBrowserBrandingRepackKeepDirectoryOutput Default: true. Set to false to remove the plain-directory branded output once the container has been produced successfully.

  • DotNetBrowserBrandingRepackSignCommand Optional command to re-sign the repacked assembly. Supports the @@BINARY_PATH@@ placeholder. Must not embed credentials - see the note under "Repacking" above. The invoked tool's output is logged at low verbosity unless the command fails.

Shared Extraction Properties

  • DotNetBrowserExtractionEnabled
  • DotNetBrowserExtractionDuringBuild
  • DotNetBrowserExtractionDuringPublish
  • DotNetBrowserExtractionSourcePath
  • DotNetBrowserExtractionDestinationPath

Notes

  • Branding runs after Publish.
  • For best results, run publish and branding on the target operating system.
  • The final output path is logged as DotNetBrowserBrandedOutputPath.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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.0.2 169 8/28/2026
1.0.1 175 6/30/2026
1.0.0 160 6/23/2026