Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify tests to distinguish between emit- and interpreted-based invoke #70114

Merged
merged 5 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ public MethodInvoker(MethodBase method, Signature signature)
_method = method;
_signature = signature;

#if USE_NATIVE_INVOKE
// Always use the native invoke; useful for testing.
_strategyDetermined = true;
#elif USE_EMIT_INVOKE
// Always use emit invoke (if IsDynamicCodeCompiled == true); useful for testing.
_invoked = true;
#endif
if (LocalAppContextSwitches.ForceInterpretedInvoke && !LocalAppContextSwitches.ForceEmitInvoke)
{
// Always use the native invoke; useful for testing.
_strategyDetermined = true;
buyaa-n marked this conversation as resolved.
Show resolved Hide resolved
}
else if (LocalAppContextSwitches.ForceEmitInvoke && !LocalAppContextSwitches.ForceInterpretedInvoke)
{
// Always use emit invoke (if IsDynamicCodeCompiled == true); useful for testing.
_invoked = true;
}
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
Expand Down
44 changes: 44 additions & 0 deletions src/libraries/Common/tests/System/Reflection/InvokeEmitTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Xunit;

namespace System.Reflection.Tests
{
public class InvokeEmitTests
{
[Fact]
public static void VerifyInvokeIsUsingEmit_Method()
{
MethodInfo method = typeof(TestClassThatThrows).GetMethod(nameof(TestClassThatThrows.Throw))!;
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => method.Invoke(null, null));
Exception exInner = ex.InnerException;

Assert.Contains("Here", exInner.ToString());
Assert.Contains("InvokeStub_TestClassThatThrows", exInner.ToString());
Assert.DoesNotContain("System.RuntimeMethodHandle.InvokeMethod", exInner.ToString());
}

[Fact]
public static void VerifyInvokeIsUsingEmit_Constructor()
{
ConstructorInfo ctor = typeof(TestClassThatThrows).GetConstructor(Type.EmptyTypes)!;
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => ctor.Invoke(null));
Exception exInner = ex.InnerException;

Assert.Contains("Here", exInner.ToString());
Assert.Contains("InvokeStub_TestClassThatThrows", exInner.ToString());
Assert.DoesNotContain("System.RuntimeMethodHandle.InvokeMethod", exInner.ToString());
}

private class TestClassThatThrows
{
public TestClassThatThrows()
{
throw new Exception("Here");
}

public static void Throw() => throw new Exception("Here");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Xunit;

namespace System.Reflection.Tests
{
public class InvokeInterpretedTests
{
[Fact]
public static void VerifyInvokeIsUsingEmit_Method()
{
MethodInfo method = typeof(TestClassThatThrows).GetMethod(nameof(TestClassThatThrows.Throw))!;
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => method.Invoke(null, null));
Exception exInner = ex.InnerException;

Assert.Contains("Here", exInner.ToString());
Assert.Contains("System.RuntimeMethodHandle.InvokeMethod", exInner.ToString());
Assert.DoesNotContain("InvokeStub_TestClassThatThrows", exInner.ToString());
}

[Fact]
public static void VerifyInvokeIsUsingEmit_Constructor()
{
ConstructorInfo ctor = typeof(TestClassThatThrows).GetConstructor(Type.EmptyTypes)!;
TargetInvocationException ex = Assert.Throws<TargetInvocationException>(() => ctor.Invoke(null));
Exception exInner = ex.InnerException;

Assert.Contains("Here", exInner.ToString());
Assert.Contains("System.RuntimeMethodHandle.InvokeMethod", exInner.ToString());
Assert.DoesNotContain("InvokeStub_TestClassThatThrows", exInner.ToString());
}

private class TestClassThatThrows
{
public TestClassThatThrows()
{
throw new Exception("Here");
}

public static void Throw() => throw new Exception("Here");
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ public static bool PreserveEventListnerObjectIdentity
get => GetCachedSwitchValue("Switch.System.Diagnostics.EventSource.PreserveEventListnerObjectIdentity", ref s_preserveEventListnerObjectIdentity);
}

private static int s_forceEmitInvoke;
public static bool ForceEmitInvoke
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => GetCachedSwitchValue("Switches.System.Reflection.ForceEmitInvoke", ref s_forceEmitInvoke);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other names in this file start with Switch.. Is Switches. here intentional or a mistake?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes - I'll change that thanks.

}

private static int s_forceInterpretedInvoke;
public static bool ForceInterpretedInvoke
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => GetCachedSwitchValue("Switches.System.Reflection.ForceInterpretedInvoke", ref s_forceInterpretedInvoke);
}

private static int s_serializationGuard;
public static bool SerializationGuard
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ public ConstructorInvoker(RuntimeConstructorInfo constructorInfo)
{
_method = constructorInfo;

#if USE_NATIVE_INVOKE
// Always use the native invoke; useful for testing.
_strategyDetermined = true;
#elif USE_EMIT_INVOKE
// Always use emit invoke (if IsDynamicCodeCompiled == true); useful for testing.
_invoked = true;
#if !MONO // Temporary until Mono is updated.
if (LocalAppContextSwitches.ForceInterpretedInvoke && !LocalAppContextSwitches.ForceEmitInvoke)
{
// Always use the native invoke; useful for testing.
_strategyDetermined = true;
}
else if (LocalAppContextSwitches.ForceEmitInvoke && !LocalAppContextSwitches.ForceInterpretedInvoke)
{
// Always use emit invoke (if IsDynamicCodeCompiled == true); useful for testing.
_invoked = true;
}
#endif
}

Expand Down
42 changes: 42 additions & 0 deletions src/libraries/System.Reflection/System.Reflection.sln
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ForwardedTypesAssembly", "t
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.Tests", "tests\System.Reflection.Tests.csproj", "{F2E5F428-418B-41B9-BF14-36EB67486A71}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.InvokeInterpreted.Tests", "tests\InvokeInterpreted\System.Reflection.InvokeInterpreted.Tests.csproj", "{CB2060E9-094A-4E8A-851B-84EF56491F5D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.InvokeEmit.Tests", "tests\InvokeEmit\System.Reflection.InvokeEmit.Tests.csproj", "{EE38FA51-BA38-4FC9-9655-C8EBB768969D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestAssembly", "tests\TestAssembly\TestAssembly.csproj", "{E6F16442-FB0F-4666-8309-F8B1EBA5B860}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.TestExe", "tests\TestExe\System.Reflection.TestExe.csproj", "{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88}"
Expand Down Expand Up @@ -520,6 +524,42 @@ Global
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|x64.Build.0 = Debug|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|x86.ActiveCfg = Debug|Any CPU
{95C7E01D-B35D-431C-A50E-D52956ABBFB3}.Checked|x86.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|x64.ActiveCfg = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|x64.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|x86.ActiveCfg = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Debug|x86.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|Any CPU.Build.0 = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|x64.ActiveCfg = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|x64.Build.0 = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|x86.ActiveCfg = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Release|x86.Build.0 = Release|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x64.ActiveCfg = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x64.Build.0 = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x86.ActiveCfg = Debug|Any CPU
{CB2060E9-094A-4E8A-851B-84EF56491F5D}.Checked|x86.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|x64.ActiveCfg = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|x64.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|x86.ActiveCfg = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Debug|x86.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|Any CPU.Build.0 = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|x64.ActiveCfg = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|x64.Build.0 = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|x86.ActiveCfg = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Release|x86.Build.0 = Release|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|Any CPU.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x64.ActiveCfg = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x64.Build.0 = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x86.ActiveCfg = Debug|Any CPU
{EE38FA51-BA38-4FC9-9655-C8EBB768969D}.Checked|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -545,6 +585,8 @@ Global
{E6F16442-FB0F-4666-8309-F8B1EBA5B860} = {64590D3A-D464-4764-ABE3-EF62722D8FA7}
{42BEE4BD-C378-41C5-A94F-4EA01F8D6E88} = {64590D3A-D464-4764-ABE3-EF62722D8FA7}
{C4AF78A8-28D7-434B-8F85-0B0E902AF8E0} = {64590D3A-D464-4764-ABE3-EF62722D8FA7}
{CB2060E9-094A-4E8A-851B-84EF56491F5D} = {64590D3A-D464-4764-ABE3-EF62722D8FA7}
{EE38FA51-BA38-4FC9-9655-C8EBB768969D} = {64590D3A-D464-4764-ABE3-EF62722D8FA7}
{1F5C28EE-FA69-4A3A-934C-88FEBBDE2489} = {5BEA3DA5-3D9A-4642-B049-C04392B78D4B}
{A2B3A339-4792-4561-A973-11FE5EEEB54A} = {5BEA3DA5-3D9A-4642-B049-C04392B78D4B}
{7625A3EB-C76C-41FE-85DC-C8B792062F9C} = {5BEA3DA5-3D9A-4642-B049-C04392B78D4B}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows</TargetFrameworks>
buyaa-n marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Common.cs" />
<Compile Include="..\ConstructorInfoTests.cs" />
<Compile Include="..\MethodInfoTests.cs" />
<Compile Include="..\PropertyInfoTests.cs" />
<Compile Include="$(CommonTestPath)\System\Reflection\InvokeEmitTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TestAssembly\TestAssembly.csproj" />
</ItemGroup>
<ItemGroup>
<!-- Assemblies that should be excluded from the bundle -->
<__ExcludeFromBundle Include="TestAssembly.dll" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"configProperties": {
"Switches.System.Reflection.ForceEmitInvoke": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Common.cs" />
<Compile Include="..\ConstructorInfoTests.cs" />
<Compile Include="..\MethodInfoTests.cs" />
<Compile Include="..\PropertyInfoTests.cs" />
<Compile Include="$(CommonTestPath)\System\Reflection\InvokeInterpretedTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TestAssembly\TestAssembly.csproj" />
</ItemGroup>
<ItemGroup>
<!-- Assemblies that should be excluded from the bundle -->
<__ExcludeFromBundle Include="TestAssembly.dll" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"configProperties": {
"Switches.System.Reflection.ForceInterpretedInvoke": true
}
}
42 changes: 42 additions & 0 deletions src/libraries/System.Runtime/System.Runtime.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryImportGenerator", ".
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Interop.SourceGeneration", "..\System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj", "{A7B7DE04-7261-4D4C-AA78-9F2D9B5A1C37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.ReflectionInvokeInterpreted.Tests", "tests\System\Reflection\InvokeInterpreted\System.Runtime.ReflectionInvokeInterpreted.Tests.csproj", "{47E26787-7C27-4572-AD8B-868DE44E2C48}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.ReflectionInvokeEmit.Tests", "tests\System\Reflection\InvokeEmit\System.Runtime.ReflectionInvokeEmit.Tests.csproj", "{C3F25EEF-04B4-407A-960B-0C1CE9C04430}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "ref\System.Runtime.csproj", "{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "src\System.Runtime.csproj", "{A83A8520-F5E2-49B4-83BC-0F82A412951D}"
Expand Down Expand Up @@ -324,6 +328,24 @@ Global
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x64.Build.0 = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x86.ActiveCfg = Debug|Any CPU
{3B79DD71-8C2F-41BC-A1A7-86A490D6C726}.Checked|x86.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|x64.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|x64.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|x86.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Debug|x86.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|Any CPU.Build.0 = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x64.ActiveCfg = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x64.Build.0 = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x86.ActiveCfg = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Release|x86.Build.0 = Release|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|Any CPU.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x64.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x64.Build.0 = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x86.ActiveCfg = Debug|Any CPU
{47E26787-7C27-4572-AD8B-868DE44E2C48}.Checked|x86.Build.0 = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -360,6 +382,24 @@ Global
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x64.Build.0 = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x86.ActiveCfg = Debug|Any CPU
{C230AC88-A377-4BEB-824F-AB174C14DC86}.Checked|x86.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|x64.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|x64.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|x86.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Debug|x86.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|Any CPU.Build.0 = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x64.ActiveCfg = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x64.Build.0 = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x86.ActiveCfg = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Release|x86.Build.0 = Release|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|Any CPU.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x64.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x64.Build.0 = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x86.ActiveCfg = Debug|Any CPU
{C3F25EEF-04B4-407A-960B-0C1CE9C04430}.Checked|x86.Build.0 = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -561,6 +601,8 @@ Global
{1BCCD2F5-A561-4641-8A0B-51F3EDCA35DC} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{0F83B07B-2E3F-4708-BE6D-7A8DA8168803} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{833C1D45-9BBB-4A92-93B7-4EFFD9E945AD} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{47E26787-7C27-4572-AD8B-868DE44E2C48} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{C3F25EEF-04B4-407A-960B-0C1CE9C04430} = {FD72C125-C10D-457B-8AFC-6B4E5237AF6A}
{62C2AC8A-7410-4E06-B94E-43BF2DCFBDE9} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{9C41B325-1225-43CA-9436-549AFF6D90A1} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {5B2B5E7E-A2FB-4095-9E79-404BF53E0133}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\BindingFlagsDoNotWrap.cs" />
<Compile Include="..\InvokeRefReturn.cs" />
<Compile Include="..\InvokeWithRefLikeArgs.cs" />
<Compile Include="..\PointerTests.cs" />
<Compile Include="$(CommonTestPath)\System\Reflection\InvokeEmitTests.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq" Version="$(MoqVersion)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"configProperties": {
"Switches.System.Reflection.ForceEmitInvoke": true
}
}
Loading