Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

Commit 2f7af16

Browse files
committed
Migrate to the new .csproj project system
1 parent 4c8326c commit 2f7af16

35 files changed

+341
-495
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
target/
77
.nuget/
88
.vs/
9+
.build/
910

1011
# User-specific files
1112
*.suo
@@ -18,10 +19,8 @@ project.lock.json
1819
[Dd]ebug/
1920
[Rr]elease/
2021
x64/
21-
build/
2222
[Bb]in/
2323
[Oo]bj/
24-
.build/
2524

2625
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
2726
!packages/*/build/

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ addons:
1010
- libssl-dev
1111
- libunwind8
1212
- zlib1g
13-
mono:
14-
- alpha
15-
- latest
13+
env:
14+
global:
15+
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
16+
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
17+
mono: none
18+
os:
19+
- linux
20+
- osx
21+
before_install:
22+
- 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
1623
script:
17-
- ./build.sh verify
24+
- ./build.sh

AspNet.Security.OAuth.Extensions.sln

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.24720.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.4
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7AADF737-9B13-4E5C-8F32-8BF21429E093}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2B1B08E0-E9A3-40C0-B200-DE09952AF0E7}"
99
EndProject
10-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNet.Security.OAuth.Introspection", "src\AspNet.Security.OAuth.Introspection\AspNet.Security.OAuth.Introspection.xproj", "{A8569260-142C-427A-8B14-A8DF56CC15B7}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Introspection", "src\AspNet.Security.OAuth.Introspection\AspNet.Security.OAuth.Introspection.csproj", "{A8569260-142C-427A-8B14-A8DF56CC15B7}"
1111
EndProject
12-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNet.Security.OAuth.Introspection.Tests", "test\AspNet.Security.OAuth.Introspection.Tests\AspNet.Security.OAuth.Introspection.Tests.xproj", "{4070DC46-0FD5-4ADD-95B3-E9908AD82407}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Introspection.Tests", "test\AspNet.Security.OAuth.Introspection.Tests\AspNet.Security.OAuth.Introspection.Tests.csproj", "{4070DC46-0FD5-4ADD-95B3-E9908AD82407}"
1313
EndProject
14-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNet.Security.OAuth.Validation", "src\AspNet.Security.OAuth.Validation\AspNet.Security.OAuth.Validation.xproj", "{043FD757-9C69-4A68-93BF-EAD2672BBD78}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Validation", "src\AspNet.Security.OAuth.Validation\AspNet.Security.OAuth.Validation.csproj", "{043FD757-9C69-4A68-93BF-EAD2672BBD78}"
1515
EndProject
16-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNet.Security.OAuth.Validation.Tests", "test\AspNet.Security.OAuth.Validation.Tests\AspNet.Security.OAuth.Validation.Tests.xproj", "{FC99E58D-86BC-4EAD-B282-C9F1491CCF96}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Validation.Tests", "test\AspNet.Security.OAuth.Validation.Tests\AspNet.Security.OAuth.Validation.Tests.csproj", "{FC99E58D-86BC-4EAD-B282-C9F1491CCF96}"
1717
EndProject
18-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Owin.Security.OAuth.Introspection", "src\Owin.Security.OAuth.Introspection\Owin.Security.OAuth.Introspection.xproj", "{F9031F69-74BF-4321-88D5-2A606D3DA4E4}"
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Owin.Security.OAuth.Introspection", "src\Owin.Security.OAuth.Introspection\Owin.Security.OAuth.Introspection.csproj", "{F9031F69-74BF-4321-88D5-2A606D3DA4E4}"
1919
EndProject
20-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Owin.Security.OAuth.Introspection.Tests", "test\Owin.Security.OAuth.Introspection.Tests\Owin.Security.OAuth.Introspection.Tests.xproj", "{A6B08CB3-0B3E-444D-BCF1-E9E41CEEC984}"
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Owin.Security.OAuth.Introspection.Tests", "test\Owin.Security.OAuth.Introspection.Tests\Owin.Security.OAuth.Introspection.Tests.csproj", "{A6B08CB3-0B3E-444D-BCF1-E9E41CEEC984}"
2121
EndProject
22-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Owin.Security.OAuth.Validation", "src\Owin.Security.OAuth.Validation\Owin.Security.OAuth.Validation.xproj", "{719AF040-773B-4DA5-B53E-28B26D1121FF}"
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Owin.Security.OAuth.Validation", "src\Owin.Security.OAuth.Validation\Owin.Security.OAuth.Validation.csproj", "{719AF040-773B-4DA5-B53E-28B26D1121FF}"
2323
EndProject
24-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Owin.Security.OAuth.Validation.Tests", "test\Owin.Security.OAuth.Validation.Tests\Owin.Security.OAuth.Validation.Tests.xproj", "{6DC60DCF-B34B-4F14-9E73-BE466059A9B2}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Owin.Security.OAuth.Validation.Tests", "test\Owin.Security.OAuth.Validation.Tests\Owin.Security.OAuth.Validation.Tests.csproj", "{6DC60DCF-B34B-4F14-9E73-BE466059A9B2}"
2525
EndProject
2626
Global
2727
GlobalSection(SolutionConfigurationPlatforms) = preSolution

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@ECHO OFF
2-
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"
2+
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"

build.ps1

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
4+
{
5+
while($true)
6+
{
7+
try
8+
{
9+
Invoke-WebRequest $url -OutFile $downloadLocation
10+
break
11+
}
12+
catch
13+
{
14+
$exceptionMessage = $_.Exception.Message
15+
Write-Host "Failed to download '$url': $exceptionMessage"
16+
if ($retries -gt 0) {
17+
$retries--
18+
Write-Host "Waiting 10 seconds before retrying. Retries left: $retries"
19+
Start-Sleep -Seconds 10
20+
21+
}
22+
else
23+
{
24+
$exception = $_.Exception
25+
throw $exception
26+
}
27+
}
28+
}
29+
}
30+
131
cd $PSScriptRoot
232

333
$repoFolder = $PSScriptRoot
434
$env:REPO_FOLDER = $repoFolder
535

6-
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/1.0.0.zip"
36+
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
737
if ($env:KOREBUILD_ZIP)
838
{
939
$koreBuildZip=$env:KOREBUILD_ZIP
@@ -13,17 +43,18 @@ $buildFolder = ".build"
1343
$buildFile="$buildFolder\KoreBuild.ps1"
1444

1545
if (!(Test-Path $buildFolder)) {
16-
Write-Host "Downloading KoreBuild from $koreBuildZip"
17-
46+
Write-Host "Downloading KoreBuild from $koreBuildZip"
47+
1848
$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
1949
New-Item -Path "$tempFolder" -Type directory | Out-Null
2050

2151
$localZipFile="$tempFolder\korebuild.zip"
22-
23-
Invoke-WebRequest $koreBuildZip -OutFile $localZipFile
52+
53+
DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6
54+
2455
Add-Type -AssemblyName System.IO.Compression.FileSystem
2556
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)
26-
57+
2758
New-Item -Path "$buildFolder" -Type directory | Out-Null
2859
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse
2960

@@ -33,4 +64,4 @@ if (!(Test-Path $buildFolder)) {
3364
}
3465
}
3566

36-
&"$buildFile" $args
67+
&"$buildFile" @args

build.sh

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
33
cd $repoFolder
44

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

1313
if test ! -d $buildFolder; then
1414
echo "Downloading KoreBuild from $koreBuildZip"
15-
16-
tempFolder="/tmp/KoreBuild-$(uuidgen)"
15+
16+
tempFolder="/tmp/KoreBuild-$(uuidgen)"
1717
mkdir $tempFolder
18-
18+
1919
localZipFile="$tempFolder/korebuild.zip"
20-
21-
wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip /dev/null
20+
21+
retries=6
22+
until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null)
23+
do
24+
echo "Failed to download '$koreBuildZip'"
25+
if [ "$retries" -le 0 ]; then
26+
exit 1
27+
fi
28+
retries=$((retries - 1))
29+
echo "Waiting 10 seconds before retrying. Retries left: $retries"
30+
sleep 10s
31+
done
32+
2233
unzip -q -d $tempFolder $localZipFile
23-
34+
2435
mkdir $buildFolder
2536
cp -r $tempFolder/**/build/** $buildFolder
26-
37+
2738
chmod +x $buildFile
28-
39+
2940
# Cleanup
30-
if test ! -d $tempFolder; then
31-
rm -rf $tempFolder
41+
if test -d $tempFolder; then
42+
rm -rf $tempFolder
3243
fi
3344
fi
3445

35-
$buildFile -r $repoFolder "$@"
46+
$buildFile -r $repoFolder "$@"

build/common.props

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project>
2+
3+
<Import Project="dependencies.props" />
4+
<Import Project="version.props" />
5+
6+
<PropertyGroup>
7+
<NoWarn>$(NoWarn);CS1591</NoWarn>
8+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
</PropertyGroup>
11+
12+
<PropertyGroup>
13+
<Product>aspnet-contrib</Product>
14+
<PackageIconUrl>https://avatars3.githubusercontent.com/u/7998081?s=64</PackageIconUrl>
15+
<PackageProjectUrl>https://github.com/aspnet-contrib/AspNet.Security.OAuth.Extensions</PackageProjectUrl>
16+
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</PackageLicenseUrl>
17+
<RepositoryType>git</RepositoryType>
18+
<RepositoryUrl>git://github.com/aspnet-contrib/AspNet.Security.OAuth.Extensions</RepositoryUrl>
19+
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
20+
</PropertyGroup>
21+
22+
</Project>

build/dependencies.props

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<AspNetCoreVersion>1.0.0</AspNetCoreVersion>
5+
<IdentityModelVersion>1.0.4.402070948</IdentityModelVersion>
6+
<IdentityModelCoreVersion>2.0.0</IdentityModelCoreVersion>
7+
<JetBrainsVersion>10.3.0</JetBrainsVersion>
8+
<JsonNetVersion>9.0.1</JsonNetVersion>
9+
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
10+
<MoqVersion>4.6.38-alpha</MoqVersion>
11+
<OwinVersion>3.0.1</OwinVersion>
12+
<RuntimeFrameworkVersion>1.0.0</RuntimeFrameworkVersion>
13+
<TestSdkVersion>15.0.0</TestSdkVersion>
14+
<XunitVersion>2.2.0</XunitVersion>
15+
</PropertyGroup>
16+
17+
</Project>

build/repo.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
3+
<ItemGroup>
4+
<ExcludeFromTest Include="$(RepositoryRoot)test\Owin.Security.OAuth.Introspection.Tests\*.csproj" Condition="'$(OS)' != 'Windows_NT'"/>
5+
<ExcludeFromTest Include="$(RepositoryRoot)test\Owin.Security.OAuth.Validation.Tests\*.csproj" Condition="'$(OS)' != 'Windows_NT'"/>
6+
</ItemGroup>
7+
8+
</Project>

build/version.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<VersionPrefix>1.0.0</VersionPrefix>
5+
<VersionSuffix>rtm</VersionSuffix>
6+
</PropertyGroup>
7+
8+
</Project>

0 commit comments

Comments
 (0)