Well-known properties

Well-known properties. #

MsBullet SDK provides a set of predefined properties that store information about the project in the MSBuild context. These properties are evaluated in the same manner as other MSBuild properties. For example, to use the RepoRoot property, you type $(RepoRoot).

MsBullet SDK uses the values in the following table to predefine reserved and well-known properties. Reserved properties cannot be overridden, and most well-known properties shouldn’t be overridden except in advanced scenarios.

For all other variables mentioned that are not in the table above, you can find more information in the official documentation.

Property Description Default value Overridable Note
Configuration Specify the current project configuration. Debug ✔️️
Platform Specify the current project platform. AnyCPU ✔️
PlatformName Specify the current project platform name. $(Platform) ✔️
RepoRoot Identifying the root of repository. N/A ✔️ Navigate up the folder tree until a global.json is found.
ArtifactsDir Specify the root where build system outputs are placed. $(RepoRoot)/artifacts/
OutDirName Used to specified the end folder of path where artifacts are placed $(MSBuildProjectName) ✔️
BaseOutputPath Identifying folder where binary artifacts are placed $(ArtifactsBinDir)/$(MSBuildProjectName)/ ✔️
OutputPath Identifying folder where artifacts are placed When $(PlatformName) is equal to AnyCPU $(BaseOutputPath)/$(Configuration)/, otherwise $(BaseOutputPath)/$(PlatformName)/$(Configuration)/
BaseIntermediateOutputPath Identifying folder where CIL artifats are placed $(ArtifactsObjDir)/$(MSBuildProjectName)/ ✔️
IntermediateOutputPath Identifying folder where artifacts are placed When $(PlatformName) is equal to AnyCPU $(BaseIntermediateOutputPath)/$(Configuration)/, otherwise $(BaseIntermediateOutputPath)/$(PlatformName)/$(Configuration)/
UsingToolXUnit Used to opt-out built-in features.
By default we use xUnit as test framework, that’re represents the standart de-facto.
true ✔️
UsingToolNerdbankGitVersioning Used to opt-out built-in features.
By default we use Nerdbank.GitVersioning as semantic versioning tool.
true ✔️
UsingToolCoverletMsBuild Used to opt-out built-in features.
By default we use Coverlet to collect code coverage metrics.
true ✔️
UsingToolReportGenerator Used to opt-out built-in features.
By default we use ReportGenerator to generate code coverage reports.
true ✔️
UsingToolStyleCopAnalyzers Used to opt-out built-in features.
By default we use StyleCopAnalyzers to enforce a set of style and consistency code rules.
true ✔️
UsingToolSonarAnalyzer Used to opt-out built-in features.
By default we use SonarSource as a well-established code quality standards.
true ✔️
StyleCopConfig Used to customize the default rules of StyleCopAnalyzers through the stylecop.json. $(RepoRoot)/eng/stylecop.json ✔️
ShowStyleCopConfig Used to display the configuration file set through StyleCopConfig into the project directory on Visual Studio false ✔️
IsUnitTestProject Identifying unit test project.
A project is identified as unit test project when your’s name end with:
  • .Tests
  • .UnitTests
false ✔️
IsIntegrationTestProject Identifying integration test project.
A project is identified as integration test project when your’s name end with: .IntegrationTests
false ✔️
IsPerformanceTestProject Identifying performance test project.
A project is identified as performance test project when your’s name end with: .PerformanceTests
false ✔️
IsTestProject Identifying test project.
A project is identified as test project when it has one of that properties as true:
  • IsUnitTestProject
  • IsIntegrationTestProject
  • IsPerformanceTestProject
N/A
DeployProjectOutput Mark a project to deploy (TODO: specify Deploy target) true ✔️
PackageOutputPath Identifies where build output package will be stored. When $(IsShippable) is equal to true $(ArtifactsShippingPackagesDir), otherwise $(ArtifactsNonShippingPackagesDir)
IsShippable Mark a project as shippable, a project should be shippable when your output is intended for the public. When $(IsTestProject) is equal to true false, otherwise N/A. ✔️
PackageLicenseFile Identifies the license of the package License.txt ✔️ That file will be added to package when $(PackageLicenseExpressionInternal) is not valorized and $(IsPackable) is equal to true
PackageLicenseExpressionInternal Specifies the license to be used. TODO ✔️
IsPackable Identifies the project as packable. When $(IsTestProject) is equal to true false, otherwise N/A. ✔️
MicrosoftCodeAnalysisNetAnalyzersVersion Specifies the version of Microsoft.CodeAnalysis.NetAnalyzers 6.* ✔️ Used only for .NET version lower then .NET 5
MicrosoftVisualStudioThreadingAnalyzersVersion 16.* ✔️ Used only for .NET version lower then .NET 5, will be removed in the next major release.
DotNetRoot ✔️
MonoTool mono ✔️
RepositoryEngineeringDir Identifies the engineering directory of the repository. $(RepoRoot)/eng
RepositoryToolsDir $(RepoRoot)/.tools
VersionsPropsPath Specifies the path of Versions.props $(RepositoryEngineeringDir)Versions.props
ArtifactsToolsetDir $(ArtifactsDir)/toolset
ArtifactsObjDir $(ArtifactsDir)/obj
ArtifactsBinDir $(ArtifactsDir)/bin
ArtifactsLogDir $(ArtifactsDir)/log/$(Configuration)
ArtifactsTmpDir $(ArtifactsDir)/tmp/$(Configuration)
ArtifactsTestResultsDir $(ArtifactsDir)/TestResults/$(Configuration)
ArtifactsReportDir $(ArtifactsTestResultsDir)/Reports
ArtifactsCoverageDir $(ArtifactsTestResultsDir)/Coverage
ArtifactsSymStoreDirectory $(ArtifactsDir)/SymStore/$(Configuration)
ArtifactsPackagesDir $(ArtifactsDir)/packages/$(Configuration)
ArtifactsShippingPackagesDir $(ArtifactsPackagesDir)/Shippable
ArtifactsNonShippingPackagesDir $(ArtifactsPackagesDir)/NonShippable
BuildForLiveUnitTesting TODO
MicrosoftNETTestSdkVersion Specifies the version of Microsoft.NET.Test.Sdk 16.* ✔️ Available only when $(IsTestProject) is equal to true, will be updated to 17.* in the next major release.
TestRunnerName
ExcludeFromSourceBuild
VersionToolName
NerdbankGitVersioningVersion Specifies the version of Nerdbank.GitVersioning 3.* ✔️
CoverletMSBuildVersion Specifies the version of Coverlet 3.* ✔️
ReportGeneratorVersion Specifies the version of ReportGenerator 5.* ✔️
XUnitVersion Specifies the version of xUnit 2.* ✔️ Available only when $(IsTestProject) is equal to true
XUnitAssertVersion Specifies the version of xUnit $(XUnitVersion) ✔️ Available only when $(IsTestProject) is equal to true
XUnitAbstractionsVersion Specifies the version of xUnit $(XUnitVersion) ✔️ Available only when $(IsTestProject) is equal to true
XUnitRunnerVisualStudioVersion Specifies the version of xUnit 2.4.3 ✔️ Available only when $(IsTestProject) is equal to true
XUnitRunnerConsoleVersion Specifies the version of xUnit 2.4.1 ✔️ Available only when $(IsTestProject) is equal to true
XUnitDesktopSettingsFile Specifies the xUnit runner configuration. $(MSBuildThisFileDirectory)xunit.runner.json Available only when $(IsTestProject) is equal to true
TestRuntime
TestArchitectures ✔️
GitRepoRoot Used by Nerdbank.GitVersioning to identify the .git folder $(RepoRoot) ✔️
GenerateCoverageReportSummary Specifies if produce code coverage reports summary true ✔️ Available only when $(IsTestProject) is equal to true