Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build.cmd file #31

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -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