From 212feaa8455f435bcfe61000bcb819008c6749a1 Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 07:59:38 -0500 Subject: [PATCH 1/9] feat(sdk): run dotnet migrate --- global.json | 7 -- .../JsonApiDotNetCore.csproj | 19 +++++ src/JsonApiDotNetCore/project.json | 27 ------- .../JsonApiDotNetCoreExample.csproj | 40 ++++++++++ src/JsonApiDotNetCoreExample/project.json | 77 ------------------- .../JsonApiDotNetCoreExampleTests.csproj | 38 +++++++++ .../project.json | 48 ------------ 7 files changed, 97 insertions(+), 159 deletions(-) delete mode 100644 global.json create mode 100755 src/JsonApiDotNetCore/JsonApiDotNetCore.csproj delete mode 100644 src/JsonApiDotNetCore/project.json create mode 100755 src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj delete mode 100644 src/JsonApiDotNetCoreExample/project.json create mode 100755 test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj delete mode 100644 test/JsonApiDotNetCoreExampleTests/project.json diff --git a/global.json b/global.json deleted file mode 100644 index e2e29a812e..0000000000 --- a/global.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "projects": [ "src", "test" ], - "sdk": { - "version": "1.0.0-preview2-003121" - } -} - diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj new file mode 100755 index 0000000000..12dda4ea87 --- /dev/null +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj @@ -0,0 +1,19 @@ + + + + 1.0.1 + netcoreapp1.0 + JsonApiDotNetCore + JsonApiDotNetCore + 1.1.1 + $(PackageTargetFallback);dnxcore50;portable-net45+win8 + + + + + + + + + + diff --git a/src/JsonApiDotNetCore/project.json b/src/JsonApiDotNetCore/project.json deleted file mode 100644 index 51847a6015..0000000000 --- a/src/JsonApiDotNetCore/project.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": "1.0.1", - - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0", - "type": "platform" - }, - "Microsoft.AspNetCore.Routing": "1.1.0", - "Microsoft.AspNetCore.Mvc": "1.1.0", - "Microsoft.EntityFrameworkCore": "1.1.0", - "Microsoft.Extensions.Logging": "1.1.0" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ] - } - }, - - "tooling": { - "defaultNamespace": "JsonApiDotNetCore" - } -} diff --git a/src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj new file mode 100755 index 0000000000..6f66a0e517 --- /dev/null +++ b/src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj @@ -0,0 +1,40 @@ + + + + netcoreapp1.0 + true + JsonApiDotNetCoreExample + Exe + JsonApiDotNetCoreExample + 1.1.1 + $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/JsonApiDotNetCoreExample/project.json b/src/JsonApiDotNetCoreExample/project.json deleted file mode 100644 index 113aecbec5..0000000000 --- a/src/JsonApiDotNetCoreExample/project.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0", - "type": "platform" - }, - "JsonApiDotNetCore": { - "target": "project" - }, - "Microsoft.AspNetCore.Mvc": "1.1.0", - "Microsoft.AspNetCore.Routing": "1.1.0", - "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", - "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", - "Microsoft.Extensions.Configuration.Json": "1.1.0", - "Microsoft.Extensions.Configuration.CommandLine": "1.1.0", - "Microsoft.Extensions.Logging": "1.1.0", - "Microsoft.Extensions.Logging.Console": "1.1.0", - "Microsoft.Extensions.Logging.Debug": "1.1.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0", - "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final", - "Npgsql.EntityFrameworkCore.PostgreSQL": "1.1.0", - "DotNetCoreDocs": "0.4.0" - }, - - "tools": { - "Microsoft.EntityFrameworkCore.Tools": { - "version": "1.0.0-preview2-final", - "imports": [ - "portable-net45+win8+dnxcore50", - "portable-net45+win8" - ] - }, - "Microsoft.DotNet.Watcher.Tools": "1.0.0-*" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "include": [ - "appsettings.json" - ] - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "publishOptions": { - "include": [ - "wwwroot", - "**/*.cshtml", - "appsettings.json", - "web.config" - ] - }, - - "scripts": { - "postpublish": ["dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"] - }, - - "tooling": { - "defaultNamespace": "JsonApiDotNetCoreExample" - } -} \ No newline at end of file diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj new file mode 100755 index 0000000000..070f0ec529 --- /dev/null +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -0,0 +1,38 @@ + + + + netcoreapp1.0 + true + JsonApiDotNetCoreExampleTests + Exe + JsonApiDotNetCoreExampleTests + true + true + 1.1.1 + $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + diff --git a/test/JsonApiDotNetCoreExampleTests/project.json b/test/JsonApiDotNetCoreExampleTests/project.json deleted file mode 100644 index f7cd3ced06..0000000000 --- a/test/JsonApiDotNetCoreExampleTests/project.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "testRunner": "xunit", - "dependencies": { - "JsonApiDotNetCoreExample": { - "target": "project" - }, - "Microsoft.NETCore.App": { - "version": "1.1.0", - "type": "platform" - }, - "dotnet-test-xunit": "2.2.0-preview2-build1029", - "xunit": "2.2.0-beta5-build3474", - "Bogus": "8.0.1-beta-1", - "Microsoft.DotNet.InternalAbstractions": "1.0.0", - "Moq": "4.7.1" - }, - - "tools": { - "Microsoft.DotNet.Watcher.Tools": "1.1.0-preview4-final" - }, - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "portable-net45+win8" - ] - } - }, - - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "copyToOutput": { - "include": ["xunit.runner.json", "appsettings.json"] - } - }, - - "runtimeOptions": { - "configProperties": { - "System.GC.Server": true - } - }, - - "tooling": { - "defaultNamespace": "JsonApiDotNetCoreExampleTests" - } -} \ No newline at end of file From fc7ce7d7bc4823ded6fc4f0971b17b6d44e6f98b Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:12:45 -0500 Subject: [PATCH 2/9] fix(build): modify build scripts to target individual projects --- Build.ps1 | 2 +- build.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 4088454799..320b714f6a 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -52,7 +52,7 @@ if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } EnsurePsbuildInstalled -exec { & dotnet restore } +exec { & dotnet restore ./src/JsonApiDotNetCore/JsonApiDotNetCore.csproj } #Invoke-MSBuild diff --git a/build.sh b/build.sh index f06d90fe6b..7fe8f58e62 100755 --- a/build.sh +++ b/build.sh @@ -9,9 +9,11 @@ if [ -d $artifactsFolder ]; then rm -R $artifactsFolder fi -dotnet restore +dotnet restore ./src/JsonApiDotNetCore/JsonApiDotNetCore.csproj +dotnet restore ./src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj +dotnet restore ./test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj -dotnet test ./test/JsonApiDotNetCoreExampleTests -c Release -f netcoreapp1.0 +dotnet test ./test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj revision=${TRAVIS_JOB_ID:=1} revision=$(printf "%04d" $revision) From b515fef88da94d17efce37693e00227f727bfddd Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:13:14 -0500 Subject: [PATCH 3/9] fix(csproj): remove dotnet watcher getting incompatible errors --- src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj | 1 - .../JsonApiDotNetCoreExampleTests.csproj | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj index 6f66a0e517..60e351ab00 100755 --- a/src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj +++ b/src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj @@ -34,7 +34,6 @@ - diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj index 070f0ec529..b79d496c65 100755 --- a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -31,8 +31,4 @@ - - - - From 6a06785e89010c63d4489f733b9b6f2ad333272d Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:13:30 -0500 Subject: [PATCH 4/9] fix(example-tests): remove unneccessary Program.cs file --- test/JsonApiDotNetCoreExampleTests/Program.cs | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 test/JsonApiDotNetCoreExampleTests/Program.cs diff --git a/test/JsonApiDotNetCoreExampleTests/Program.cs b/test/JsonApiDotNetCoreExampleTests/Program.cs deleted file mode 100644 index e6c8639a21..0000000000 --- a/test/JsonApiDotNetCoreExampleTests/Program.cs +++ /dev/null @@ -1,5 +0,0 @@ -public class Program -{ - public static void Main(string[] args) - { } -} \ No newline at end of file From aae37bc84bdde9b132e3679a9ee665b32bdb17d8 Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:15:49 -0500 Subject: [PATCH 5/9] fix(build.ps1): invalid file path reference --- Build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build.ps1 b/Build.ps1 index 320b714f6a..127f658889 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -52,7 +52,7 @@ if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } EnsurePsbuildInstalled -exec { & dotnet restore ./src/JsonApiDotNetCore/JsonApiDotNetCore.csproj } +exec { & dotnet restore .\src\JsonApiDotNetCore\JsonApiDotNetCore.csproj } #Invoke-MSBuild From 0290bd749a45664140dbc43766eea886a5546c2e Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:16:22 -0500 Subject: [PATCH 6/9] chore(csproj): bump project version --- src/JsonApiDotNetCore/JsonApiDotNetCore.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj index 12dda4ea87..4274c0b0f5 100755 --- a/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj +++ b/src/JsonApiDotNetCore/JsonApiDotNetCore.csproj @@ -1,7 +1,7 @@  - 1.0.1 + 1.1.0 netcoreapp1.0 JsonApiDotNetCore JsonApiDotNetCore From 26573a3f5bf107c64f91f3adf9e13dcc6c8ffa95 Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:17:25 -0500 Subject: [PATCH 7/9] fix(travis): fix dotnet sdk version number --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 95dbd9ba3b..dea6a483b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ services: before_script: - psql -c 'create database JsonApiDotNetCoreExample;' -U postgres mono: none -dotnet: 1.0.0-preview2-1-003177 +dotnet: 1.0.1 branches: only: - master From c9bcf3be018b921df383ec67719069aad4c6c8e4 Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:18:55 -0500 Subject: [PATCH 8/9] chore(build.ps1): remove obsolete build scripts --- Build.ps1 | 56 ------------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 127f658889..a330a3c4bd 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -1,61 +1,5 @@ -<# -.SYNOPSIS - You can add this to you build script to ensure that psbuild is available before calling - Invoke-MSBuild. If psbuild is not available locally it will be downloaded automatically. -#> -function EnsurePsbuildInstalled{ - [cmdletbinding()] - param( - [string]$psbuildInstallUri = 'https://raw.githubusercontent.com/ligershark/psbuild/master/src/GetPSBuild.ps1' - ) - process{ - if(-not (Get-Command "Invoke-MsBuild" -errorAction SilentlyContinue)){ - 'Installing psbuild from [{0}]' -f $psbuildInstallUri | Write-Verbose - (new-object Net.WebClient).DownloadString($psbuildInstallUri) | iex - } - else{ - 'psbuild already loaded, skipping download' | Write-Verbose - } - - # make sure it's loaded and throw if not - if(-not (Get-Command "Invoke-MsBuild" -errorAction SilentlyContinue)){ - throw ('Unable to install/load psbuild from [{0}]' -f $psbuildInstallUri) - } - } -} - -# Taken from psake https://github.com/psake/psake - -<# -.SYNOPSIS - This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode - to see if an error occcured. If an error is detected then an exception is thrown. - This function allows you to run command-line programs without having to - explicitly check the $lastexitcode variable. -.EXAMPLE - exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed" -#> -function Exec -{ - [CmdletBinding()] - param( - [Parameter(Position=0,Mandatory=1)][scriptblock]$cmd, - [Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd) - ) - & $cmd - if ($lastexitcode -ne 0) { - throw ("Exec: " + $errorMessage) - } -} - -if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } - -EnsurePsbuildInstalled - exec { & dotnet restore .\src\JsonApiDotNetCore\JsonApiDotNetCore.csproj } -#Invoke-MSBuild - $revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; $revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) From 74594a459c70b7e1f54a978356f5fb69a18e7a96 Mon Sep 17 00:00:00 2001 From: Jared Nance Date: Tue, 14 Mar 2017 08:28:30 -0500 Subject: [PATCH 9/9] fix(build.ps1): remove obsolete exec cmd --- Build.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index a330a3c4bd..d094dd4bf3 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -1,8 +1,6 @@ -exec { & dotnet restore .\src\JsonApiDotNetCore\JsonApiDotNetCore.csproj } - $revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; $revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) -exec { & dotnet build .\src\JsonApiDotNetCore -c Release } - -exec { & dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision } \ No newline at end of file +dotnet restore .\src\JsonApiDotNetCore\JsonApiDotNetCore.csproj +dotnet build .\src\JsonApiDotNetCore -c Release +dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision \ No newline at end of file