From 727d3ace3e8f351c9632cda9d8ce32b2d82b2e95 Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sun, 12 Feb 2017 15:21:47 +0100 Subject: [PATCH] Add NuGet building files --- .gitignore | 1 + VAR.Json.sln | 8 ++++---- VAR.Json/Build.NuGet.cmd | 24 ++++++++++++++++++++++++ VAR.Json/Nuget/keep.txt | 0 VAR.Json/VAR.Json.csproj | 37 +++++++++++++++++++++++++++++++++---- VAR.Json/VAR.Json.nuspec | 22 ++++++++++++++++++++++ VAR.Json/packages.config | 4 ++++ 7 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 VAR.Json/Build.NuGet.cmd create mode 100644 VAR.Json/Nuget/keep.txt create mode 100644 VAR.Json/VAR.Json.nuspec create mode 100644 VAR.Json/packages.config diff --git a/.gitignore b/.gitignore index 97266e7..b5331c3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ obj/ [Rr]elease*/ _ReSharper*/ *.userprefs +*.nupkg diff --git a/VAR.Json.sln b/VAR.Json.sln index 94345d0..824c942 100644 --- a/VAR.Json.sln +++ b/VAR.Json.sln @@ -19,10 +19,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Release|Any CPU.Build.0 = Release|Any CPU + {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Debug|Any CPU.ActiveCfg = Debug .Net 4.6.1|Any CPU + {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Debug|Any CPU.Build.0 = Debug .Net 4.6.1|Any CPU + {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Release|Any CPU.ActiveCfg = Release .Net 4.6.1|Any CPU + {28B3F937-145C-4FD4-A75B-A25EA4CC0428}.Release|Any CPU.Build.0 = Release .Net 4.6.1|Any CPU {576297B8-423D-4533-B75A-F186CCFF0D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {576297B8-423D-4533-B75A-F186CCFF0D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU {576297B8-423D-4533-B75A-F186CCFF0D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/VAR.Json/Build.NuGet.cmd b/VAR.Json/Build.NuGet.cmd new file mode 100644 index 0000000..f56ac9a --- /dev/null +++ b/VAR.Json/Build.NuGet.cmd @@ -0,0 +1,24 @@ +@echo off + +:: MSBuild and tools path +if exist "%ProgramFiles%\MSBuild\14.0\bin" set PATH=%ProgramFiles%\MSBuild\14.0\bin;%PATH% +if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin" set PATH=%ProgramFiles(x86)%\MSBuild\14.0\bin;%PATH% + +:: NuGet +set nuget="nuget" +if exist "%~dp0..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe" set nuget="%~dp0\..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe" + +:: Release .Net 3.5 +Title Building Release .Net 3.5 +msbuild VAR.Json.csproj /t:Build /p:Configuration="Release .Net 3.5" /p:Platform="AnyCPU" + +:: Release .Net 4.6.1 +Title Building Release .Net 4.6.1 +msbuild VAR.Json.csproj /t:Build /p:Configuration="Release .Net 4.6.1" /p:Platform="AnyCPU" + +:: Packing Nuget +Title Packing Nuget +%nuget% pack VAR.Json.csproj -Verbosity detailed -OutputDir "NuGet" -MSBuildVersion "14.0" -Properties Configuration="Release .Net 4.6.1" -Prop Platform=AnyCPU + +title Finished +pause diff --git a/VAR.Json/Nuget/keep.txt b/VAR.Json/Nuget/keep.txt new file mode 100644 index 0000000..e69de29 diff --git a/VAR.Json/VAR.Json.csproj b/VAR.Json/VAR.Json.csproj index 3b196d2..9b45a16 100644 --- a/VAR.Json/VAR.Json.csproj +++ b/VAR.Json/VAR.Json.csproj @@ -12,22 +12,43 @@ v4.6.1 512 - + true full false - bin\Debug\ + bin\Debug\net461 DEBUG;TRACE prompt 4 + v4.6.1 - + pdbonly true - bin\Release\ + bin\Release\net461 TRACE prompt 4 + v4.6.1 + + + true + full + false + bin\Debug\net35 + DEBUG;TRACE + prompt + 4 + v3.5 + + + pdbonly + true + bin\Release\net35 + TRACE + prompt + 4 + v3.5 @@ -40,6 +61,14 @@ + + + + + + + +