From 3c4d1afaed021a2dc3981f619e23efa5f843e564 Mon Sep 17 00:00:00 2001 From: Vincent He Date: Mon, 5 Sep 2016 13:15:24 +0800 Subject: [PATCH] Make build run test by default and use VS2015 build by default --- RESTier.msbuild | 2 +- build.cmd | 9 +++--- .../Microsoft.Restier.Core.csproj | 5 ---- ...t.Restier.Providers.EntityFramework.csproj | 1 - .../Microsoft.Restier.Publishers.OData.csproj | 9 ------ .../Microsoft.Restier.Core.Tests.csproj | 4 --- ...ier.Providers.EntityFramework.Tests.csproj | 8 ----- ...osoft.Restier.Publishers.OData.Test.csproj | 4 --- .../Microsoft.Restier.TestCommon.csproj | 1 - ...Data.Service.Sample.Northwind.Tests.csproj | 8 ----- ...soft.OData.Service.Sample.Northwind.csproj | 8 ----- .../TemporalTests.cs | 6 ++-- .../App_Start/WebApiConfig.cs | 2 +- ...rosoft.OData.Service.Sample.Trippin.csproj | 4 --- ...Data.Service.Sample.TrippinInMemory.csproj | 1 - ...icrosoft.Restier.Providers.InMemory.csproj | 30 ++++--------------- .../app.config | 15 ++++++++++ .../packages.config | 4 +-- tools/RESTier.tasks.targets | 2 +- 19 files changed, 32 insertions(+), 91 deletions(-) create mode 100644 test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/app.config diff --git a/RESTier.msbuild b/RESTier.msbuild index 4b239d5b..cb6e3651 100644 --- a/RESTier.msbuild +++ b/RESTier.msbuild @@ -87,7 +87,7 @@ Properties="Configuration=$(Configuration);CodeAnalysis=$(CodeAnalysis);StyleCopEnabled=$(StyleCopEnabled);VisualStudioVersion=$(VisualStudioVersion);OutputPath=$(OutputPath)Product;EnableProjectCop=false" /> - + diff --git a/build.cmd b/build.cmd index 732903d3..6d4d40bf 100644 --- a/build.cmd +++ b/build.cmd @@ -7,14 +7,13 @@ mkdir bin :Build -REM Find the most recent 32bit MSBuild.exe on the system. Require v12.0 (installed with VS2013) or later since .NET 4.0 +REM Find the most recent 32bit MSBuild.exe on the system. Require v14.0 (installed with VS2015) or later since .NET 4.5 REM is not supported. Also handle x86 operating systems, where %ProgramFiles(x86)% is not defined. Always quote the REM %MSBuild% value when setting the variable and never quote %MSBuild% references. -set MSBuild="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" -if not exist %MSBuild% @set MSBuild="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe" -REM Check for VS2015 -if not exist %MSBuild% @set MSBuild="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" +set MSBuild="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" if not exist %MSBuild% @set MSBuild="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe" +if not exist %MSBuild% @set MSBuild="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" +if not exist %MSBuild% @set MSBuild="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe" if "%1" == "" goto BuildDefaults diff --git a/src/Microsoft.Restier.Core/Microsoft.Restier.Core.csproj b/src/Microsoft.Restier.Core/Microsoft.Restier.Core.csproj index b42490ec..a555ea17 100644 --- a/src/Microsoft.Restier.Core/Microsoft.Restier.Core.csproj +++ b/src/Microsoft.Restier.Core/Microsoft.Restier.Core.csproj @@ -13,7 +13,6 @@ - ..\..\packages\Microsoft.Extensions.DependencyInjection.1.0.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll True @@ -30,10 +29,6 @@ ..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll True - - ..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - diff --git a/src/Microsoft.Restier.Providers.EntityFramework/Microsoft.Restier.Providers.EntityFramework.csproj b/src/Microsoft.Restier.Providers.EntityFramework/Microsoft.Restier.Providers.EntityFramework.csproj index f026b542..07665bea 100644 --- a/src/Microsoft.Restier.Providers.EntityFramework/Microsoft.Restier.Providers.EntityFramework.csproj +++ b/src/Microsoft.Restier.Providers.EntityFramework/Microsoft.Restier.Providers.EntityFramework.csproj @@ -20,7 +20,6 @@ ..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll True - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll True diff --git a/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj b/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj index 71594751..40667520 100644 --- a/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj +++ b/src/Microsoft.Restier.Publishers.OData/Microsoft.Restier.Publishers.OData.csproj @@ -12,7 +12,6 @@ ..\Strict.ruleset - ..\..\packages\Microsoft.Extensions.DependencyInjection.1.0.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll True @@ -29,14 +28,6 @@ ..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll True - - ..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - - - ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - True - diff --git a/test/Microsoft.Restier.Core.Tests/Microsoft.Restier.Core.Tests.csproj b/test/Microsoft.Restier.Core.Tests/Microsoft.Restier.Core.Tests.csproj index 49c62387..0133dbab 100644 --- a/test/Microsoft.Restier.Core.Tests/Microsoft.Restier.Core.Tests.csproj +++ b/test/Microsoft.Restier.Core.Tests/Microsoft.Restier.Core.Tests.csproj @@ -53,10 +53,6 @@ ..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll True - - ..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - ..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll diff --git a/test/Microsoft.Restier.Providers.EntityFramework.Tests/Microsoft.Restier.Providers.EntityFramework.Tests.csproj b/test/Microsoft.Restier.Providers.EntityFramework.Tests/Microsoft.Restier.Providers.EntityFramework.Tests.csproj index 911bfa27..9ef2daad 100644 --- a/test/Microsoft.Restier.Providers.EntityFramework.Tests/Microsoft.Restier.Providers.EntityFramework.Tests.csproj +++ b/test/Microsoft.Restier.Providers.EntityFramework.Tests/Microsoft.Restier.Providers.EntityFramework.Tests.csproj @@ -59,14 +59,6 @@ ..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll True - - ..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - - - ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - True - diff --git a/test/Microsoft.Restier.Publishers.OData.Test/Microsoft.Restier.Publishers.OData.Test.csproj b/test/Microsoft.Restier.Publishers.OData.Test/Microsoft.Restier.Publishers.OData.Test.csproj index d0f4fc26..109ed6e0 100644 --- a/test/Microsoft.Restier.Publishers.OData.Test/Microsoft.Restier.Publishers.OData.Test.csproj +++ b/test/Microsoft.Restier.Publishers.OData.Test/Microsoft.Restier.Publishers.OData.Test.csproj @@ -59,10 +59,6 @@ ..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll True - - ..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True diff --git a/test/Microsoft.Restier.TestCommon/Microsoft.Restier.TestCommon.csproj b/test/Microsoft.Restier.TestCommon/Microsoft.Restier.TestCommon.csproj index de72a543..56e0f03d 100644 --- a/test/Microsoft.Restier.TestCommon/Microsoft.Restier.TestCommon.csproj +++ b/test/Microsoft.Restier.TestCommon/Microsoft.Restier.TestCommon.csproj @@ -33,7 +33,6 @@ - diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.Tests/Microsoft.OData.Service.Sample.Northwind.Tests.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.Tests/Microsoft.OData.Service.Sample.Northwind.Tests.csproj index 956caf90..36d92e15 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.Tests/Microsoft.OData.Service.Sample.Northwind.Tests.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.Tests/Microsoft.OData.Service.Sample.Northwind.Tests.csproj @@ -57,14 +57,6 @@ ..\..\..\packages\Microsoft.OData.Core.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Core.dll True - - ..\..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll - True - - - ..\..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind/Microsoft.OData.Service.Sample.Northwind.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind/Microsoft.OData.Service.Sample.Northwind.csproj index b31a72f5..2121efab 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind/Microsoft.OData.Service.Sample.Northwind.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind/Microsoft.OData.Service.Sample.Northwind.csproj @@ -65,14 +65,6 @@ ..\..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll True - - ..\..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - - - ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - True - diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TemporalTests.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TemporalTests.cs index f9e3c673..a4f24601 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TemporalTests.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TemporalTests.cs @@ -465,7 +465,7 @@ public void UQDateTimeOffsetProperty() public void QueryOptionsOnDateTimeOffsetProperty() { this.TestClientContext.MergeOption = MergeOption.OverwriteChanges; - var birthDateTime = new DateTimeOffset(2000, 1, 1, 12, 34, 56, TimeSpan.Zero); + var birthDateTime = new DateTimeOffset(2000, 1, 1, 15, 34, 56, TimeSpan.Zero); // Post an entity Person person = new Person @@ -483,11 +483,11 @@ public void QueryOptionsOnDateTimeOffsetProperty() // Filter this entity var persons = this.TestClientContext.People - .AddQueryOption("$filter", "BirthDateTime eq 2000-01-01T12:34:56Z") + .AddQueryOption("$filter", "BirthDateTime eq 2000-01-01T15:34:56Z") .ToList(); Assert.Equal(1, persons.Count); persons = this.TestClientContext.People - .AddQueryOption("$filter", "BirthDateTime2 eq 2000-01-01T12:34:56Z") + .AddQueryOption("$filter", "BirthDateTime2 eq 2000-01-01T15:34:56Z") .ToList(); Assert.Equal(1, persons.Count); diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/App_Start/WebApiConfig.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/App_Start/WebApiConfig.cs index cc57183a..ca803db8 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/App_Start/WebApiConfig.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/App_Start/WebApiConfig.cs @@ -24,7 +24,7 @@ public static async void RegisterTrippin( { // enable query options for all properties config.Filter().Expand().Select().OrderBy().MaxTop(null).Count(); - + config.SetTimeZoneInfo(TimeZoneInfo.Utc); await config.MapRestierRoute( "TrippinApi", "api/Trippin", new RestierBatchHandler(server)); diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj index c229bce3..db11de80 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Microsoft.OData.Service.Sample.Trippin.csproj @@ -130,10 +130,6 @@ ..\..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll True - - ..\..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.TrippinInMemory/Microsoft.OData.Service.Sample.TrippinInMemory.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.TrippinInMemory/Microsoft.OData.Service.Sample.TrippinInMemory.csproj index 63bfe362..5602c7ce 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.TrippinInMemory/Microsoft.OData.Service.Sample.TrippinInMemory.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.TrippinInMemory/Microsoft.OData.Service.Sample.TrippinInMemory.csproj @@ -42,7 +42,6 @@ 4 - ..\..\..\packages\Microsoft.Extensions.DependencyInjection.1.0.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll True diff --git a/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/Microsoft.Restier.Providers.InMemory.csproj b/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/Microsoft.Restier.Providers.InMemory.csproj index f55a80f8..5f423760 100644 --- a/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/Microsoft.Restier.Providers.InMemory.csproj +++ b/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/Microsoft.Restier.Providers.InMemory.csproj @@ -34,35 +34,15 @@ ..\..\..\packages\Microsoft.Extensions.DependencyInjection.1.0.0\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll True - - ..\..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - True - - - ..\..\..\packages\Microsoft.OData.Core.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Core.dll - True - - - ..\..\..\packages\Microsoft.OData.Edm.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll - True - - - ..\..\..\packages\Microsoft.Spatial.7.0.0\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll - True - - - ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll - True - - - ..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll + + ..\..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll True - - ..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll + + ..\..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll True @@ -71,7 +51,6 @@ - @@ -91,6 +70,7 @@ + diff --git a/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/app.config b/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/app.config new file mode 100644 index 00000000..62c52d9b --- /dev/null +++ b/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/app.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/packages.config b/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/packages.config index 2222fdcf..ee014e99 100644 --- a/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/packages.config +++ b/test/ODataEndToEnd/Microsoft.Restier.Providers.InMemory/packages.config @@ -1,8 +1,8 @@  - - + + diff --git a/tools/RESTier.tasks.targets b/tools/RESTier.tasks.targets index f3a36dbb..c2571a77 100644 --- a/tools/RESTier.tasks.targets +++ b/tools/RESTier.tasks.targets @@ -1,4 +1,4 @@ - +