From e3366c764044ee7e0936d398b799803e3cc3f08b Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 26 May 2017 16:19:20 -0700 Subject: [PATCH] Cross-compile netcoreapp2.0 and net461 --- build/common.props | 4 ++-- build/dependencies.props | 4 ++-- samples/SampleApp/SampleApp.csproj | 5 ++++- src/Microsoft.AspNetCore/CertificateLoader.cs | 8 +++++++- src/Microsoft.AspNetCore/Microsoft.AspNetCore.csproj | 2 +- .../Microsoft.DotNet.Archive.csproj | 4 ---- .../Microsoft.AspNetCore.FunctionalTests.csproj | 10 +++++++++- .../Microsoft.AspNetCore.Tests.csproj | 5 +++-- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/build/common.props b/build/common.props index 063dbc20ce..4d4fc25989 100644 --- a/build/common.props +++ b/build/common.props @@ -21,8 +21,8 @@ - - + + diff --git a/build/dependencies.props b/build/dependencies.props index 5e0e8ee677..302a8149fd 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,10 +2,10 @@ 0.4.0-* 2.0.0-* - 4.3.0 + 4.4.0-* 2.1.0-* 4.7.1 - $(BundledNETStandardPackageVersion) + 2.0.0-* 10.0.1 2.0.0-* 1.1.5 diff --git a/samples/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj index 37ac635939..db4fc54254 100644 --- a/samples/SampleApp/SampleApp.csproj +++ b/samples/SampleApp/SampleApp.csproj @@ -3,7 +3,7 @@ - netcoreapp2.0 + netcoreapp2.0;net461 aspnetcore-MetaPackagesSampleApp-20170406180413 @@ -16,4 +16,7 @@ + + + diff --git a/src/Microsoft.AspNetCore/CertificateLoader.cs b/src/Microsoft.AspNetCore/CertificateLoader.cs index aa616184c4..b43bdb8fcc 100644 --- a/src/Microsoft.AspNetCore/CertificateLoader.cs +++ b/src/Microsoft.AspNetCore/CertificateLoader.cs @@ -179,7 +179,13 @@ namespace Microsoft.AspNetCore { var certificate = TryLoad(X509KeyStorageFlags.DefaultKeySet, out var 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) { diff --git a/src/Microsoft.AspNetCore/Microsoft.AspNetCore.csproj b/src/Microsoft.AspNetCore/Microsoft.AspNetCore.csproj index f8d430676e..153156b71e 100644 --- a/src/Microsoft.AspNetCore/Microsoft.AspNetCore.csproj +++ b/src/Microsoft.AspNetCore/Microsoft.AspNetCore.csproj @@ -3,7 +3,7 @@ - netcoreapp2.0 + netcoreapp2.0;net461 aspnetcore Microsoft.AspNetCore true diff --git a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj index f14971a5ef..3bd7d6263e 100644 --- a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj +++ b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj @@ -7,8 +7,4 @@ false - - - - diff --git a/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj b/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj index 1a45e63b7d..c8e3826622 100644 --- a/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj +++ b/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj @@ -3,7 +3,15 @@ - netcoreapp2.0 + netcoreapp2.0;net461 + netcoreapp2.0 + + + true + win7-x64 diff --git a/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj b/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj index 5e36052b25..5a3a180fbc 100644 --- a/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj +++ b/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj @@ -3,11 +3,12 @@ - netcoreapp2.0 + netcoreapp2.0;net461 + netcoreapp2.0 - +