From f48fdf2e23851cb1b2fbd22a4b56912ddfd3124f Mon Sep 17 00:00:00 2001 From: Jeffrey Parker Date: Tue, 26 Sep 2023 15:52:07 -0400 Subject: [PATCH] Add build.cmd file (#31) --- build.cmd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 build.cmd diff --git a/build.cmd b/build.cmd new file mode 100644 index 0000000..478b0cd --- /dev/null +++ b/build.cmd @@ -0,0 +1,16 @@ +:: Example script for building without the full Visual Studio + +:: Install prerequisites using chocolately package manager +choco install -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools;includeRecommended" nuget.commandline nunit-console-runner + +:: Add build tools to path +IF "'%VSINSTALLDIR%'" EQU "''" (call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat") else (echo "vcvars already set") + +:: Restore nuget packages +nuget restore + +:: Build debug version of the project +msbuild duo_api_csharp.sln /p:Configuration=Debug /p:Platform="Any CPU" + +:: Run unit tests +vstest.console.exe .\test\bin\Debug\DuoApiTest.dll \ No newline at end of file