diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/project.json b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/project.json index b1a944ad2..bad344e19 100644 --- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/project.json +++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/project.json @@ -15,7 +15,7 @@ "dotnet-desktop-binding-redirects": "1.0.0-*" }, "frameworks": { - "net451": {} + "net46": {} }, "tools": { "dotnet-dependency-tool-invoker": { diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/project.json b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/project.json index b1a944ad2..bad344e19 100644 --- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/project.json +++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/project.json @@ -15,7 +15,7 @@ "dotnet-desktop-binding-redirects": "1.0.0-*" }, "frameworks": { - "net451": {} + "net46": {} }, "tools": { "dotnet-dependency-tool-invoker": { diff --git a/TestAssets/DesktopTestProjects/DesktopAppWhichCallsDotnet/project.json b/TestAssets/DesktopTestProjects/DesktopAppWhichCallsDotnet/project.json index 3657f28d1..68c977b23 100644 --- a/TestAssets/DesktopTestProjects/DesktopAppWhichCallsDotnet/project.json +++ b/TestAssets/DesktopTestProjects/DesktopAppWhichCallsDotnet/project.json @@ -9,6 +9,15 @@ "emitEntryPoint": true }, "frameworks": { - "net451": {} + "net46": { + "frameworkAssemblies": { + "System.Runtime": { + "type": "build" + }, + "System.IO": { + "type": "build" + } + } + } } } \ No newline at end of file diff --git a/TestAssets/TestProjects/ProjectsWithTests/MultipleFrameworkProject/project.json b/TestAssets/TestProjects/ProjectsWithTests/MultipleFrameworkProject/project.json index d6f73e3a4..9c6f64cbe 100644 --- a/TestAssets/TestProjects/ProjectsWithTests/MultipleFrameworkProject/project.json +++ b/TestAssets/TestProjects/ProjectsWithTests/MultipleFrameworkProject/project.json @@ -20,7 +20,7 @@ "System.Runtime.Serialization.Primitives": "4.1.1" } }, - "net451": {} + "net46": {} }, "testRunner": "xunit" } diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets index af29cd473..b8de69a9c 100644 --- a/build/Microsoft.DotNet.Cli.Test.targets +++ b/build/Microsoft.DotNet.Cli.Test.targets @@ -175,7 +175,7 @@ diff --git a/build/test/TestPackageProjects.targets b/build/test/TestPackageProjects.targets index 3cf7a2dc8..bd42b2ea8 100644 --- a/build/test/TestPackageProjects.targets +++ b/build/test/TestPackageProjects.targets @@ -159,7 +159,7 @@ 1.0.0-preview3- $(TestPackageBuildVersionSuffix) False - net451;netstandard1.6 + netstandard1.3 Microsoft.DotNet.ProjectModel @@ -168,7 +168,7 @@ 1.0.0-rc4- $(TestPackageBuildVersionSuffix) False - net451;netstandard1.6 + netstandard1.3 Microsoft.DotNet.ProjectModel.Loader @@ -186,7 +186,7 @@ 1.0.0-preview3- $(TestPackageBuildVersionSuffix) False - netstandard1.6 + netstandard1.3 Microsoft.DotNet.InternalAbstractions @@ -195,7 +195,7 @@ 1.0.1-beta- $(TestPackageBuildVersionSuffix) False - net451;netstandard1.3 + netstandard1.3 Microsoft.Extensions.Testing.Abstractions @@ -204,7 +204,7 @@ 1.0.0-preview3- $(TestPackageBuildVersionSuffix) False - net451;netstandard1.6 + netstandard1.3 Microsoft.DotNet.Compiler.Common @@ -213,7 +213,7 @@ 1.0.0-preview3- $(TestPackageBuildVersionSuffix) False - netstandard1.6 + netstandard1.3 Microsoft.DotNet.Files @@ -222,7 +222,7 @@ 1.0.0-preview3- $(TestPackageBuildVersionSuffix) False - netstandard1.6 + netstandard1.3 dotnet-compile-fsc diff --git a/build/test/TestProjects.targets b/build/test/TestProjects.targets index 10ce8141e..733b43e7c 100644 --- a/build/test/TestProjects.targets +++ b/build/test/TestProjects.targets @@ -86,7 +86,7 @@ - net451 + net46 net46 diff --git a/src/Microsoft.Extensions.Testing.Abstractions/MetadataExtensions.cs b/src/Microsoft.Extensions.Testing.Abstractions/MetadataExtensions.cs index e966a4c5a..68da748e6 100644 --- a/src/Microsoft.Extensions.Testing.Abstractions/MetadataExtensions.cs +++ b/src/Microsoft.Extensions.Testing.Abstractions/MetadataExtensions.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System; using System.Reflection; using System.Reflection.Metadata; using System.Reflection.Metadata.Ecma335; @@ -9,11 +10,11 @@ namespace Microsoft.Extensions.Testing.Abstractions { internal static class MetadataExtensions { + private static PropertyInfo s_methodInfoMethodTokenProperty = typeof(MethodInfo).GetProperty("MethodToken"); + internal static int GetMethodToken(this MethodInfo methodInfo) { - var methodToken = methodInfo.MetadataToken; - - return methodToken; + return (int)s_methodInfoMethodTokenProperty.GetValue(methodInfo); } internal static MethodDebugInformationHandle GetMethodDebugInformationHandle(this MethodInfo methodInfo) diff --git a/src/Microsoft.Extensions.Testing.Abstractions/project.json b/src/Microsoft.Extensions.Testing.Abstractions/project.json index 6f69481c4..63c42f277 100644 --- a/src/Microsoft.Extensions.Testing.Abstractions/project.json +++ b/src/Microsoft.Extensions.Testing.Abstractions/project.json @@ -16,7 +16,7 @@ "System.Reflection.Metadata": "1.4.1-beta-24426-02" }, "frameworks": { - "netstandard1.5": { + "netstandard1.3": { "imports": [ "portable-net45+wp80+win8+wpa81+dnxcore50", "portable-net45+win8" diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json b/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json index a6f3307b4..5c099fa74 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json @@ -30,7 +30,7 @@ "System.Collections.Immutable": "1.2.0-rc2-24022", "System.Net.NetworkInformation": "4.1.0-rc2-24022" }, - "net451": { + "net46": { "frameworkAssemblies": { "System.Runtime": { "type": "build" diff --git a/test/binding-redirects.Tests/project.json b/test/binding-redirects.Tests/project.json index ad9614b43..4e363a4bc 100644 --- a/test/binding-redirects.Tests/project.json +++ b/test/binding-redirects.Tests/project.json @@ -9,7 +9,7 @@ } }, "frameworks": { - "net451": { + "net46": { "frameworkAssemblies": { "System.Configuration": "" }