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

Commit 8113485

Browse files
committed
Migrate to the new .csproj project system
1 parent 06c7047 commit 8113485

23 files changed

+309
-553
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,7 +19,6 @@ project.lock.json
1819
[Dd]ebug/
1920
[Rr]elease/
2021
x64/
21-
build/
2222
[Bb]in/
2323
[Oo]bj/
2424

@@ -160,4 +160,3 @@ $RECYCLE.BIN/
160160

161161
# Mac desktop service store files
162162
.DS_Store
163-

.travis.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
language: csharp
2-
sudo: false
2+
sudo: required
3+
dist: trusty
4+
addons:
5+
apt:
6+
packages:
7+
- gettext
8+
- libcurl4-openssl-dev
9+
- libicu-dev
10+
- libssl-dev
11+
- libunwind8
12+
- zlib1g
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
323
script:
4-
- ./build.sh verify
5-
mono:
6-
- alpha
7-
- latest
24+
- ./build.sh

AspNet.Security.OpenIdConnect.Samples.sln

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

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.4
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "HelloSignalR", "samples\SignalR\HelloSignalR\HelloSignalR.xproj", "{BB7CE31F-BC7C-4F8B-8F05-19024ABD064D}"
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SignalR", "SignalR", "{61F3E0D4-509C-4F0B-BD9F-DC1444C41368}"
77
EndProject
8-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mvc.Client", "samples\Mvc\Mvc.Client\Mvc.Client.xproj", "{68631868-902A-46FB-9A44-BACF1812FBDE}"
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mvc", "Mvc", "{139182EF-E215-4E9C-91AA-312F29B33A76}"
99
EndProject
10-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Mvc.Server", "samples\Mvc\Mvc.Server\Mvc.Server.xproj", "{440B6A0C-05F3-4483-B4AA-FB0BC4B239FF}"
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cordova", "Cordova", "{E0E43F21-A9C7-4B50-BD31-55A900025546}"
1111
EndProject
12-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SignalR", "SignalR", "{61F3E0D4-509C-4F0B-BD9F-DC1444C41368}"
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Postman", "Postman", "{EDD8978C-7D69-4FA8-AC10-C216FE7D4622}"
1313
EndProject
14-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mvc", "Mvc", "{139182EF-E215-4E9C-91AA-312F29B33A76}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloSignalR", "samples\SignalR\HelloSignalR\HelloSignalR.csproj", "{BB7CE31F-BC7C-4F8B-8F05-19024ABD064D}"
1515
EndProject
16-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{57AA233F-DD3B-4971-9C24-D024E07656EE}"
17-
ProjectSection(SolutionItems) = preProject
18-
global.json = global.json
19-
NuGet.config = NuGet.config
20-
EndProjectSection
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.Client", "samples\Mvc\Mvc.Client\Mvc.Client.csproj", "{68631868-902A-46FB-9A44-BACF1812FBDE}"
2117
EndProject
22-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Backend", "samples\Cordova\Backend\Backend.xproj", "{1F7AAAC4-26E8-408A-AAF2-37B9AC35AD5C}"
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mvc.Server", "samples\Mvc\Mvc.Server\Mvc.Server.csproj", "{440B6A0C-05F3-4483-B4AA-FB0BC4B239FF}"
2319
EndProject
24-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cordova", "Cordova", "{E0E43F21-A9C7-4B50-BD31-55A900025546}"
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Backend", "samples\Cordova\Backend\Backend.csproj", "{1F7AAAC4-26E8-408A-AAF2-37B9AC35AD5C}"
2521
EndProject
2622
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "MobileApp", "samples\Cordova\MobileApp\MobileApp.jsproj", "{4F059A36-CC11-4968-9E05-70373306A827}"
2723
EndProject
28-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Postman", "Postman", "{EDD8978C-7D69-4FA8-AC10-C216FE7D4622}"
29-
EndProject
30-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Postman", "samples\Postman\Postman.xproj", "{B95B86BC-B486-4963-8E4C-60DFCE293107}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Postman", "samples\Postman\Postman.csproj", "{B95B86BC-B486-4963-8E4C-60DFCE293107}"
3125
EndProject
3226
Global
3327
GlobalSection(SolutionConfigurationPlatforms) = preSolution

build.cmd

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,2 @@
1-
@echo off
2-
cd %~dp0
3-
4-
SETLOCAL
5-
SET NUGET_VERSION=latest
6-
SET CACHED_NUGET="%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe"
7-
SET BUILDCMD_KOREBUILD_VERSION=
8-
SET BUILDCMD_DNX_VERSION=
9-
10-
IF EXIST %CACHED_NUGET% goto copynuget
11-
echo Downloading latest version of NuGet.exe...
12-
IF NOT EXIST "%LocalAppData%\NuGet" md "%LocalAppData%\NuGet"
13-
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
14-
15-
:copynuget
16-
IF EXIST .nuget\nuget.exe goto restore
17-
md .nuget
18-
copy %CACHED_NUGET% .nuget\nuget.exe > nul
19-
20-
:restore
21-
IF EXIST packages\Sake goto getdnx
22-
IF "%BUILDCMD_KOREBUILD_VERSION%"=="" (
23-
.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
24-
) ELSE (
25-
.nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
26-
)
27-
.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
28-
29-
:getdnx
30-
IF "%BUILDCMD_DNX_VERSION%"=="" (
31-
SET BUILDCMD_DNX_VERSION=latest
32-
)
33-
IF "%SKIP_DNX_INSTALL%"=="" (
34-
CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default
35-
CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default
36-
) ELSE (
37-
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
38-
)
39-
40-
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*
1+
@ECHO OFF
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: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+
31+
cd $PSScriptRoot
32+
33+
$repoFolder = $PSScriptRoot
34+
$env:REPO_FOLDER = $repoFolder
35+
36+
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
37+
if ($env:KOREBUILD_ZIP)
38+
{
39+
$koreBuildZip=$env:KOREBUILD_ZIP
40+
}
41+
42+
$buildFolder = ".build"
43+
$buildFile="$buildFolder\KoreBuild.ps1"
44+
45+
if (!(Test-Path $buildFolder)) {
46+
Write-Host "Downloading KoreBuild from $koreBuildZip"
47+
48+
$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
49+
New-Item -Path "$tempFolder" -Type directory | Out-Null
50+
51+
$localZipFile="$tempFolder\korebuild.zip"
52+
53+
DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6
54+
55+
Add-Type -AssemblyName System.IO.Compression.FileSystem
56+
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)
57+
58+
New-Item -Path "$buildFolder" -Type directory | Out-Null
59+
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse
60+
61+
# Cleanup
62+
if (Test-Path $tempFolder) {
63+
Remove-Item -Recurse -Force $tempFolder
64+
}
65+
}
66+
67+
&"$buildFile" @args

build.sh

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
11
#!/usr/bin/env bash
2+
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3+
cd $repoFolder
24

3-
if test `uname` = Darwin; then
4-
cachedir=~/Library/Caches/KBuild
5-
else
6-
if [ -z $XDG_DATA_HOME ]; then
7-
cachedir=$HOME/.local/share
8-
else
9-
cachedir=$XDG_DATA_HOME;
10-
fi
5+
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
6+
if [ ! -z $KOREBUILD_ZIP ]; then
7+
koreBuildZip=$KOREBUILD_ZIP
118
fi
12-
mkdir -p $cachedir
13-
nugetVersion=latest
14-
cachePath=$cachedir/nuget.$nugetVersion.exe
159

16-
url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe
10+
buildFolder=".build"
11+
buildFile="$buildFolder/KoreBuild.sh"
1712

18-
if test ! -f $cachePath; then
19-
wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
20-
fi
13+
if test ! -d $buildFolder; then
14+
echo "Downloading KoreBuild from $koreBuildZip"
2115

22-
if test ! -e .nuget; then
23-
mkdir .nuget
24-
cp $cachePath .nuget/nuget.exe
25-
fi
16+
tempFolder="/tmp/KoreBuild-$(uuidgen)"
17+
mkdir $tempFolder
2618

27-
if test ! -d packages/Sake; then
28-
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
29-
mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
30-
fi
19+
localZipFile="$tempFolder/korebuild.zip"
3120

32-
if ! type dnvm > /dev/null 2>&1; then
33-
source packages/KoreBuild/build/dnvm.sh
34-
fi
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
3532

36-
if ! type dnx > /dev/null 2>&1 || [ -z "$SKIP_DNX_INSTALL" ]; then
37-
dnvm install latest -runtime coreclr -alias default
38-
dnvm install default -runtime mono -alias default
39-
else
40-
dnvm use default -runtime mono
33+
unzip -q -d $tempFolder $localZipFile
34+
35+
mkdir $buildFolder
36+
cp -r $tempFolder/**/build/** $buildFolder
37+
38+
chmod +x $buildFile
39+
40+
# Cleanup
41+
if test -d $tempFolder; then
42+
rm -rf $tempFolder
43+
fi
4144
fi
4245

43-
mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"
46+
$buildFile -r $repoFolder "$@"

build/dependencies.props

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<AspNetCoreVersion>1.0.0</AspNetCoreVersion>
5+
<AspNetContribOpenIdExtensionsVersion>1.0.0-alpha3-final</AspNetContribOpenIdExtensionsVersion>
6+
<AspNetContribOpenIdServerVersion>1.0.0-beta7-final</AspNetContribOpenIdServerVersion>
7+
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
8+
<RuntimeFrameworkVersion>1.0.0</RuntimeFrameworkVersion>
9+
<SignalRVersion>0.1.0-*</SignalRVersion>
10+
</PropertyGroup>
11+
12+
</Project>

global.json

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<Import Project="..\..\..\build\dependencies.props" />
4+
5+
<PropertyGroup>
6+
<TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
7+
<PreserveCompilationContext>true</PreserveCompilationContext>
8+
<OutputType>Exe</OutputType>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<EmbeddedResource Include="Certificate.pfx" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<PackageReference Include="AspNet.Security.OAuth.Introspection" Version="$(AspNetContribOpenIdExtensionsVersion)" />
17+
<PackageReference Include="AspNet.Security.OAuth.Validation" Version="$(AspNetContribOpenIdExtensionsVersion)" />
18+
<PackageReference Include="AspNet.Security.OpenIdConnect.Server" Version="$(AspNetContribOpenIdServerVersion)" />
19+
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="$(AspNetCoreVersion)" />
20+
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="$(AspNetCoreVersion)" />
21+
<PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="$(AspNetCoreVersion)" />
22+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="$(AspNetCoreVersion)" />
23+
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(AspNetCoreVersion)" />
24+
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
25+
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="$(AspNetCoreVersion)" />
26+
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="$(AspNetCoreVersion)" />
27+
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(AspNetCoreVersion)" />
28+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(AspNetCoreVersion)" />
29+
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(AspNetCoreVersion)" />
30+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="$(AspNetCoreVersion)" />
31+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="$(AspNetCoreVersion)" />
32+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
33+
</ItemGroup>
34+
35+
</Project>

samples/Cordova/Backend/Backend.xproj

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)