SIL.BuildTasks 3.3.0

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

SIL.BuildTasks package

SIL.BuildTasks defines several msbuild tasks used in building our other projects.

Tasks in the SIL.BuildTasks nuget package:

Archive task

Properties

Example

CpuArchitecture task

Returns the CPU architecture of the current system (x64/x86 on Windows, X86_64/i386 on Linux).

Properties

  • Value (output parameter)

Example

<UsingTask TaskName="CpuArchitecture" AssemblyFile="SIL.BuildTasks.dll" />

<Target Name="Test">
	<CpuArchitecture>
		<Output TaskParameter="Value" PropertyName="arch" />
	</CpuArchitecture>
</Target>

DownloadFile task

Downloads a file from a web address. Params specify the web address, the local path for the file, and optionally a user and password. The user/password feature has not been tested. If using an important password, make sure the address is https, since I think otherwise the password may be sent in clear.

Properties

  • Address: HTTP address to download from (required)

  • LocalFilename: Local file to which the downloaded file will be saved (required)

  • Username: Username credential for HTTP authentication

  • Password: Password credential for HTTP authentication

Example

<UsingTask TaskName="DownloadFile" AssemblyFile="SIL.BuildTasks.dll" />

<Target Name="Test">
	<DownloadFile
		Address="http://stackoverflow.com/questions/1089452/how-can-i-use-msbuild-to-download-a-file"
		LocalFilename="answer.html" />
</Target>

FileUpdate task

Properties

Example

MakePot task

Properties

Example

MakeWixForDirTree task

Properties

Example

NormalizeLocales task

Properties

  • L10nsDirectory: The directory whose subdirectories are locale names and contain localization files

NUnit task

Runs NUnit (v2) on a test assembly.

Properties

  • Timeout: The maximum amount of time the test is allowed to execute, expressed in milliseconds. The default is essentially no time-out

  • FudgeFactor: Factor the timeout will be multiplied by

  • Verbose: If true print the output of NUnit immediately, otherwise print it after NUnit finishes

  • FailedSuites: The names of failed test suites (output parameter)

  • AbandondedSuites: The names of test suites that got a timeout or that crashed (output parameter)

  • Assemblies: The full path to the NUnit assemblies (test DLLs). [Required]

  • IncludeCategory: The categories to include. Multiple values are separated by a comma (,)

  • ExcludeCategory: The categories to exclude. Multiple values are separated by a comma (,)

  • Fixture: The test fixture

  • XsltTransformFile: The XSLT transform file

  • OutputXmlFile: The output XML file

  • ErrorOutputFile: The file to receive test error details

  • WorkingDirectory: The working directory

  • DisableShadowCopy: Determines whether assemblies are copied to a shadow folder during testing

  • ProjectConfiguration: The project configuration to run

  • FailTaskIfAnyTestsFail: Whether or not to fail the build if any tests fail

  • TestInNewThread: Allows tests to be run in a new thread, allowing you to take advantage of ApartmentState and ThreadPriority settings in the config file

  • Force32Bit: Determines whether the tests are run in a 32bit process on a 64bit OS

  • Framework: Determines the framework to run against

  • ToolPath: Gets or sets the path to the NUnit executable assembly

  • Apartment: Apartment for running tests: MTA (Default), STA

Example

<UsingTask TaskName="NUnit" AssemblyFile="SIL.BuildTasks.dll" />

<Target Name="Test">
	<ItemGroup>
		<TestAssemblies Include="$(OutputDir)/*.Tests.dll"/>
	</ItemGroup>

	<NUnit Assemblies="@(TestAssemblies)"
		ToolPath="$(NuGetPackageDir)/nunit.runners.net4/2.6.4/tools"
		TestInNewThread="false"
		ExcludeCategory="KnownMonoIssue"
		WorkingDirectory="$(OutputDir)"
		Force32Bit="true"
		Verbose="true"
		FailTaskIfAnyTestsFail="true"
		OutputXmlFile="$(OutputDir)/TestResults.xml"/>
</Target>

NUnit3 task

Runs NUnit3 on a test assembly.

Properties

See properties for NUnit task. The following additional properties are defined:

  • NoColor: Determines the use of colors in the output

  • UseNUnit3Xml: Whether to use the NUnit3 or NUnit2 XML format

  • TeamCity: Should be set to true if the tests are running on a TeamCity server. Adds --teamcity when calling nunit which "Turns on use of TeamCity service messages."

  • Agent: The number of NUnit agents to use when running the tests

  • Workers: Specify the NUMBER of worker threads to be used in running tests

  • Process: PROCESS isolation for test assemblies. Values: Single, Separate, Multiple

  • DisposeRunners: When true Dispose each test runner after it has finished running its tests

  • Debug: Causes NUnit to break into the debugger immediately before it executes your tests

  • Test: Comma-separated list of FULLNAMES of tests to run or explore. This option may be repeated

  • Trace: Set internal trace LEVEL. Values: Off, Error, Warning, Info, Verbose (Debug)

Example

See NUnit task.

Split task

Properties

Example

StampAssemblies task

Properties

Example

UnixName task

Determines the Unix Name of the operating system executing the build.

This is useful when determining Mac vs Linux during a build. On Mac, the output Value will be "Darwin". On Linux, the output Value will be "Linux".

Properties

  • Value (output parameter)

Example

This can be used to set DefineConstants during the PreBuild Target. Here is an example build/platform.targets file that can be included in a CSPROJ file. SYSTEM_MAC or SYSTEM_LINUX will be defined and can be used in the C# code for #if conditional compilation.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask TaskName="UnixName" AssemblyFile="SIL.BuildTasks.dll" />
  <Target Name="BeforeBuild">
    <UnixName>
      <Output TaskParameter="Value" PropertyName="UNIX_NAME" />
    </UnixName>
    <PropertyGroup>
      <DefineConstants Condition="'$(OS)' == 'Unix'">$(DefineConstants);SYSTEM_UNIX</DefineConstants>
      <DefineConstants Condition="'$(UNIX_NAME)' == 'Darwin'">$(DefineConstants);SYSTEM_MAC</DefineConstants>
      <DefineConstants Condition="'$(UNIX_NAME)' == 'Linux'">$(DefineConstants);SYSTEM_LINUX</DefineConstants>
    </PropertyGroup>
  </Target>
</Project>

UpdateBuildTypeFile task

Properties

Example

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 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 (1)

Showing the top 1 popular GitHub repositories that depend on SIL.BuildTasks:

Repository Stars
sillsdev/FieldWorks
FieldWorks is a suite of software tools for language and cultural data, with support for complex scripts.
Version Downloads Last Updated
3.3.0 0 9/2/2026
3.2.2-beta0003 0 9/2/2026
3.2.2-beta0002 0 9/2/2026
3.2.2-beta0001 0 9/2/2026
3.2.1 73 8/31/2026
3.2.1-beta0004 70 8/31/2026
3.2.1-beta0003 65 8/28/2026
3.2.1-beta0002 69 8/28/2026
3.2.1-beta0001 71 8/28/2026
3.2.0 2,486 1/6/2026
3.1.2-beta0014 270 11/26/2025
3.1.2-beta0012 677 8/26/2025
3.1.2-beta0005 259 5/28/2025
3.1.2-beta0002 226 5/27/2025
3.1.1 762 3/18/2025
3.1.1-beta0005 231 3/18/2025
3.1.1-beta0001 296 3/6/2025
3.1.0 328 3/4/2025
3.0.1-beta0004 187 2/22/2025
3.0.0 835 11/8/2024
Loading failed

Changes since version 3.2.1

Added:
- Added MakeWixForDirTree.ConsolidatedGuidFile (optional param) naming a single file to hold the GUIDs for the whole tree, instead of a `.guidsForInstaller.xml` in every directory. Any per-directory files still present under RootDirectory are merged into it, so existing GUIDs carry over unchanged and installed components keep their identity; delete them from version control once the merged file has been committed. With CheckOnly the merge happens in memory only and the task reports an error naming the files whose GUIDs are not yet in the consolidated file.

Fixed:
- Fixed MakeWixForDirTree.CheckOnly deleting the previously generated wxs file. A check-only run outputs nothing, so it now leaves the existing file alone.

Security:
- Reverted SIL.Core from 17.0.0 to 9.0.0. 17.0.0's dependency on Mono.Unix
 (which has never had a stable, non-prerelease NuGet release) broke restore
 for consumers using classic `nuget.exe install` without `-Prerelease`.
 This reintroduces a build-time-only dependency on Newtonsoft.Json 11.0.1
 (GHSA-5crp-9r3c-p9vr, DoS via deeply-nested JSON) until libpalaso resolves
 the Mono.Unix situation upstream — SIL.BuildTasks never processes
 untrusted JSON and isn't shipped in consumers' compiled output (IsTool),
 so this is scanner noise rather than a real exploit path.

See full changelog at https://github.com/sillsdev/SIL.BuildTasks/blob/master/CHANGELOG.md