From 8ee7c159f46fe0e9218d27439e9543cba13b2919 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 30 Oct 2016 09:39:34 +0100 Subject: [PATCH 1/3] GenerateUnits.bat: Resolve absolute path So it can be run from other work dirs. --- GenerateUnits.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GenerateUnits.bat b/GenerateUnits.bat index 077e591b5e..0b52484ae7 100644 --- a/GenerateUnits.bat +++ b/GenerateUnits.bat @@ -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 From fbd44fd568d55ab2a0a7ef6a232bc94fe1818f19 Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 30 Oct 2016 09:40:14 +0100 Subject: [PATCH 2/3] UnitsNet.Net35: Add pre-build step to regenerate code Ideally this was a solution-wide pre-build step, but only way to achieve that is to add a new project and let the others depend on it, but seems a bit overkill. If you edit the source code (shared among the core projects), then the Net35 project will rebuild when you build the solution. --- UnitsNet/UnitsNet.Net35.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UnitsNet/UnitsNet.Net35.csproj b/UnitsNet/UnitsNet.Net35.csproj index 503dd6a257..f79e06f464 100644 --- a/UnitsNet/UnitsNet.Net35.csproj +++ b/UnitsNet/UnitsNet.Net35.csproj @@ -48,6 +48,9 @@ + + call $(ProjectDir)..\GenerateUnits.bat + - $(RootPath)\Artifacts - $(RootPath)\UnitsNet - $(RootPath)\UnitsNet.Serialization.JsonNet - $(RootPath)\UnitsNet.Tests - $(RootPath)\UnitsNet.Serialization.JsonNet.Tests - $(RootPath)\Tools - $(RootPath)\Libs - $(RootPath)\Tools - - - $(ArtifactsPath)\BuildLog - $(ArtifactsPath)\Deploy - $(ArtifactsPath)\Bin - - - $(BinPath)\Src - $(BinPath)\Tests\$(Platform)_$(Configuration) - $(SrcBinBasePath)\$(Platform)_$(Configuration) - - - diff --git a/Build/src.msbuild b/Build/src.msbuild deleted file mode 100644 index 9acd014f69..0000000000 --- a/Build/src.msbuild +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - AnyCPU - Release - 14.0 - - - - - - - - - - - - - - - diff --git a/Build/tests.msbuild b/Build/tests.msbuild deleted file mode 100644 index 9c61397fe5..0000000000 --- a/Build/tests.msbuild +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - AnyCPU - Release - 14.0 - - - - - - - - - - - - - - - -