Skip to content

Commit babdc3d

Browse files
committed
Merge branch 'ShikiGami-origin/core20update'
2 parents afac9d6 + dd4e504 commit babdc3d

File tree

11 files changed

+57
-64
lines changed

11 files changed

+57
-64
lines changed

Diff for: global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "1.0.0"
3+
"version": "2.0.0"
44
},
55
"projects": [ "src", "test" ]
66
}

Diff for: src/React.AspNet.Middleware/AssemblyRegistration.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2015, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -24,11 +24,7 @@ public class AssemblyRegistration : IAssemblyRegistration
2424
public void Register(TinyIoCContainer container)
2525
{
2626
container.Register<IFileSystem, AspNetFileSystem>().AsSingleton();
27-
#if NET451
28-
container.Register<ICache, MemoryFileCache>().AsSingleton();
29-
#else
3027
container.Register<ICache, MemoryFileCacheCore>().AsSingleton();
31-
#endif
3228
}
3329
}
3430
}

Diff for: src/React.AspNet.Middleware/MemoryFileCacheCore.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2016-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -7,7 +7,6 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
#if NETSTANDARD1_6
1110
using System;
1211
using System.Collections.Generic;
1312
using Microsoft.Extensions.Caching.Memory;
@@ -89,4 +88,3 @@ public void Set<T>(string key, T data, TimeSpan slidingExpiration, IEnumerable<s
8988
}
9089
}
9190
}
92-
#endif

Diff for: src/React.AspNet.Middleware/React.AspNet.Middleware.csproj

+11-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Copyright>Copyright 2014-Present Facebook, Inc</Copyright>
66
<AssemblyTitle>ReactJS.NET - Babel middleware for ASP.NET Core</AssemblyTitle>
77
<Authors>Daniel Lo Nigro</Authors>
8-
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
8+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>React.AspNet.Middleware</AssemblyName>
1111
<AssemblyOriginatorKeyFile>../key.snk</AssemblyOriginatorKeyFile>
@@ -31,18 +31,19 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.1.2" />
35-
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
36-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.0" />
37-
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="1.1.1" />
34+
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.0.0" />
35+
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
36+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
37+
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="2.0.0" />
38+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="2.0.0" />
3839
</ItemGroup>
39-
40-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
41-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="1.1.1" />
42-
</ItemGroup>
43-
40+
4441
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
4542
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
4643
</PropertyGroup>
44+
45+
<PropertyGroup>
46+
<NoWarn>7035</NoWarn>
47+
</PropertyGroup>
4748

4849
</Project>

Diff for: src/React.AspNet/React.AspNet.csproj

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Copyright>Copyright 2014-Present Facebook, Inc</Copyright>
66
<AssemblyTitle>ReactJS.NET (ASP.NET Core MVC)</AssemblyTitle>
77
<Authors>Daniel Lo Nigro</Authors>
8-
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
8+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>React.AspNet</AssemblyName>
1111
<AssemblyOriginatorKeyFile>../key.snk</AssemblyOriginatorKeyFile>
@@ -31,11 +31,15 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="1.1.2" />
34+
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.0.0" />
3535
</ItemGroup>
3636

3737
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
3838
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
3939
</PropertyGroup>
40+
41+
<PropertyGroup>
42+
<NoWarn>7035</NoWarn>
43+
</PropertyGroup>
4044

4145
</Project>

Diff for: src/React.Sample.Cassette/React.Sample.Cassette.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
@@ -198,10 +198,10 @@
198198
</ItemGroup>
199199
<PropertyGroup>
200200
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
201-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
201+
<OldVSToolsPath Condition="'$(OldVSToolsPath)' == ''">C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\</OldVSToolsPath>
202202
</PropertyGroup>
203203
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
204-
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
204+
<Import Project="$(OldVSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(OldVSToolsPath)' != ''" />
205205
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
206206
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
207207
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
@@ -233,4 +233,4 @@
233233
</Target>
234234
<Target Name="AfterBuild">
235235
</Target> -->
236-
</Project>
236+
</Project>

Diff for: src/React.Sample.Mvc4/React.Sample.Mvc4.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
@@ -192,10 +192,10 @@
192192
</ItemGroup>
193193
<PropertyGroup>
194194
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
195-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
195+
<OldVSToolsPath Condition="'$(OldVSToolsPath)' == ''">C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\</OldVSToolsPath>
196196
</PropertyGroup>
197197
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
198-
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
198+
<Import Project="$(OldVSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(OldVSToolsPath)' != ''" />
199199
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
200200
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
201201
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
@@ -229,4 +229,4 @@
229229
</Target>
230230
<Target Name="AfterBuild">
231231
</Target> -->
232-
</Project>
232+
</Project>

Diff for: src/React.Sample.Mvc6/Program.cs

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2015, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -7,27 +7,22 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
using System;
11-
using System.Collections.Generic;
12-
using System.IO;
13-
using System.Linq;
14-
using System.Threading.Tasks;
10+
using Microsoft.AspNetCore;
1511
using Microsoft.AspNetCore.Hosting;
1612

13+
1714
namespace React.Sample.Mvc6
1815
{
1916
public class Program
2017
{
2118
public static void Main(string[] args)
2219
{
23-
var host = new WebHostBuilder()
24-
.UseKestrel()
25-
.UseContentRoot(Directory.GetCurrentDirectory())
26-
.UseIISIntegration()
20+
BuildWebHost(args).Run();
21+
}
22+
23+
public static IWebHost BuildWebHost(string[] args) =>
24+
WebHost.CreateDefaultBuilder(args)
2725
.UseStartup<Startup>()
2826
.Build();
29-
30-
host.Run();
31-
}
3227
}
3328
}

Diff for: src/React.Sample.Mvc6/React.Sample.Mvc6.csproj

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net451;netcoreapp1.1</TargetFrameworks>
4+
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
<AssemblyName>React.Sample.Mvc6</AssemblyName>
77
<OutputType>Exe</OutputType>
88
<PackageId>React.Sample.Mvc6</PackageId>
99
<NoWarn>1701</NoWarn>
10-
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">1.1</RuntimeFrameworkVersion>
10+
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">2.0</RuntimeFrameworkVersion>
1111
</PropertyGroup>
1212

1313
<ItemGroup>
@@ -23,26 +23,21 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
27-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.1" />
28-
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.1" />
29-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.1" />
30-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="1.1.0" />
31-
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
32-
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" />
33-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
34-
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" />
35-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
36-
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
26+
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
27+
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
28+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.0.0" PrivateAssets="All" />
29+
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
30+
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
31+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" PrivateAssets="All" />
3732
</ItemGroup>
3833

39-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
34+
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
4035
<PackageReference Include="JavaScriptEngineSwitcher.V8" Version="2.4.2" />
4136
<Reference Include="System" />
4237
<Reference Include="Microsoft.CSharp" />
4338
</ItemGroup>
4439

45-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
40+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
4641
<PackageReference Include="VroomJs" Version="1.2.3" />
4742
</ItemGroup>
4843

Diff for: src/React.Sample.Mvc6/Startup.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2015, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -16,6 +16,7 @@
1616
using Newtonsoft.Json;
1717
using Newtonsoft.Json.Serialization;
1818
using React.AspNet;
19+
using System;
1920

2021
namespace React.Sample.Mvc6
2122
{
@@ -32,7 +33,7 @@ public Startup(IHostingEnvironment env)
3233
public IConfiguration Configuration { get; set; }
3334

3435
// This method gets called by the runtime.
35-
public void ConfigureServices(IServiceCollection services)
36+
public IServiceProvider ConfigureServices(IServiceCollection services)
3637
{
3738
// Add MVC services to the services container.
3839
services.AddMvc();
@@ -41,6 +42,9 @@ public void ConfigureServices(IServiceCollection services)
4142

4243
// Add ReactJS.NET services.
4344
services.AddReact();
45+
46+
// Build the intermediate service provider then return it
47+
return services.BuildServiceProvider();
4448
}
4549

4650
// Configure is called after ConfigureServices is called.

Diff for: src/React.Sample.Webpack/React.Sample.Webpack.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
@@ -175,10 +175,10 @@
175175
</ItemGroup>
176176
<PropertyGroup>
177177
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
178-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
178+
<OldVSToolsPath Condition="'$(OldVSToolsPath)' == ''">C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\</OldVSToolsPath>
179179
</PropertyGroup>
180180
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
181-
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
181+
<Import Project="$(OldVSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(OldVSToolsPath)' != ''" />
182182
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
183183
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
184184
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
@@ -207,4 +207,4 @@
207207
</Target>
208208
<Target Name="AfterBuild">
209209
</Target> -->
210-
</Project>
210+
</Project>

0 commit comments

Comments
 (0)