Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Commit

Permalink
Add BuildAllTargets script in NSudo .NET SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Jun 6, 2021
1 parent 1735583 commit 1010516
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Source/MSIL/BuildAllTargets.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@rem
@rem PROJECT: Mouri Internal Library Essentials
@rem FILE: BuildAllTargets.cmd
@rem PURPOSE: Build all targets script for Visual Studio .NET Project
@rem
@rem LICENSE: The MIT License
@rem
@rem DEVELOPER: Mouri_Naruto (Mouri_Naruto AT Outlook.com)
@rem

@setlocal
@echo off

rem Change to the current folder.
cd "%~dp0"

rem Remove the output folder for a fresh compile.
rd /s /q Output

set VisualStudioInstallerFolder="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
if %PROCESSOR_ARCHITECTURE%==x86 set VisualStudioInstallerFolder="%ProgramFiles%\Microsoft Visual Studio\Installer"

pushd %VisualStudioInstallerFolder%
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.NetCore.Component.SDK -property installationPath`) do (
set VisualStudioInstallDir=%%i
)
popd

call "%VisualStudioInstallDir%\VC\Auxiliary\Build\vcvarsall.bat" x86

rem Build all targets
MSBuild -m BuildAllTargets.proj

@endlocal
48 changes: 48 additions & 0 deletions Source/MSIL/BuildAllTargets.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
PROJECT: Mouri Internal Library Essentials
FILE: BuildAllTargets.proj
PURPOSE: Build all targets script for Visual Studio .NET Project
LICENSE: The MIT License
DEVELOPER: Mouri_Naruto (Mouri_Naruto AT Outlook.com)
-->
<Project
DefaultTargets="Restore;Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionPath>$(MSBuildThisFileDirectory)*.sln</SolutionPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Debug;Platform=Any CPU</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Release;Platform=Any CPU</AdditionalProperties>
</ProjectReference>
</ItemGroup>
<Target Name="Restore" >
<MSBuild
Projects="@(ProjectReference)"
Targets="Restore"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
</Target>
<Target Name="Build" >
<MSBuild
Projects="@(ProjectReference)"
Targets="Build"
BuildInParallel="True"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
</Target>
<Target Name="Rebuild" >
<MSBuild
Projects="@(ProjectReference)"
Targets="Rebuild"
BuildInParallel="True"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
</Target>
</Project>

0 comments on commit 1010516

Please sign in to comment.