Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 04fdd0a

Browse files
Update samples to target both netcoreapp2.0 and net461
1 parent 5fb048b commit 04fdd0a

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

build/common.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
1717
</ItemGroup>
1818

19-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework' AND '$(OutputType)'=='library'">
19+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'">
2020
<PackageReference Include="NETStandard.Library" Version="$(BundledNETStandardPackageVersion)" />
21+
<PackageReference Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" />
2122
</ItemGroup>
2223
</Project>

build/dependencies.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion>
77
<JsonNetVersion>10.0.1</JsonNetVersion>
88
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
9+
<NETStandardLibraryNETFrameworkVersion>2.0.0-*</NETStandardLibraryNETFrameworkVersion>
910
<RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netstandard2.0'">2.0.0-*</RuntimeFrameworkVersion>
1011
<ThreadingDataflowVersion>4.7.0</ThreadingDataflowVersion>
1112
</PropertyGroup>

samples/misc/LatencyTest/LatencyTest.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<Import Project="..\..\..\build\dependencies.props" />
3+
<Import Project="..\..\..\build\common.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
77
<IsPackable>false</IsPackable>
88
<OutputType>exe</OutputType>
99
</PropertyGroup>

samples/misc/NodeServicesExamples/NodeServicesExamples.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<Import Project="..\..\..\build\dependencies.props" />
3+
<Import Project="..\..\..\build\common.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
77
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
88
<IsPackable>false</IsPackable>
99
</PropertyGroup>

samples/misc/Webpack/ActionResults/PrerenderResult.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ public override async Task ExecuteResultAsync(ActionContext context)
2727
{
2828
var nodeServices = context.HttpContext.RequestServices.GetRequiredService<INodeServices>();
2929
var hostEnv = context.HttpContext.RequestServices.GetRequiredService<IHostingEnvironment>();
30+
var applicationLifetime = context.HttpContext.RequestServices.GetRequiredService<IApplicationLifetime>();
3031
var applicationBasePath = hostEnv.ContentRootPath;
3132
var request = context.HttpContext.Request;
3233
var response = context.HttpContext.Response;
3334

3435
var prerenderedHtml = await Prerenderer.RenderToString(
3536
applicationBasePath,
3637
nodeServices,
38+
applicationLifetime.ApplicationStopping,
3739
_moduleExport,
3840
request.GetEncodedUrl(),
3941
request.Path + request.QueryString.Value,

samples/misc/Webpack/Webpack.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<Import Project="..\..\..\build\dependencies.props" />
3+
<Import Project="..\..\..\build\common.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
77
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
88
<IsPackable>false</IsPackable>
99
</PropertyGroup>

0 commit comments

Comments
 (0)