SIL.BuildTasks
2.6.0-beta0042
Prefix Reserved
See the version list below for details.
dotnet add package SIL.BuildTasks --version 2.6.0-beta0042
NuGet\Install-Package SIL.BuildTasks -Version 2.6.0-beta0042
<PackageReference Include="SIL.BuildTasks" Version="2.6.0-beta0042" />
paket add SIL.BuildTasks --version 2.6.0-beta0042
#r "nuget: SIL.BuildTasks, 2.6.0-beta0042"
// Install SIL.BuildTasks as a Cake Addin #addin nuget:?package=SIL.BuildTasks&version=2.6.0-beta0042&prerelease // Install SIL.BuildTasks as a Cake Tool #tool nuget:?package=SIL.BuildTasks&version=2.6.0-beta0042&prerelease
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 authenticationPassword
: 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-outFudgeFactor
: Factor the timeout will be multiplied byVerbose
: If true print the output of NUnit immediately, otherwise print it after NUnit finishesFailedSuites
: 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 fixtureXsltTransformFile
: The XSLT transform fileOutputXmlFile
: The output XML fileErrorOutputFile
: The file to receive test error detailsWorkingDirectory
: The working directoryDisableShadowCopy
: Determines whether assemblies are copied to a shadow folder during testingProjectConfiguration
: The project configuration to runFailTaskIfAnyTestsFail
: Whether or not to fail the build if any tests failTestInNewThread
: Allows tests to be run in a new thread, allowing you to take advantage of ApartmentState and ThreadPriority settings in the config fileForce32Bit
: Determines whether the tests are run in a 32bit process on a 64bit OSFramework
: Determines the framework to run againstToolPath
: Gets or sets the path to the NUnit executable assemblyApartment
: 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 outputUseNUnit3Xml
: Whether to use the NUnit3 or NUnit2 XML formatTeamCity
: 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 testsWorkers
: Specify the NUMBER of worker threads to be used in running testsProcess
: PROCESS isolation for test assemblies. Values: Single, Separate, MultipleDisposeRunners
: When true Dispose each test runner after it has finished running its testsDebug
: Causes NUnit to break into the debugger immediately before it executes your testsTest
: Comma-separated list of FULLNAMES of tests to run or explore. This option may be repeatedTrace
: 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- No dependencies.
-
.NETStandard 2.0
- 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 |
---|---|---|
3.0.0 | 168 | 11/8/2024 |
2.6.0-beta0044 | 70 | 11/8/2024 |
2.6.0-beta0042 | 65 | 11/7/2024 |
2.6.0-beta0036 | 63 | 11/6/2024 |
2.6.0-beta0032 | 104 | 10/18/2024 |
2.6.0-beta0030 | 276 | 8/11/2023 |
2.6.0-beta0028 | 145 | 8/7/2023 |
2.6.0-beta0024 | 365 | 11/23/2022 |
2.6.0-beta0023 | 293 | 8/9/2022 |
2.6.0-beta0022 | 187 | 8/9/2022 |
2.6.0-beta0020 | 179 | 8/5/2022 |
2.6.0-beta0010 | 177 | 8/5/2022 |
2.6.0-beta0008 | 1,495 | 8/12/2021 |
2.6.0-beta0007 | 221 | 8/2/2021 |
2.6.0-beta0006 | 217 | 8/2/2021 |
2.5.1-beta0005 | 293 | 5/27/2021 |
2.5.1-beta0004 | 278 | 5/27/2021 |
2.5.1-beta0003 | 255 | 5/18/2021 |
2.5.1-beta.2 | 170 | 3/19/2021 |
2.5.0 | 7,764 | 2/24/2021 |
2.4.0 | 484 | 1/22/2021 |
2.3.4 | 2,792 | 10/5/2020 |
2.3.3 | 488 | 7/31/2020 |
2.3.2 | 1,399 | 5/22/2020 |
2.3.1 | 2,982 | 5/19/2020 |
2.3.0 | 566 | 4/16/2020 |
2.2.0 | 1,674 | 12/11/2018 |
2.1.0 | 1,271 | 7/28/2018 |
2.0.2 | 882 | 7/2/2018 |
2.0.1 | 875 | 6/29/2018 |
2.0.0 | 952 | 6/18/2018 |
1.0.2 | 9,016 | 6/8/2018 |
1.0.1 | 1,070 | 4/20/2018 |
1.0.0 | 1,733 | 4/16/2018 |
Changes since version 2.5.0
Added:
- Additionally build for .NetStandard 2.0
Changed:
- Target .NET 4.7.2 instead of 4.6.1
- SIL International changed to SIL Global
- BREAKING DEPENDENCY CHANGE: Upgraded to NUnit 4 (see https://docs.nunit.org/articles/nunit/release-notes/breaking-changes.html)
Fixed:
- Fixed logging in `MakeWixForDirTree` task (#55)
- Improved FileUpdate replacement verification and error handling (#63)
See full changelog at https://github.com/sillsdev/SIL.BuildTasks/blob/master/CHANGELOG.md