Skip to content

Commit

Permalink
Migrate to the new .csproj project system
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchalet committed Mar 23, 2017
1 parent 214c429 commit 112c46d
Show file tree
Hide file tree
Showing 45 changed files with 474 additions and 793 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -20,7 +20,6 @@ _references.js
[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

Expand Down
18 changes: 13 additions & 5 deletions .travis.yml
@@ -1,5 +1,5 @@
language: csharp
sudo: required
sudo: false
dist: trusty
addons:
apt:
Expand All @@ -10,8 +10,16 @@ addons:
- libssl-dev
- libunwind8
- zlib1g
mono:
- alpha
- latest
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
mono: none
os:
- linux
- osx
osx_image: xcode8.2
before_install:
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
script:
- ./build.sh verify
- ./build.sh
30 changes: 15 additions & 15 deletions OpenIddict.sln
@@ -1,35 +1,35 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict", "src\OpenIddict\OpenIddict.xproj", "{80A8D6CE-C29A-4602-9844-D51FEF9C33C8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D544447C-D701-46BB-9A5B-C76C612A596B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{F47D1283-0EE9-4728-8026-58405C29B786}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mvc.Client", "samples\Mvc.Client\Mvc.Client.xproj", "{96B22EB9-771A-4DCA-B828-E6EA2774CF1B}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{5FC71D6A-A994-4F62-977F-88A7D25379D7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict", "src\OpenIddict\OpenIddict.csproj", "{80A8D6CE-C29A-4602-9844-D51FEF9C33C8}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mvc.Server", "samples\Mvc.Server\Mvc.Server.xproj", "{7CBEAFD2-E3D0-4424-9B78-E87AB52327A6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.Client", "samples\Mvc.Client\Mvc.Client.csproj", "{96B22EB9-771A-4DCA-B828-E6EA2774CF1B}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.EntityFrameworkCore", "src\OpenIddict.EntityFrameworkCore\OpenIddict.EntityFrameworkCore.xproj", "{D2450929-ED0E-420D-B475-327924F9701C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.Server", "samples\Mvc.Server\Mvc.Server.csproj", "{7CBEAFD2-E3D0-4424-9B78-E87AB52327A6}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.Core", "src\OpenIddict.Core\OpenIddict.Core.xproj", "{E60CF8CA-6313-4359-BE43-AFCBB927EA30}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.EntityFrameworkCore", "src\OpenIddict.EntityFrameworkCore\OpenIddict.EntityFrameworkCore.csproj", "{D2450929-ED0E-420D-B475-327924F9701C}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.Mvc", "src\OpenIddict.Mvc\OpenIddict.Mvc.xproj", "{6EB5B6A9-4ED8-401D-A673-FD513F256AAE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Core", "src\OpenIddict.Core\OpenIddict.Core.csproj", "{E60CF8CA-6313-4359-BE43-AFCBB927EA30}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{5FC71D6A-A994-4F62-977F-88A7D25379D7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Mvc", "src\OpenIddict.Mvc\OpenIddict.Mvc.csproj", "{6EB5B6A9-4ED8-401D-A673-FD513F256AAE}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.Core.Tests", "test\OpenIddict.Core.Tests\OpenIddict.Core.Tests.xproj", "{A892B3DE-1A02-48D6-993B-DD3DFCAC84C7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Core.Tests", "test\OpenIddict.Core.Tests\OpenIddict.Core.Tests.csproj", "{A892B3DE-1A02-48D6-993B-DD3DFCAC84C7}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.EntityFrameworkCore.Tests", "test\OpenIddict.EntityFrameworkCore.Tests\OpenIddict.EntityFrameworkCore.Tests.xproj", "{7831F17A-DF0B-42EC-841B-065A9B5BD786}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.EntityFrameworkCore.Tests", "test\OpenIddict.EntityFrameworkCore.Tests\OpenIddict.EntityFrameworkCore.Tests.csproj", "{7831F17A-DF0B-42EC-841B-065A9B5BD786}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.Mvc.Tests", "test\OpenIddict.Mvc.Tests\OpenIddict.Mvc.Tests.xproj", "{8B4B0CCC-711B-4F9D-9DE6-DD32BDD3BCCA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Mvc.Tests", "test\OpenIddict.Mvc.Tests\OpenIddict.Mvc.Tests.csproj", "{8B4B0CCC-711B-4F9D-9DE6-DD32BDD3BCCA}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.Tests", "test\OpenIddict.Tests\OpenIddict.Tests.xproj", "{3E2FBDB3-DC82-4E97-8EBC-CC8B279110FF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Tests", "test\OpenIddict.Tests\OpenIddict.Tests.csproj", "{3E2FBDB3-DC82-4E97-8EBC-CC8B279110FF}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OpenIddict.Models", "src\OpenIddict.Models\OpenIddict.Models.xproj", "{0102A6CC-41A6-4B34-B49E-65AFE95882BB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIddict.Models", "src\OpenIddict.Models\OpenIddict.Models.csproj", "{0102A6CC-41A6-4B34-B49E-65AFE95882BB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion build.cmd
@@ -1,2 +1,2 @@
@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"
45 changes: 38 additions & 7 deletions build.ps1
@@ -1,9 +1,39 @@
$ErrorActionPreference = "Stop"

function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
{
while($true)
{
try
{
Invoke-WebRequest $url -OutFile $downloadLocation
break
}
catch
{
$exceptionMessage = $_.Exception.Message
Write-Host "Failed to download '$url': $exceptionMessage"
if ($retries -gt 0) {
$retries--
Write-Host "Waiting 10 seconds before retrying. Retries left: $retries"
Start-Sleep -Seconds 10

}
else
{
$exception = $_.Exception
throw $exception
}
}
}
}

cd $PSScriptRoot

$repoFolder = $PSScriptRoot
$env:REPO_FOLDER = $repoFolder

$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/1.0.0.zip"
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
if ($env:KOREBUILD_ZIP)
{
$koreBuildZip=$env:KOREBUILD_ZIP
Expand All @@ -13,17 +43,18 @@ $buildFolder = ".build"
$buildFile="$buildFolder\KoreBuild.ps1"

if (!(Test-Path $buildFolder)) {
Write-Host "Downloading KoreBuild from $koreBuildZip"
Write-Host "Downloading KoreBuild from $koreBuildZip"

$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
New-Item -Path "$tempFolder" -Type directory | Out-Null

$localZipFile="$tempFolder\korebuild.zip"

Invoke-WebRequest $koreBuildZip -OutFile $localZipFile

DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)

New-Item -Path "$buildFolder" -Type directory | Out-Null
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse

Expand All @@ -33,4 +64,4 @@ if (!(Test-Path $buildFolder)) {
}
}

&"$buildFile" $args
&"$buildFile" @args
35 changes: 23 additions & 12 deletions build.sh
Expand Up @@ -2,7 +2,7 @@
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $repoFolder

koreBuildZip="https://github.com/aspnet/KoreBuild/archive/1.0.0.zip"
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
if [ ! -z $KOREBUILD_ZIP ]; then
koreBuildZip=$KOREBUILD_ZIP
fi
Expand All @@ -12,24 +12,35 @@ buildFile="$buildFolder/KoreBuild.sh"

if test ! -d $buildFolder; then
echo "Downloading KoreBuild from $koreBuildZip"
tempFolder="/tmp/KoreBuild-$(uuidgen)"

tempFolder="/tmp/KoreBuild-$(uuidgen)"
mkdir $tempFolder

localZipFile="$tempFolder/korebuild.zip"

wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip /dev/null

retries=6
until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null)
do
echo "Failed to download '$koreBuildZip'"
if [ "$retries" -le 0 ]; then
exit 1
fi
retries=$((retries - 1))
echo "Waiting 10 seconds before retrying. Retries left: $retries"
sleep 10s
done

unzip -q -d $tempFolder $localZipFile

mkdir $buildFolder
cp -r $tempFolder/**/build/** $buildFolder

chmod +x $buildFile

# Cleanup
if test ! -d $tempFolder; then
rm -rf $tempFolder
if test -d $tempFolder; then
rm -rf $tempFolder
fi
fi

$buildFile -r $repoFolder "$@"
$buildFile -r $repoFolder "$@"
22 changes: 22 additions & 0 deletions build/common.props
@@ -0,0 +1,22 @@
<Project>

<Import Project="dependencies.props" />
<Import Project="version.props" />

<PropertyGroup>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup>
<Product>OpenIddict</Product>
<PackageIconUrl>https://avatars3.githubusercontent.com/u/13908567?s=64</PackageIconUrl>
<PackageProjectUrl>https://github.com/openiddict/openiddict-core</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/openiddict/openiddict-core</RepositoryUrl>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>

</Project>
16 changes: 16 additions & 0 deletions build/dependencies.props
@@ -0,0 +1,16 @@
<Project>

<PropertyGroup>
<AspNetCoreVersion>1.0.0</AspNetCoreVersion>
<AspNetContribOpenIdExtensionsVersion>1.0.0-beta1-final</AspNetContribOpenIdExtensionsVersion>
<AspNetContribOpenIdServerVersion>1.0.0-rc1-final</AspNetContribOpenIdServerVersion>
<CryptoHelperVersion>2.0.0</CryptoHelperVersion>
<JetBrainsVersion>10.3.0</JetBrainsVersion>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<MoqVersion>4.6.38-alpha</MoqVersion>
<RuntimeFrameworkVersion>1.0.0</RuntimeFrameworkVersion>
<TestSdkVersion>15.0.0</TestSdkVersion>
<XunitVersion>2.2.0</XunitVersion>
</PropertyGroup>

</Project>
8 changes: 8 additions & 0 deletions build/version.props
@@ -0,0 +1,8 @@
<Project>

<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>beta2</VersionSuffix>
</PropertyGroup>

</Project>
6 changes: 0 additions & 6 deletions global.json

This file was deleted.

26 changes: 26 additions & 0 deletions samples/Mvc.Client/Mvc.Client.csproj
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<Import Project="..\..\build\dependencies.props" />

<PropertyGroup>
<TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
</ItemGroup>

</Project>
18 changes: 0 additions & 18 deletions samples/Mvc.Client/Mvc.Client.xproj

This file was deleted.

65 changes: 0 additions & 65 deletions samples/Mvc.Client/project.json

This file was deleted.

0 comments on commit 112c46d

Please sign in to comment.