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

Commit 1010516

Browse files
committed
Add BuildAllTargets script in NSudo .NET SDK.
1 parent 1735583 commit 1010516

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

Source/MSIL/BuildAllTargets.cmd

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@rem
2+
@rem PROJECT: Mouri Internal Library Essentials
3+
@rem FILE: BuildAllTargets.cmd
4+
@rem PURPOSE: Build all targets script for Visual Studio .NET Project
5+
@rem
6+
@rem LICENSE: The MIT License
7+
@rem
8+
@rem DEVELOPER: Mouri_Naruto (Mouri_Naruto AT Outlook.com)
9+
@rem
10+
11+
@setlocal
12+
@echo off
13+
14+
rem Change to the current folder.
15+
cd "%~dp0"
16+
17+
rem Remove the output folder for a fresh compile.
18+
rd /s /q Output
19+
20+
set VisualStudioInstallerFolder="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
21+
if %PROCESSOR_ARCHITECTURE%==x86 set VisualStudioInstallerFolder="%ProgramFiles%\Microsoft Visual Studio\Installer"
22+
23+
pushd %VisualStudioInstallerFolder%
24+
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.NetCore.Component.SDK -property installationPath`) do (
25+
set VisualStudioInstallDir=%%i
26+
)
27+
popd
28+
29+
call "%VisualStudioInstallDir%\VC\Auxiliary\Build\vcvarsall.bat" x86
30+
31+
rem Build all targets
32+
MSBuild -m BuildAllTargets.proj
33+
34+
@endlocal

Source/MSIL/BuildAllTargets.proj

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
PROJECT: Mouri Internal Library Essentials
4+
FILE: BuildAllTargets.proj
5+
PURPOSE: Build all targets script for Visual Studio .NET Project
6+
7+
LICENSE: The MIT License
8+
9+
DEVELOPER: Mouri_Naruto (Mouri_Naruto AT Outlook.com)
10+
-->
11+
<Project
12+
DefaultTargets="Restore;Build"
13+
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
14+
<PropertyGroup>
15+
<SolutionPath>$(MSBuildThisFileDirectory)*.sln</SolutionPath>
16+
</PropertyGroup>
17+
<ItemGroup>
18+
<ProjectReference Include="$(SolutionPath)">
19+
<AdditionalProperties>Configuration=Debug;Platform=Any CPU</AdditionalProperties>
20+
</ProjectReference>
21+
<ProjectReference Include="$(SolutionPath)">
22+
<AdditionalProperties>Configuration=Release;Platform=Any CPU</AdditionalProperties>
23+
</ProjectReference>
24+
</ItemGroup>
25+
<Target Name="Restore" >
26+
<MSBuild
27+
Projects="@(ProjectReference)"
28+
Targets="Restore"
29+
StopOnFirstFailure="True"
30+
Properties="PreferredToolArchitecture=x64" />
31+
</Target>
32+
<Target Name="Build" >
33+
<MSBuild
34+
Projects="@(ProjectReference)"
35+
Targets="Build"
36+
BuildInParallel="True"
37+
StopOnFirstFailure="True"
38+
Properties="PreferredToolArchitecture=x64" />
39+
</Target>
40+
<Target Name="Rebuild" >
41+
<MSBuild
42+
Projects="@(ProjectReference)"
43+
Targets="Rebuild"
44+
BuildInParallel="True"
45+
StopOnFirstFailure="True"
46+
Properties="PreferredToolArchitecture=x64" />
47+
</Target>
48+
</Project>

0 commit comments

Comments
 (0)