Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Commit

Permalink
switched to netstandard1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamralph committed Oct 20, 2016
1 parent ca8a312 commit 1cb4e60
Show file tree
Hide file tree
Showing 50 changed files with 534 additions and 2,216 deletions.
13 changes: 5 additions & 8 deletions .gitignore
@@ -1,17 +1,14 @@
artifacts/
bin/
obj/
.vs/

*.suo
*.user

/src/packages/*
!/src/packages/NuGet.CommandLine.*
/src/packages/NuGet.CommandLine.*/*
/src/packages/NuGet.CommandLine.*/*.*
!/src/packages/NuGet.CommandLine.*/tools
/src/packages/NuGet.CommandLine.*/tools/*
/src/packages/NuGet.CommandLine.*/tools/*.*
!/src/packages/NuGet.CommandLine.*/tools/NuGet.exe
packages

.nuget/[Nn]u[Gg]et.exe

*.sln.ide
project.lock.json
4 changes: 4 additions & 0 deletions .nuget/packages.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="xunit.runners" version="1.9.2" />
</packages>
82 changes: 82 additions & 0 deletions LiteGuard.sln
@@ -0,0 +1,82 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFiles", "{1DAD0ED8-7F96-4299-BEBB-04F3C25BFC76}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
appveyor.yml = appveyor.yml
build.cmd = build.cmd
CONTRIBUTING.md = CONTRIBUTING.md
Gemfile = Gemfile
Gemfile.lock = Gemfile.lock
how_to_build.md = how_to_build.md
license.txt = license.txt
rakefile.rb = rakefile.rb
README.md = README.md
stylecop.json = stylecop.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{BBC5886B-9456-470B-836F-722154863920}"
ProjectSection(SolutionItems) = preProject
.nuget\packages.config = .nuget\packages.config
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{56B4AF74-81A3-445B-9BEE-F044C1106D0B}"
ProjectSection(SolutionItems) = preProject
tests\LiteGuard.Test.ruleset = tests\LiteGuard.Test.ruleset
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiteGuard.net35", "src\LiteGuard.net35\LiteGuard.net35.csproj", "{47627927-79B6-4AFD-A9C1-A033BA2B7AA9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiteGuard.Test.Acceptance.net35", "tests\LiteGuard.Test.Acceptance.net35\LiteGuard.Test.Acceptance.net35.csproj", "{FCADACC8-D552-4BFF-A7E1-16BC169B05C6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5BF2A559-0478-4C78-A258-7E45EE82BCEB}"
ProjectSection(SolutionItems) = preProject
src\CommonAssemblyInfo.cs = src\CommonAssemblyInfo.cs
src\LiteGuard.CustomDictionary.xml = src\LiteGuard.CustomDictionary.xml
src\LiteGuard.nuspec = src\LiteGuard.nuspec
src\LiteGuard.ruleset = src\LiteGuard.ruleset
src\LiteGuard.snk = src\LiteGuard.snk
src\LiteGuard.Source.nuspec = src\LiteGuard.Source.nuspec
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LiteGuard", "src\LiteGuard\LiteGuard.xproj", "{E928D760-11DB-40B7-96B3-056542E76FE9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiteGuard.Test.Acceptance.net45", "tests\LiteGuard.Test.Acceptance.net45\LiteGuard.Test.Acceptance.net45.csproj", "{FD663F10-F60E-4CF2-97D8-638B18E5DC8C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{47627927-79B6-4AFD-A9C1-A033BA2B7AA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47627927-79B6-4AFD-A9C1-A033BA2B7AA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47627927-79B6-4AFD-A9C1-A033BA2B7AA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47627927-79B6-4AFD-A9C1-A033BA2B7AA9}.Release|Any CPU.Build.0 = Release|Any CPU
{FCADACC8-D552-4BFF-A7E1-16BC169B05C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCADACC8-D552-4BFF-A7E1-16BC169B05C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCADACC8-D552-4BFF-A7E1-16BC169B05C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCADACC8-D552-4BFF-A7E1-16BC169B05C6}.Release|Any CPU.Build.0 = Release|Any CPU
{E928D760-11DB-40B7-96B3-056542E76FE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E928D760-11DB-40B7-96B3-056542E76FE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E928D760-11DB-40B7-96B3-056542E76FE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E928D760-11DB-40B7-96B3-056542E76FE9}.Release|Any CPU.Build.0 = Release|Any CPU
{FD663F10-F60E-4CF2-97D8-638B18E5DC8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD663F10-F60E-4CF2-97D8-638B18E5DC8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD663F10-F60E-4CF2-97D8-638B18E5DC8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD663F10-F60E-4CF2-97D8-638B18E5DC8C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{47627927-79B6-4AFD-A9C1-A033BA2B7AA9} = {5BF2A559-0478-4C78-A258-7E45EE82BCEB}
{FCADACC8-D552-4BFF-A7E1-16BC169B05C6} = {56B4AF74-81A3-445B-9BEE-F044C1106D0B}
{E928D760-11DB-40B7-96B3-056542E76FE9} = {5BF2A559-0478-4C78-A258-7E45EE82BCEB}
{FD663F10-F60E-4CF2-97D8-638B18E5DC8C} = {56B4AF74-81A3-445B-9BEE-F044C1106D0B}
EndGlobalSection
EndGlobal
28 changes: 27 additions & 1 deletion build.cmd
@@ -1,3 +1,29 @@
@echo off
:: the windows shell, so amazing

:: options
@echo Off
cd %~dp0
setlocal

:: determine cache dir
set NUGET_CACHE_DIR=%LocalAppData%\.nuget\v3.4.4

:: download nuget to cache dir
set NUGET_URL=https://dist.nuget.org/win-x86-commandline/v3.4.4/NuGet.exe
if not exist %NUGET_CACHE_DIR%\NuGet.exe (
if not exist %NUGET_CACHE_DIR% md %NUGET_CACHE_DIR%
echo Downloading '%NUGET_URL%'' to '%NUGET_CACHE_DIR%\NuGet.exe'...
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest '%NUGET_URL%' -OutFile '%NUGET_CACHE_DIR%\NuGet.exe'"
)

:: copy nuget locally
if not exist .nuget\NuGet.exe (
if not exist .nuget md .nuget
copy %NUGET_CACHE_DIR%\NuGet.exe .nuget\NuGet.exe > nul
)

:: restore packages
.nuget\NuGet.exe restore .\LiteGuard.sln -MSBuildVersion 14

:: run script
call bundle exec rake %*
52 changes: 9 additions & 43 deletions how_to_build.md
Expand Up @@ -7,82 +7,48 @@ It also replicates the build on the Continuous Integration build server and is t

You can also build the solution using Visual Studio 2015 or later, but this doesn't provide the same assurances as the Rake build.

Note that under Mono, the PCL target is [redirected](https://github.com/liteguard/liteguard/blob/master/src/Microsoft.Portable.CSharp.targets) to build against .NET framework 4.0, due to lack of support for PCL in Mono at the time of writing. This means the PCL output in the NuGet package produced by a Mono build cannot be used :frowning:.

## Prerequisites

1. If you are using Windows and you want to build using the Microsoft .NET framework:

1. Ensure you have .NET framework 3.5 and 4.0 or later installed.

1. Ensure you have Visual Studio 2012 or later or MSBuild 4.5 or later installed.

1. If you are using Linux, install Mono 2.10.9 or later:<sup>1</sup>

`sudo apt-get install mono-complete`

1. If you are using OSX, or if you want to use Mono in Windows, [install Mono 2.10.9 or later](http://www.go-mono.com/mono-downloads/).<sup>1</sup>
1. Ensure you have MSBuild 14 installed (also included in Visual Studio 2015).

1. Install Ruby 1.8.7 or later.

For Windows we recommend using the [RubyInstaller](http://rubyinstaller.org/) and selecting 'Add Ruby executables to your PATH' when prompted. For alternatives see the [Ruby download page](http://www.ruby-lang.org/en/downloads/).

1. Using a command prompt, update RubyGems to the latest version:<sup>2</sup>
1. Using a command prompt, update RubyGems to the latest version:

`gem update --system`

1. Install bundler:<sup>2</sup>
1. Install bundler:

`gem install bundler`

1. Install gems:<sup>2</sup>
1. Install gems:

`bundler install`

## Building

Using a command prompt, navigate to your clone root folder and execute:

`bundle exec rake`
`build.cmd`

This executes the default build tasks. After the build has completed, the build artifacts will be located in `artifacts`.

## Extras

* View the full list of build tasks:

`bundle exec rake -T`
`build.cmd -T`

* Run a specific task:

`bundle exec rake accept`
`build.cmd accept`

* Run multiple tasks:

`bundle exec rake accept pack`

* Run the default build using Mono in Windows (this has no effect in Linux or OSX which already uses Mono by default):

`bundle exec rake mono`

* Run specific or multiple tasks using Mono in Windows:

`bundle exec rake mono spec`

or

`bundle exec rake mono spec pack`

* Run initial tasks using .NET and further tasks using Mono in Windows (barely useful but ultra cool):

`bundle exec rake clean build mono spec pack`

(All tasks before `mono` will use .NET and all tasks after `mono` will use Mono.)
`build.cmd accept pack`

* View the full list of rake options:

`bundle exec rake -h`

<sup>1 Earlier versions of Mono may also work if Microsoft.Build.dll is manually added to the Mono GAC.</sup>

<sup>2 If you are using Linux or OSX, you may have to execute this command using `sudo`.</sup>
`build.cmd -h`

0 comments on commit 1cb4e60

Please sign in to comment.