From 8fc4ae364ba10625083bd524b1d731d708166463 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Tue, 12 Jun 2018 17:30:35 -0500 Subject: [PATCH 1/9] chore(ci): first pass as targeting different dependency versions --- 2.0.1.props | 34 ++++ 2.1.0.props | 33 ++++ Build.ps1 | 44 +++-- Directory.Build.props | 30 +-- JsonApiDotnetCore.sln | 2 + .../JsonApiDotNetCoreExample.csproj | 7 +- .../20180327120810_initial.Designer.cs | 161 ---------------- .../Migrations/20180327120810_initial.cs | 176 ------------------ .../Migrations/AppDbContextModelSnapshot.cs | 160 ---------------- .../NoEntityFrameworkExample.csproj | 3 + .../OperationsExample.csproj | 7 +- .../ReportsExample/ReportsExample.csproj | 3 + .../JsonApiDotNetCoreExampleTests.csproj | 3 +- .../NoEntityFrameworkTests.csproj | 1 + .../OperationsExampleTests.csproj | 1 + test/UnitTests/UnitTests.csproj | 5 +- 16 files changed, 114 insertions(+), 556 deletions(-) create mode 100644 2.0.1.props create mode 100644 2.1.0.props delete mode 100644 src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.Designer.cs delete mode 100644 src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.cs delete mode 100755 src/Examples/JsonApiDotNetCoreExample/Migrations/AppDbContextModelSnapshot.cs diff --git a/2.0.1.props b/2.0.1.props new file mode 100644 index 0000000000..a4718478cf --- /dev/null +++ b/2.0.1.props @@ -0,0 +1,34 @@ + + + True + + + + netcoreapp2.0 + netstandard2.0 + + 2.0.1 + + 2.0.0 + 2.0.0 + 2.0.0 + + 2.0.1 + 2.0.1 + + 3.2.6 + 2.0.0 + + 4.4.0 + + + + + 15.3.0-preview-20170427-09 + 1.1.2 + 2.3.0-beta3-build3705 + 15.0.3 + 4.7.99 + + + diff --git a/2.1.0.props b/2.1.0.props new file mode 100644 index 0000000000..3f2fb7c4fd --- /dev/null +++ b/2.1.0.props @@ -0,0 +1,33 @@ + + + True + + + + netcoreapp2.0 + netstandard2.0 + + 2.1.0 + + 2.1.0 + 2.1.0 + 2.1.0 + + 2.1.0 + 2.1.0 + + 4.0.0 + 2.1.0 + + 4.5.0 + + + + + 15.7.2 + 2.3.1 + 22.1.2 + 4.8.3 + + + diff --git a/Build.ps1 b/Build.ps1 index bfbd989415..2ebe7cbd01 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -18,25 +18,32 @@ function CheckLastExitCode { } } -$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; -$revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) - -dotnet restore +function Run($exp) { + Invoke-Expression $exp + CheckLastExitCode +} -dotnet test ./test/UnitTests/UnitTests.csproj -CheckLastExitCode +function BuildVerison($version) { + Write-Output "Testing project against ASP.Net Core $version" + $msBuildParams = "/p:TestProjectDependencyVersions=$version /p:NoWarn=NU1605" -dotnet test ./test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj -CheckLastExitCode + Run "dotnet restore $msBuildParams" + Run "dotnet test ./test/UnitTests/UnitTests.csproj $msBuildParams" + Run "dotnet test ./test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj $msBuildParams" + Run "dotnet test ./test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj $msBuildParams" + Run "dotnet test ./test/OperationsExampleTests/OperationsExampleTests.csproj $msBuildParams" +} -dotnet test ./test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj -CheckLastExitCode +$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; +$revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) -dotnet test ./test/OperationsExampleTests/OperationsExampleTests.csproj -CheckLastExitCode +$supportedVersions = @("2.0.1", "2.1.0") +foreach ($version in $supportedVersions) { + BuildVerison $version +} -dotnet build .\src\JsonApiDotNetCore -c Release -CheckLastExitCode +Run "dotnet restore .\src\JsonApiDotNetCore" +Run "dotnet build .\src\JsonApiDotNetCore -c Release" Write-Output "APPVEYOR_REPO_TAG: $env:APPVEYOR_REPO_TAG" @@ -46,18 +53,15 @@ If($env:APPVEYOR_REPO_TAG -eq $true) { IF ([string]::IsNullOrWhitespace($revision)){ Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts" - dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts - CheckLastExitCode + Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts" } Else { Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision" - dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision - CheckLastExitCode + Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision" } } Else { Write-Output "VERSION-SUFFIX: alpha1-$revision" Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision" - dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision - CheckLastExitCode + Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision" } diff --git a/Directory.Build.props b/Directory.Build.props index 346835dd6c..512fc02303 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,31 +1,3 @@ - - - netcoreapp2.0 - netstandard2.0 - - 2.0.1 - - 2.0.0 - 2.0.0 - 2.0.0 - - 2.0.1 - 2.0.1 - - 3.2.6 - 2.0.0 - - 4.4.0 - - - - - 15.3.0-preview-20170427-09 - 1.1.2 - 2.3.0-beta3-build3705 - 15.0.3 - 4.7.99 - - + diff --git a/JsonApiDotnetCore.sln b/JsonApiDotnetCore.sln index 4b7cf5ea47..f23f4219a8 100644 --- a/JsonApiDotnetCore.sln +++ b/JsonApiDotnetCore.sln @@ -16,6 +16,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .gitignore = .gitignore .travis.yml = .travis.yml + 2.0.1.props = 2.0.1.props + 2.1.0.props = 2.1.0.props appveyor.yml = appveyor.yml Build.ps1 = Build.ps1 build.sh = build.sh diff --git a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj index 94e2a404a9..d4e4a96cbd 100755 --- a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj +++ b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj @@ -1,4 +1,7 @@ + + + $(NetCoreAppVersion) true @@ -26,8 +29,4 @@ - - - - diff --git a/src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.Designer.cs b/src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.Designer.cs deleted file mode 100644 index c86425b00c..0000000000 --- a/src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.Designer.cs +++ /dev/null @@ -1,161 +0,0 @@ -// -using JsonApiDotNetCoreExample.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage; -using Microsoft.EntityFrameworkCore.Storage.Internal; -using System; - -namespace JsonApiDotNetCoreExample.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20180327120810_initial")] - partial class initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) - .HasAnnotation("ProductVersion", "2.0.1-rtm-125"); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Article", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AuthorId"); - - b.Property("Name"); - - b.HasKey("Id"); - - b.HasIndex("AuthorId"); - - b.ToTable("Articles"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Author", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("Id"); - - b.ToTable("Authors"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.CamelCasedModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CompoundAttr"); - - b.HasKey("Id"); - - b.ToTable("CamelCasedModels"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Person", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("FirstName"); - - b.Property("LastName"); - - b.HasKey("Id"); - - b.ToTable("People"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AchievedDate"); - - b.Property("AssigneeId"); - - b.Property("CollectionId"); - - b.Property("CreatedDate") - .ValueGeneratedOnAdd() - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description"); - - b.Property("GuidProperty"); - - b.Property("Ordinal"); - - b.Property("OwnerId"); - - b.HasKey("Id"); - - b.HasIndex("AssigneeId"); - - b.HasIndex("CollectionId"); - - b.HasIndex("OwnerId"); - - b.ToTable("TodoItems"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItemCollection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.Property("OwnerId"); - - b.HasKey("Id"); - - b.HasIndex("OwnerId"); - - b.ToTable("TodoItemCollections"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Article", b => - { - b.HasOne("JsonApiDotNetCoreExample.Models.Author", "Author") - .WithMany("Articles") - .HasForeignKey("AuthorId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItem", b => - { - b.HasOne("JsonApiDotNetCoreExample.Models.Person", "Assignee") - .WithMany("AssignedTodoItems") - .HasForeignKey("AssigneeId"); - - b.HasOne("JsonApiDotNetCoreExample.Models.TodoItemCollection", "Collection") - .WithMany("TodoItems") - .HasForeignKey("CollectionId"); - - b.HasOne("JsonApiDotNetCoreExample.Models.Person", "Owner") - .WithMany("TodoItems") - .HasForeignKey("OwnerId"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItemCollection", b => - { - b.HasOne("JsonApiDotNetCoreExample.Models.Person", "Owner") - .WithMany("TodoItemCollections") - .HasForeignKey("OwnerId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.cs b/src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.cs deleted file mode 100644 index ba19b62ef6..0000000000 --- a/src/Examples/JsonApiDotNetCoreExample/Migrations/20180327120810_initial.cs +++ /dev/null @@ -1,176 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using System; -using System.Collections.Generic; - -namespace JsonApiDotNetCoreExample.Migrations -{ - public partial class initial : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Authors", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), - Name = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Authors", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CamelCasedModels", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), - CompoundAttr = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_CamelCasedModels", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "People", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), - FirstName = table.Column(nullable: true), - LastName = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_People", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Articles", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), - AuthorId = table.Column(nullable: false), - Name = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Articles", x => x.Id); - table.ForeignKey( - name: "FK_Articles_Authors_AuthorId", - column: x => x.AuthorId, - principalTable: "Authors", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "TodoItemCollections", - columns: table => new - { - Id = table.Column(nullable: false), - Name = table.Column(nullable: true), - OwnerId = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_TodoItemCollections", x => x.Id); - table.ForeignKey( - name: "FK_TodoItemCollections_People_OwnerId", - column: x => x.OwnerId, - principalTable: "People", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "TodoItems", - columns: table => new - { - Id = table.Column(nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn), - AchievedDate = table.Column(nullable: true), - AssigneeId = table.Column(nullable: true), - CollectionId = table.Column(nullable: true), - CreatedDate = table.Column(nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - Description = table.Column(nullable: true), - GuidProperty = table.Column(nullable: false), - Ordinal = table.Column(nullable: false), - OwnerId = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_TodoItems", x => x.Id); - table.ForeignKey( - name: "FK_TodoItems_People_AssigneeId", - column: x => x.AssigneeId, - principalTable: "People", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_TodoItems_TodoItemCollections_CollectionId", - column: x => x.CollectionId, - principalTable: "TodoItemCollections", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_TodoItems_People_OwnerId", - column: x => x.OwnerId, - principalTable: "People", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateIndex( - name: "IX_Articles_AuthorId", - table: "Articles", - column: "AuthorId"); - - migrationBuilder.CreateIndex( - name: "IX_TodoItemCollections_OwnerId", - table: "TodoItemCollections", - column: "OwnerId"); - - migrationBuilder.CreateIndex( - name: "IX_TodoItems_AssigneeId", - table: "TodoItems", - column: "AssigneeId"); - - migrationBuilder.CreateIndex( - name: "IX_TodoItems_CollectionId", - table: "TodoItems", - column: "CollectionId"); - - migrationBuilder.CreateIndex( - name: "IX_TodoItems_OwnerId", - table: "TodoItems", - column: "OwnerId"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Articles"); - - migrationBuilder.DropTable( - name: "CamelCasedModels"); - - migrationBuilder.DropTable( - name: "TodoItems"); - - migrationBuilder.DropTable( - name: "Authors"); - - migrationBuilder.DropTable( - name: "TodoItemCollections"); - - migrationBuilder.DropTable( - name: "People"); - } - } -} diff --git a/src/Examples/JsonApiDotNetCoreExample/Migrations/AppDbContextModelSnapshot.cs b/src/Examples/JsonApiDotNetCoreExample/Migrations/AppDbContextModelSnapshot.cs deleted file mode 100755 index c0794103fe..0000000000 --- a/src/Examples/JsonApiDotNetCoreExample/Migrations/AppDbContextModelSnapshot.cs +++ /dev/null @@ -1,160 +0,0 @@ -// -using JsonApiDotNetCoreExample.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage; -using Microsoft.EntityFrameworkCore.Storage.Internal; -using System; - -namespace JsonApiDotNetCoreExample.Migrations -{ - [DbContext(typeof(AppDbContext))] - partial class AppDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) - .HasAnnotation("ProductVersion", "2.0.1-rtm-125"); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Article", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AuthorId"); - - b.Property("Name"); - - b.HasKey("Id"); - - b.HasIndex("AuthorId"); - - b.ToTable("Articles"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Author", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.HasKey("Id"); - - b.ToTable("Authors"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.CamelCasedModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("CompoundAttr"); - - b.HasKey("Id"); - - b.ToTable("CamelCasedModels"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Person", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("FirstName"); - - b.Property("LastName"); - - b.HasKey("Id"); - - b.ToTable("People"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("AchievedDate"); - - b.Property("AssigneeId"); - - b.Property("CollectionId"); - - b.Property("CreatedDate") - .ValueGeneratedOnAdd() - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description"); - - b.Property("GuidProperty"); - - b.Property("Ordinal"); - - b.Property("OwnerId"); - - b.HasKey("Id"); - - b.HasIndex("AssigneeId"); - - b.HasIndex("CollectionId"); - - b.HasIndex("OwnerId"); - - b.ToTable("TodoItems"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItemCollection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("Name"); - - b.Property("OwnerId"); - - b.HasKey("Id"); - - b.HasIndex("OwnerId"); - - b.ToTable("TodoItemCollections"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.Article", b => - { - b.HasOne("JsonApiDotNetCoreExample.Models.Author", "Author") - .WithMany("Articles") - .HasForeignKey("AuthorId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItem", b => - { - b.HasOne("JsonApiDotNetCoreExample.Models.Person", "Assignee") - .WithMany("AssignedTodoItems") - .HasForeignKey("AssigneeId"); - - b.HasOne("JsonApiDotNetCoreExample.Models.TodoItemCollection", "Collection") - .WithMany("TodoItems") - .HasForeignKey("CollectionId"); - - b.HasOne("JsonApiDotNetCoreExample.Models.Person", "Owner") - .WithMany("TodoItems") - .HasForeignKey("OwnerId"); - }); - - modelBuilder.Entity("JsonApiDotNetCoreExample.Models.TodoItemCollection", b => - { - b.HasOne("JsonApiDotNetCoreExample.Models.Person", "Owner") - .WithMany("TodoItemCollections") - .HasForeignKey("OwnerId") - .OnDelete(DeleteBehavior.Cascade); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj index eed5f1b09e..e6f615346f 100755 --- a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj +++ b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj @@ -1,4 +1,7 @@  + + + $(NetCoreAppVersion) diff --git a/src/Examples/OperationsExample/OperationsExample.csproj b/src/Examples/OperationsExample/OperationsExample.csproj index 69ad5653ce..2f79a3aad0 100644 --- a/src/Examples/OperationsExample/OperationsExample.csproj +++ b/src/Examples/OperationsExample/OperationsExample.csproj @@ -1,4 +1,7 @@ + + + $(NetCoreAppVersion) true @@ -27,8 +30,4 @@ - - - - diff --git a/src/Examples/ReportsExample/ReportsExample.csproj b/src/Examples/ReportsExample/ReportsExample.csproj index bd4b402071..7fac808950 100644 --- a/src/Examples/ReportsExample/ReportsExample.csproj +++ b/src/Examples/ReportsExample/ReportsExample.csproj @@ -1,4 +1,7 @@ + + + $(NetCoreAppVersion) diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj index b1df354bf7..8b84a1a646 100755 --- a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -1,4 +1,5 @@  + $(NetCoreAppVersion) false @@ -25,7 +26,7 @@ - + diff --git a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj index f1d4044e0b..afbfaf53d0 100644 --- a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj +++ b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj @@ -1,4 +1,5 @@  + $(NetCoreAppVersion) true diff --git a/test/OperationsExampleTests/OperationsExampleTests.csproj b/test/OperationsExampleTests/OperationsExampleTests.csproj index 13f68faf5a..2c5420ccd1 100644 --- a/test/OperationsExampleTests/OperationsExampleTests.csproj +++ b/test/OperationsExampleTests/OperationsExampleTests.csproj @@ -1,4 +1,5 @@ + $(NetCoreAppVersion) false diff --git a/test/UnitTests/UnitTests.csproj b/test/UnitTests/UnitTests.csproj index a6ed346e7d..fdb2fbd461 100644 --- a/test/UnitTests/UnitTests.csproj +++ b/test/UnitTests/UnitTests.csproj @@ -1,4 +1,7 @@ + + + $(NetCoreAppVersion) false @@ -8,7 +11,7 @@ - + From 102f6f28d5aad6122c1a463351192ae271064625 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 14:32:05 -0500 Subject: [PATCH 2/9] handle internal changes across multiple versions of EF Core --- .../Extensions/IQueryableExtensions.cs | 48 ++++++++++++++++++- .../Helpers/Extensions/StringExtensions.cs | 5 +- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs index c774478227..b625c6dcf0 100644 --- a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs +++ b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Linq; using System.Reflection; using Microsoft.EntityFrameworkCore.Internal; @@ -11,6 +12,19 @@ namespace JsonApiDotNetCoreExampleTests.Helpers.Extensions { public static class IQueryableExtensions + { + public static string ToSql(this IQueryable query) where TEntity : class + { + var efCoreVersion = FileVersionInfo.GetVersionInfo(typeof(QueryCompiler).Assembly.Location); + var majorMinor = $"{efCoreVersion.ProductMajorPart}.{efCoreVersion.ProductMinorPart}"; + + return majorMinor == "2.1" + ? QueryGenerator_2_1_0.ToSql(query) + : QueryGenerator_2_0_0.ToSql(query); + } + } + + public static class QueryGenerator_2_0_0 { private static readonly TypeInfo QueryCompilerTypeInfo = typeof(QueryCompiler).GetTypeInfo(); @@ -25,7 +39,7 @@ public static class IQueryableExtensions private static readonly PropertyInfo DatabaseDependenciesField = typeof(Database).GetTypeInfo().DeclaredProperties.Single(x => x.Name == "Dependencies"); - public static string ToSql(this IQueryable query) where TEntity : class + public static string ToSql(IQueryable query) where TEntity : class { if (!(query is EntityQueryable) && !(query is InternalDbSet)) { @@ -46,4 +60,34 @@ public static string ToSql(this IQueryable query) where TEntit return sql; } } -} \ No newline at end of file + + public static class QueryGenerator_2_1_0 + { + private static readonly FieldInfo QueryCompilerField = typeof(EntityQueryProvider).GetTypeInfo().DeclaredFields.Single(x => x.Name == "_queryCompiler"); + + private static readonly TypeInfo QueryCompilerTypeInfo = typeof(QueryCompiler).GetTypeInfo(); + + private static readonly FieldInfo QueryModelGeneratorField = QueryCompilerTypeInfo.DeclaredFields.Single(x => x.Name == "_queryModelGenerator"); + + private static readonly FieldInfo DatabaseField = QueryCompilerTypeInfo.DeclaredFields.Single(x => x.Name == "_database"); + + private static readonly PropertyInfo DependenciesProperty = typeof(Database).GetTypeInfo().DeclaredProperties.Single(x => x.Name == "Dependencies"); + + public static string ToSql(IQueryable queryable) + where TEntity : class + { + if (!(queryable is EntityQueryable) && !(queryable is InternalDbSet)) + throw new ArgumentException(); + + var queryCompiler = (IQueryCompiler)QueryCompilerField.GetValue(queryable.Provider); + var queryModelGenerator = (IQueryModelGenerator)QueryModelGeneratorField.GetValue(queryCompiler); + var queryModel = queryModelGenerator.ParseQuery(queryable.Expression); + var database = DatabaseField.GetValue(queryCompiler); + var queryCompilationContextFactory = ((DatabaseDependencies)DependenciesProperty.GetValue(database)).QueryCompilationContextFactory; + var queryCompilationContext = queryCompilationContextFactory.Create(false); + var modelVisitor = (RelationalQueryModelVisitor)queryCompilationContext.CreateQueryModelVisitor(); + modelVisitor.CreateQueryExecutor(queryModel); + return modelVisitor.Queries.Join(Environment.NewLine + Environment.NewLine); + } + } +} diff --git a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/StringExtensions.cs b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/StringExtensions.cs index 19c7491d2a..75cafef941 100644 --- a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/StringExtensions.cs +++ b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/StringExtensions.cs @@ -9,7 +9,8 @@ public static string Normalize(this string input) { return Regex.Replace(input, @"\s+", string.Empty) .ToUpper() - .Replace('"', '\''); + .Replace("\"", string.Empty) + .Replace("'", string.Empty); } } -} \ No newline at end of file +} From a4a6efefa523bb7f35cc2467d65f4856851a0379 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 14:46:33 -0500 Subject: [PATCH 3/9] improve build command logging --- Build.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 2ebe7cbd01..0e32f27178 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -10,22 +10,21 @@ function Get-Version-Suffix-From-Tag } function CheckLastExitCode { - param ([int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript=$null) + param ([string]$Command, [int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript=$null) if ($SuccessCodes -notcontains $LastExitCode) { - $msg = "EXE RETURNED EXIT CODE $LastExitCode" - throw $msg + throw "$Command exited with $LastExitCode" } } function Run($exp) { Invoke-Expression $exp - CheckLastExitCode + CheckLastExitCode $exp } function BuildVerison($version) { Write-Output "Testing project against ASP.Net Core $version" - $msBuildParams = "/p:TestProjectDependencyVersions=$version /p:NoWarn=NU1605" + $msBuildParams = "/p:TestProjectDependencyVersions=$version /p:NoWarn=NU1605 /v:q" Run "dotnet restore $msBuildParams" Run "dotnet test ./test/UnitTests/UnitTests.csproj $msBuildParams" From ce0a384ddf85ba91404c3f32e461bb6ab9815ce7 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 15:39:48 -0500 Subject: [PATCH 4/9] use pre-processor dir --- 2.0.1.props | 1 + 2.1.0.props | 1 + Build.ps1 | 2 +- .../Helpers/Extensions/IQueryableExtensions.cs | 13 +++++++------ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/2.0.1.props b/2.0.1.props index a4718478cf..789f400edd 100644 --- a/2.0.1.props +++ b/2.0.1.props @@ -1,6 +1,7 @@ True + DEPS_2_0_1 diff --git a/2.1.0.props b/2.1.0.props index 3f2fb7c4fd..d77b3cd701 100644 --- a/2.1.0.props +++ b/2.1.0.props @@ -1,6 +1,7 @@ True + DEPS_2_1_0 diff --git a/Build.ps1 b/Build.ps1 index 0e32f27178..6a49150fab 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -24,7 +24,7 @@ function Run($exp) { function BuildVerison($version) { Write-Output "Testing project against ASP.Net Core $version" - $msBuildParams = "/p:TestProjectDependencyVersions=$version /p:NoWarn=NU1605 /v:q" + $msBuildParams = "/p:TestProjectDependencyVersions=$version /p:NoWarn=NU1605 /v:minimal" Run "dotnet restore $msBuildParams" Run "dotnet test ./test/UnitTests/UnitTests.csproj $msBuildParams" diff --git a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs index b625c6dcf0..e5f2f7f133 100644 --- a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs +++ b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs @@ -15,12 +15,11 @@ public static class IQueryableExtensions { public static string ToSql(this IQueryable query) where TEntity : class { - var efCoreVersion = FileVersionInfo.GetVersionInfo(typeof(QueryCompiler).Assembly.Location); - var majorMinor = $"{efCoreVersion.ProductMajorPart}.{efCoreVersion.ProductMinorPart}"; - - return majorMinor == "2.1" - ? QueryGenerator_2_1_0.ToSql(query) - : QueryGenerator_2_0_0.ToSql(query); +#if DEPS_2_1_0 + return QueryGenerator_2_1_0.ToSql(query); +#else + return QueryGenerator_2_0_0.ToSql(query); +#endif } } @@ -61,6 +60,7 @@ public static string ToSql(IQueryable query) where TEntity : c } } +#if DEPS_2_1_0 public static class QueryGenerator_2_1_0 { private static readonly FieldInfo QueryCompilerField = typeof(EntityQueryProvider).GetTypeInfo().DeclaredFields.Single(x => x.Name == "_queryCompiler"); @@ -90,4 +90,5 @@ public static string ToSql(IQueryable queryable) return modelVisitor.Queries.Join(Environment.NewLine + Environment.NewLine); } } +#endif } From 609c0a5fafa36a95653f99b850635090ab053269 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 16:27:09 -0500 Subject: [PATCH 5/9] conditional import in Directory.Build.props --- Directory.Build.props | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 512fc02303..609d749100 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,3 +1,6 @@ - + + + + From 101fe8540ebbb22b7b63400d0dd2811a271c4dca Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 20:16:38 -0500 Subject: [PATCH 6/9] do not import version overrides into main project --- 2.0.1.props | 5 -- 2.1.0.props | 1 - Build.ps1 | 81 ++++++++++--------- Directory.Build.props | 6 +- .../Extensions/IQueryableExtensions.cs | 4 + .../JsonApiDotNetCoreExampleTests.csproj | 2 +- 6 files changed, 52 insertions(+), 47 deletions(-) diff --git a/2.0.1.props b/2.0.1.props index 789f400edd..1cf508ad78 100644 --- a/2.0.1.props +++ b/2.0.1.props @@ -1,9 +1,4 @@ - - True - DEPS_2_0_1 - - netcoreapp2.0 netstandard2.0 diff --git a/2.1.0.props b/2.1.0.props index d77b3cd701..88973044e5 100644 --- a/2.1.0.props +++ b/2.1.0.props @@ -1,6 +1,5 @@ - True DEPS_2_1_0 diff --git a/Build.ps1 b/Build.ps1 index 6a49150fab..cf7a3960b8 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -1,16 +1,15 @@ # Gets the version suffix from the repo tag # example: v1.0.0-preview1-final => preview1-final -function Get-Version-Suffix-From-Tag -{ - $tag=$env:APPVEYOR_REPO_TAG_NAME - $split=$tag -split "-" - $suffix=$split[1..2] - $final=$suffix -join "-" - return $final +function Get-Version-Suffix-From-Tag { + $tag = $env:APPVEYOR_REPO_TAG_NAME + $split = $tag -split "-" + $suffix = $split[1..2] + $final = $suffix -join "-" + return $final } function CheckLastExitCode { - param ([string]$Command, [int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript=$null) + param ([string]$Command, [int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript = $null) if ($SuccessCodes -notcontains $LastExitCode) { throw "$Command exited with $LastExitCode" @@ -22,45 +21,55 @@ function Run($exp) { CheckLastExitCode $exp } -function BuildVerison($version) { +function BuildVersion($version) { Write-Output "Testing project against ASP.Net Core $version" $msBuildParams = "/p:TestProjectDependencyVersions=$version /p:NoWarn=NU1605 /v:minimal" Run "dotnet restore $msBuildParams" - Run "dotnet test ./test/UnitTests/UnitTests.csproj $msBuildParams" - Run "dotnet test ./test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj $msBuildParams" - Run "dotnet test ./test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj $msBuildParams" - Run "dotnet test ./test/OperationsExampleTests/OperationsExampleTests.csproj $msBuildParams" + Run "dotnet msbuild $msBuildParams" + Run "dotnet test ./test/UnitTests/UnitTests.csproj --no-build $msBuildParams" + Run "dotnet test ./test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj --no-build $msBuildParams" + Run "dotnet test ./test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj --no-build $msBuildParams" + Run "dotnet test ./test/OperationsExampleTests/OperationsExampleTests.csproj --no-build $msBuildParams" } -$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; -$revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) - -$supportedVersions = @("2.0.1", "2.1.0") -foreach ($version in $supportedVersions) { - BuildVerison $version +function Test() { + $supportedVersions = @("2.0.1", "2.1.0") + foreach ($version in $supportedVersions) { + BuildVersion $version + } } -Run "dotnet restore .\src\JsonApiDotNetCore" -Run "dotnet build .\src\JsonApiDotNetCore -c Release" +function Build() { + Run "dotnet restore .\src\JsonApiDotNetCore" + Run "dotnet build .\src\JsonApiDotNetCore -c Release" +} -Write-Output "APPVEYOR_REPO_TAG: $env:APPVEYOR_REPO_TAG" +function Pack() { + Write-Output "APPVEYOR_REPO_TAG: $env:APPVEYOR_REPO_TAG" -If($env:APPVEYOR_REPO_TAG -eq $true) { - $revision = Get-Version-Suffix-From-Tag - Write-Output "VERSION-SUFFIX: $revision" + $revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; + $revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) + If ($env:APPVEYOR_REPO_TAG -eq $true) { + $revision = Get-Version-Suffix-From-Tag + Write-Output "VERSION-SUFFIX: $revision" - IF ([string]::IsNullOrWhitespace($revision)){ - Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts" - Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts" + IF ([string]::IsNullOrWhitespace($revision)) { + Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts" + Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts" + } + Else { + Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision" + Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision" + } } - Else { - Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision" - Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision" + Else { + Write-Output "VERSION-SUFFIX: alpha1-$revision" + Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision" + Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision" } } -Else { - Write-Output "VERSION-SUFFIX: alpha1-$revision" - Write-Output "RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision" - Run "dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision" -} + +Test +Build +Pack diff --git a/Directory.Build.props b/Directory.Build.props index 609d749100..af6e0988fc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,4 @@ - - - - + + diff --git a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs index e5f2f7f133..e1a3f4a57c 100644 --- a/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs +++ b/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs @@ -18,6 +18,10 @@ public static string ToSql(this IQueryable query) where TEntit #if DEPS_2_1_0 return QueryGenerator_2_1_0.ToSql(query); #else + // this has to be the default value, + // constants will not be defined for the primary package build + // the constants only exist to simulate scenarios where consumers specify + // different version for framework dependencies return QueryGenerator_2_0_0.ToSql(query); #endif } diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj index 8b84a1a646..4e64f4d897 100755 --- a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -14,7 +14,7 @@ - + From 5665db7afdc67770aeecd3e1e0b23993b33b74ee Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 20:29:15 -0500 Subject: [PATCH 7/9] move all dep imports into test projects --- .../JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj | 2 -- .../NoEntityFrameworkExample/NoEntityFrameworkExample.csproj | 2 -- src/Examples/OperationsExample/OperationsExample.csproj | 2 -- src/Examples/ReportsExample/ReportsExample.csproj | 2 -- .../JsonApiDotNetCoreExampleTests.csproj | 2 ++ test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj | 2 ++ test/OperationsExampleTests/OperationsExampleTests.csproj | 2 ++ 7 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj index d4e4a96cbd..56b6aff9c4 100755 --- a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj +++ b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj @@ -1,7 +1,5 @@ - - $(NetCoreAppVersion) true diff --git a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj index e6f615346f..afaf0e7cff 100755 --- a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj +++ b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj @@ -1,7 +1,5 @@  - - $(NetCoreAppVersion) diff --git a/src/Examples/OperationsExample/OperationsExample.csproj b/src/Examples/OperationsExample/OperationsExample.csproj index 2f79a3aad0..8ccef61dad 100644 --- a/src/Examples/OperationsExample/OperationsExample.csproj +++ b/src/Examples/OperationsExample/OperationsExample.csproj @@ -1,7 +1,5 @@ - - $(NetCoreAppVersion) true diff --git a/src/Examples/ReportsExample/ReportsExample.csproj b/src/Examples/ReportsExample/ReportsExample.csproj index 7fac808950..118fe3b85a 100644 --- a/src/Examples/ReportsExample/ReportsExample.csproj +++ b/src/Examples/ReportsExample/ReportsExample.csproj @@ -1,7 +1,5 @@ - - $(NetCoreAppVersion) diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj index 4e64f4d897..e4e9b330c0 100755 --- a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -1,5 +1,7 @@  + + $(NetCoreAppVersion) false diff --git a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj index afbfaf53d0..92bc112126 100644 --- a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj +++ b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj @@ -1,5 +1,7 @@  + + $(NetCoreAppVersion) true diff --git a/test/OperationsExampleTests/OperationsExampleTests.csproj b/test/OperationsExampleTests/OperationsExampleTests.csproj index 2c5420ccd1..9eb634c2bb 100644 --- a/test/OperationsExampleTests/OperationsExampleTests.csproj +++ b/test/OperationsExampleTests/OperationsExampleTests.csproj @@ -1,5 +1,7 @@ + + $(NetCoreAppVersion) false From c76d2fe86a6ca89e254528577533c3dd02739496 Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 20:34:05 -0500 Subject: [PATCH 8/9] fix import paths --- .../JsonApiDotNetCoreExampleTests.csproj | 2 +- test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj | 2 +- test/OperationsExampleTests/OperationsExampleTests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj index 483f404c37..7cc366bd0c 100755 --- a/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj +++ b/test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj @@ -1,6 +1,6 @@  - + $(NetCoreAppVersion) diff --git a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj index 661abaed23..017eaf68f9 100644 --- a/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj +++ b/test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj @@ -1,6 +1,6 @@  - + $(NetCoreAppVersion) diff --git a/test/OperationsExampleTests/OperationsExampleTests.csproj b/test/OperationsExampleTests/OperationsExampleTests.csproj index 08db228202..d48ff8e639 100644 --- a/test/OperationsExampleTests/OperationsExampleTests.csproj +++ b/test/OperationsExampleTests/OperationsExampleTests.csproj @@ -1,6 +1,6 @@ - + $(NetCoreAppVersion) From a2ffc85dba934f6824c9316baa9326ae0bba9b3d Mon Sep 17 00:00:00 2001 From: jaredcnance Date: Wed, 13 Jun 2018 21:10:38 -0500 Subject: [PATCH 9/9] try including in example projects as well --- .../JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj | 2 ++ .../NoEntityFrameworkExample/NoEntityFrameworkExample.csproj | 2 ++ src/Examples/OperationsExample/OperationsExample.csproj | 2 ++ src/Examples/ReportsExample/ReportsExample.csproj | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj index 3a0ac4b106..2c35af61e1 100755 --- a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj +++ b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj @@ -1,5 +1,7 @@ + + $(NetCoreAppVersion) true diff --git a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj index afaf0e7cff..e6f615346f 100755 --- a/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj +++ b/src/Examples/NoEntityFrameworkExample/NoEntityFrameworkExample.csproj @@ -1,5 +1,7 @@  + + $(NetCoreAppVersion) diff --git a/src/Examples/OperationsExample/OperationsExample.csproj b/src/Examples/OperationsExample/OperationsExample.csproj index cd505761c9..15c0a0a0f9 100644 --- a/src/Examples/OperationsExample/OperationsExample.csproj +++ b/src/Examples/OperationsExample/OperationsExample.csproj @@ -1,5 +1,7 @@ + + $(NetCoreAppVersion) true diff --git a/src/Examples/ReportsExample/ReportsExample.csproj b/src/Examples/ReportsExample/ReportsExample.csproj index 118fe3b85a..7fac808950 100644 --- a/src/Examples/ReportsExample/ReportsExample.csproj +++ b/src/Examples/ReportsExample/ReportsExample.csproj @@ -1,5 +1,7 @@ + + $(NetCoreAppVersion)