From 045c05fc884a990fef8c22a066b93842a4493cff Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 7 Jun 2017 12:02:58 +0100 Subject: [PATCH] Update samples to target both netcoreapp2.0 and net461 --- build/common.props | 3 ++- build/dependencies.props | 1 + samples/misc/LatencyTest/LatencyTest.csproj | 4 ++-- samples/misc/NodeServicesExamples/NodeServicesExamples.csproj | 4 ++-- samples/misc/Webpack/ActionResults/PrerenderResult.cs | 2 ++ samples/misc/Webpack/Webpack.csproj | 4 ++-- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/build/common.props b/build/common.props index 89ade5d..72ab892 100644 --- a/build/common.props +++ b/build/common.props @@ -16,7 +16,8 @@ - + + diff --git a/build/dependencies.props b/build/dependencies.props index 3e33857..2174a5d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -6,6 +6,7 @@ 2.1.0-* 10.0.1 $(BundledNETStandardPackageVersion) + 2.0.0-* 2.0.0-* 4.7.0 diff --git a/samples/misc/LatencyTest/LatencyTest.csproj b/samples/misc/LatencyTest/LatencyTest.csproj index 8c17cdb..43d5f17 100644 --- a/samples/misc/LatencyTest/LatencyTest.csproj +++ b/samples/misc/LatencyTest/LatencyTest.csproj @@ -1,9 +1,9 @@  - + - netcoreapp2.0 + netcoreapp2.0;net461 false exe diff --git a/samples/misc/NodeServicesExamples/NodeServicesExamples.csproj b/samples/misc/NodeServicesExamples/NodeServicesExamples.csproj index 0604193..4bbb9ec 100644 --- a/samples/misc/NodeServicesExamples/NodeServicesExamples.csproj +++ b/samples/misc/NodeServicesExamples/NodeServicesExamples.csproj @@ -1,9 +1,9 @@ - + - netcoreapp2.0 + netcoreapp2.0;net461 true false diff --git a/samples/misc/Webpack/ActionResults/PrerenderResult.cs b/samples/misc/Webpack/ActionResults/PrerenderResult.cs index e80b5b1..4f2c8f5 100644 --- a/samples/misc/Webpack/ActionResults/PrerenderResult.cs +++ b/samples/misc/Webpack/ActionResults/PrerenderResult.cs @@ -27,6 +27,7 @@ namespace Webpack.ActionResults { var nodeServices = context.HttpContext.RequestServices.GetRequiredService(); var hostEnv = context.HttpContext.RequestServices.GetRequiredService(); + var applicationLifetime = context.HttpContext.RequestServices.GetRequiredService(); var applicationBasePath = hostEnv.ContentRootPath; var request = context.HttpContext.Request; var response = context.HttpContext.Response; @@ -34,6 +35,7 @@ namespace Webpack.ActionResults var prerenderedHtml = await Prerenderer.RenderToString( applicationBasePath, nodeServices, + applicationLifetime.ApplicationStopping, _moduleExport, request.GetEncodedUrl(), request.Path + request.QueryString.Value, diff --git a/samples/misc/Webpack/Webpack.csproj b/samples/misc/Webpack/Webpack.csproj index 9cabae2..eedacab 100644 --- a/samples/misc/Webpack/Webpack.csproj +++ b/samples/misc/Webpack/Webpack.csproj @@ -1,9 +1,9 @@ - + - netcoreapp2.0 + netcoreapp2.0;net461 true false