Skip to content

Instantly share code, notes, and snippets.

@modz2014
Created January 18, 2022 06:05
Show Gist options
  • Save modz2014/103740ae43dfe5b8eef62391409562d4 to your computer and use it in GitHub Desktop.
Save modz2014/103740ae43dfe5b8eef62391409562d4 to your computer and use it in GitHub Desktop.
MSBuild from command line
@echo off
setlocal
set PATH=%Path%;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin
cd %USERPROFILE%\Desktop\Test\
dotnet new sln
echo
dotnet sln Test.sln add Test.csproj
MsBuild.exe %USERPROFILE%\Desktop\Test\Test.sln /property:Configuration=Debug
cd %USERPROFILE%\Desktop\
Rem dont for to change the directory and change the name of your project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment