diff --git a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs index 5deb746f94..dcab0a3d8c 100644 --- a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; -#if DOTNET5_4 +#if NETSTANDARD1_3 using System.Reflection; #endif using System.Threading.Tasks; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/BindAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/BindAttribute.cs index 0c2cfc4059..43921f94ee 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/BindAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/BindAttribute.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; -#if DOTNET5_4 +#if NETSTANDARD1_3 using System.Reflection; #endif using Microsoft.AspNetCore.Mvc.Core; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCollection.cs b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCollection.cs index 3f7d5fb97c..08243af1be 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCollection.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Filters/FilterCollection.cs @@ -3,7 +3,7 @@ using System; using System.Collections.ObjectModel; -#if DOTNET5_4 +#if NETSTANDARD1_3 using System.Reflection; #endif using Microsoft.AspNetCore.Mvc.Core; diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs index 2cf6f425f0..38c2da8966 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -#if DOTNET5_4 +#if NETSTANDARD1_3 using System.Reflection; #endif using System.Threading.Tasks; diff --git a/src/Microsoft.AspNetCore.Mvc.Dnx/DnxRoslynCompilationService.cs b/src/Microsoft.AspNetCore.Mvc.Dnx/DnxRoslynCompilationService.cs index c756a41f86..2f72a90809 100644 --- a/src/Microsoft.AspNetCore.Mvc.Dnx/DnxRoslynCompilationService.cs +++ b/src/Microsoft.AspNetCore.Mvc.Dnx/DnxRoslynCompilationService.cs @@ -9,7 +9,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Reflection.PortableExecutable; -#if DOTNET5_6 +#if NETSTANDARD1_5 using System.Runtime.Loader; #endif using System.Text; @@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal private readonly ILibraryExporter _libraryExporter; private readonly RazorViewEngineOptions _options; private readonly Lazy> _applicationReferences; -#if DOTNET5_6 +#if NETSTANDARD1_5 private readonly RazorLoadContext _razorLoadContext; #endif @@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal _options = optionsAccessor.Value; _applicationReferences = new Lazy>(GetApplicationReferences); -#if DOTNET5_6 +#if NETSTANDARD1_5 _razorLoadContext = new RazorLoadContext(); #endif } @@ -149,7 +149,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal private Assembly LoadStream(MemoryStream ms, MemoryStream assemblySymbols) { -#if DOTNET5_6 +#if NETSTANDARD1_5 return _razorLoadContext.Load(ms, assemblySymbols); #else return Assembly.Load(ms.ToArray(), assemblySymbols?.ToArray()); @@ -244,7 +244,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal return metadata.GetReference(filePath: path); } -#if DOTNET5_6 +#if NETSTANDARD1_5 private class RazorLoadContext : AssemblyLoadContext { protected override Assembly Load(AssemblyName assemblyName) diff --git a/src/Microsoft.AspNetCore.Mvc.Dnx/project.json b/src/Microsoft.AspNetCore.Mvc.Dnx/project.json index 84cec3a2f3..a68452f014 100644 --- a/src/Microsoft.AspNetCore.Mvc.Dnx/project.json +++ b/src/Microsoft.AspNetCore.Mvc.Dnx/project.json @@ -20,8 +20,11 @@ }, "frameworks": { "net451": {}, - "dotnet5.6": { - "imports": "portable-net451+win8" + "netstandard1.5": { + "imports": [ + "portable-net451+win8", + "dotnet5.6" + ] } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs b/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs index fc861d22fa..e53c1ed1c3 100644 --- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs +++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/SelectTagHelper.cs @@ -5,7 +5,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -#if DOTNET5_6 +#if NETSTANDARD1_5 using System.Reflection; #endif using Microsoft.AspNetCore.Mvc.ModelBinding;