Skip to content
Merged
Show file tree
Hide file tree
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
34 changes: 34 additions & 0 deletions Build/all.msbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="CompileProjects" ToolsVersion="14.0">

<PropertyGroup>
<Platform>AnyCPU</Platform>
<Configuration>Release</Configuration>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<RootPath>$(MSBuildProjectDirectory)\..\</RootPath>
</PropertyGroup>

<Target Name="CleanAndBuild" DependsOnTargets="Clean;CompileProjects" />

<Target Name="Clean">
<MSBuild Projects="@(AllProjects)" Targets="Clean" />
<RemoveDir Directories="$(SrcBinPath)" />
</Target>

<Target Name="CompileProjects">
<MSBuild Projects="
$(RootPath)\UnitsNet\UnitsNet.Net35.csproj;
$(RootPath)\UnitsNet\UnitsNet.Portable40.csproj;
$(RootPath)\UnitsNet\UnitsNet.NetStandard10.csproj;
$(RootPath)\UnitsNet\UnitsNet.WindowsRuntimeComponent.csproj;
$(RootPath)\UnitsNet.Serialization.JsonNet\UnitsNet.Serialization.JsonNet.Net35.csproj;
$(RootPath)\UnitsNet.Tests\UnitsNet.Tests.csproj;
$(RootPath)\UnitsNet.Tests\UnitsNet.WindowsRuntimeComponent.Tests.csproj;
$(RootPath)\UnitsNet.Serialization.JsonNet.Tests\UnitsNet.Serialization.JsonNet.Tests.csproj"

Properties="Platform=$(Platform);Configuration=$(Configuration);VisualStudioVersion=$(VisualStudioVersion)"
Targets="Build">
</MSBuild>
</Target>

</Project>
2 changes: 1 addition & 1 deletion Build/build-src-debug.bat → Build/build-all-debug.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SET ROOT=%~dp0..
"C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" %ROOT%\Build\src.msbuild /verbosity:normal /p:Configuration=Debug /p:Platform="AnyCPU" /target:CleanAndBuild /p:RestorePackages=false
"C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" %ROOT%\Build\all.msbuild /verbosity:normal /p:Configuration=Debug /p:Platform="AnyCPU" /target:CleanAndBuild /p:RestorePackages=false
if %errorlevel% neq 0 exit /b %errorlevel%
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
SET ROOT=%~dp0..
"C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" %ROOT%\Build\src.msbuild /verbosity:normal /p:Configuration=Release /p:Platform="AnyCPU" /target:CleanAndBuild /p:RestorePackages=false
"C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" %ROOT%\Build\all.msbuild /verbosity:normal /p:Configuration=Release /p:Platform="AnyCPU" /target:CleanAndBuild /p:RestorePackages=false
if %errorlevel% neq 0 exit /b %errorlevel%
9 changes: 2 additions & 7 deletions Build/build.bat
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
@echo off
SET ROOT=%~dp0..

if exist %ROOT%\Artifacts rmdir /Q /S %ROOT%\Artifacts

call powershell -NoProfile %ROOT%\Build\UpdateAssemblyInfo.ps1
if %errorlevel% neq 0 exit /b %errorlevel%

call powershell -ExecutionPolicy Bypass -NoProfile -File %ROOT%\UnitsNet\Scripts\GenerateUnits.ps1
if %errorlevel% neq 0 exit /b %errorlevel%

call %ROOT%\Build\nuget-restore.bat
if %errorlevel% neq 0 exit /b %errorlevel%

call %ROOT%\Build\build-src-release.bat
if %errorlevel% neq 0 exit /b %errorlevel%

call %ROOT%\Build\build-tests.bat
call %ROOT%\Build\build-all-release.bat
if %errorlevel% neq 0 exit /b %errorlevel%

call %ROOT%\Build\run-tests.bat
Expand Down
26 changes: 0 additions & 26 deletions Build/paths.msbuild

This file was deleted.

30 changes: 0 additions & 30 deletions Build/src.msbuild

This file was deleted.

29 changes: 0 additions & 29 deletions Build/tests.msbuild

This file was deleted.

3 changes: 2 additions & 1 deletion GenerateUnits.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@echo off
powershell -ExecutionPolicy Bypass -NoProfile -File .\UnitsNet\Scripts\GenerateUnits.ps1
SET scriptdir=%~dp0
powershell -ExecutionPolicy Bypass -NoProfile -File %scriptdir%UnitsNet\Scripts\GenerateUnits.ps1
pause
3 changes: 3 additions & 0 deletions UnitsNet/UnitsNet.Net35.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>call $(ProjectDir)..\GenerateUnits.bat</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down