Skip to content

Visual Studio

timrademaker edited this page Oct 17, 2020 · 1 revision

Initialization

init

Used to set the location of Visual Studio. If this is not called, Visual Studio is assumed to be located at C:/Program Files (x86)/Microsoft Visual Studio/2019/Community.

Parameters

visualStudioBaseDirectory: The base directory of Visual Studio. Folders named Common7 and MSBuild can be found here.

msBuildPath (optional): The path to MSBuild.exe. No need to specify this if MSBuild.exe can be found at ${visualStudioBaseDirectory}/MSBuild/Current/Bin/MSBuild.exe.

vsTestPath (optional): The path to vstest.console.exe. No need to specify this if vstest.console.exe can be found at ${visualStudioBaseDirectory}/Common7/IDE/CommonExtensions/Microsoft/TestWindow/vstest.console.exe.

Building

build

Builds a solution or project.

Parameters

projectPath: The path to the project or solution file.

platform (optional): The platform to build for. The project or solution's default platform by default.

configuration (optional): The configuration to build in. The project or solution's default configuration by default.

Testing

vsTest

Runs tests on one or more test files.

Parameters

testFile(s): The test file(s) to run. Either a string with a single test file, or a list with multiple.

platform (optional): The platform to run the tests on. Can be x86, x64 or ARM.

testNames (optional): The (partial) names of tests to run.

logger (optional): The logger to use for test results. trx by default.

additionalFlags (optional): Additional flags to use when running Visual Studio Test.

Clone this wiki locally