Cross-compile netcoreapp2.0 and net461

This commit is contained in:
John Luo 2017-05-26 16:19:20 -07:00
parent 0a6b11d160
commit e3366c7640
8 changed files with 28 additions and 14 deletions

View File

@ -21,8 +21,8 @@
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" /> <PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkVersion)" PrivateAssets="All" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework' AND '$(OutputType)'=='library'"> <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="NETStandard.Library" Version="$(BundledNETStandardPackageVersion)" /> <PackageReference Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" PrivateAssets="All" />
</ItemGroup> </ItemGroup>
<!-- defines the default values for each item type --> <!-- defines the default values for each item type -->

View File

@ -2,10 +2,10 @@
<PropertyGroup> <PropertyGroup>
<AspNetCoreIntegrationTestingVersion>0.4.0-*</AspNetCoreIntegrationTestingVersion> <AspNetCoreIntegrationTestingVersion>0.4.0-*</AspNetCoreIntegrationTestingVersion>
<AspNetCoreVersion>2.0.0-*</AspNetCoreVersion> <AspNetCoreVersion>2.0.0-*</AspNetCoreVersion>
<CoreFxVersion>4.3.0</CoreFxVersion> <CoreFxVersion>4.4.0-*</CoreFxVersion>
<InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion> <InternalAspNetCoreSdkVersion>2.1.0-*</InternalAspNetCoreSdkVersion>
<MoqVersion>4.7.1</MoqVersion> <MoqVersion>4.7.1</MoqVersion>
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion> <NETStandardLibraryNETFrameworkVersion>2.0.0-*</NETStandardLibraryNETFrameworkVersion>
<NewtonsoftJsonVersion>10.0.1</NewtonsoftJsonVersion> <NewtonsoftJsonVersion>10.0.1</NewtonsoftJsonVersion>
<RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0-*</RuntimeFrameworkVersion> <RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0-*</RuntimeFrameworkVersion>
<SQLitePCLRawVersion>1.1.5</SQLitePCLRawVersion> <SQLitePCLRawVersion>1.1.5</SQLitePCLRawVersion>

View File

@ -3,7 +3,7 @@
<Import Project="..\..\build\dependencies.props" /> <Import Project="..\..\build\dependencies.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<UserSecretsId>aspnetcore-MetaPackagesSampleApp-20170406180413</UserSecretsId> <UserSecretsId>aspnetcore-MetaPackagesSampleApp-20170406180413</UserSecretsId>
</PropertyGroup> </PropertyGroup>
@ -16,4 +16,7 @@
<ProjectReference Include="..\..\src\Microsoft.AspNetCore\Microsoft.AspNetCore.csproj" /> <ProjectReference Include="..\..\src\Microsoft.AspNetCore\Microsoft.AspNetCore.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" />
</ItemGroup>
</Project> </Project>

View File

@ -179,7 +179,13 @@ namespace Microsoft.AspNetCore
{ {
var certificate = TryLoad(X509KeyStorageFlags.DefaultKeySet, out var error) var certificate = TryLoad(X509KeyStorageFlags.DefaultKeySet, out var error)
?? TryLoad(X509KeyStorageFlags.UserKeySet, out error) ?? TryLoad(X509KeyStorageFlags.UserKeySet, out error)
?? TryLoad(X509KeyStorageFlags.EphemeralKeySet, out error); #if NETCOREAPP2_0
?? TryLoad(X509KeyStorageFlags.EphemeralKeySet, out error)
#elif NET461
#else
#error target frameworks need to be updated
#endif
;
if (error != null) if (error != null)
{ {

View File

@ -3,7 +3,7 @@
<Import Project="..\..\build\common.props" /> <Import Project="..\..\build\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<PackageTags>aspnetcore</PackageTags> <PackageTags>aspnetcore</PackageTags>
<Description>Microsoft.AspNetCore</Description> <Description>Microsoft.AspNetCore</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>

View File

@ -7,8 +7,4 @@
<EnableApiCheck>false</EnableApiCheck> <EnableApiCheck>false</EnableApiCheck>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Linq.Parallel" Version="$(CoreFxVersion)" />
</ItemGroup>
</Project> </Project>

View File

@ -3,7 +3,15 @@
<Import Project="..\..\build\common.props" /> <Import Project="..\..\build\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
<!--
Workaround for "Use executable flags in Microsoft.NET.Test.Sdk" (https://github.com/Microsoft/vstest/issues/792).
Remove when fixed.
-->
<HasRuntimeOutput>true</HasRuntimeOutput>
<RuntimeIdentifier Condition="'$(TargetFramework)' != 'netcoreapp2.0'">win7-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -3,11 +3,12 @@
<Import Project="..\..\build\common.props" /> <Import Project="..\..\build\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.All\Microsoft.AspNetCore.All.csproj" /> <ProjectReference Include="..\..\src\Microsoft.AspNetCore\Microsoft.AspNetCore.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>