Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -29,4 +29,12 @@
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Reference Include="System.Management" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<!-- The shared framework's BinaryFormatter always throws, so reference the `NetCoreAppMinimum` build which
still has a functional implementation. Private="true" is required because eng/references.targets defaults
shared framework project references to Private="false", which would keep it out of the output directory. -->
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Formatters\src\System.Runtime.Serialization.Formatters.csproj"
Private="true"
SetTargetFramework="TargetFramework=$(NetCoreAppMinimum)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace System.Management.Tests
{
public class ManagementObjectTests
{
private static bool IsWmiAndBinaryFormatterSupported => WmiTestHelper.IsWmiSupported && PlatformDetection.IsBinaryFormatterSupported;

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindowsNanoServer))]
public void PlatformNotSupportedException_On_Nano()
{
Expand Down Expand Up @@ -103,7 +105,7 @@ public void Invoke_Instance_And_Static_Method_Win32_Process()
}, maxAttempts: 10, retryWhen: e => e is XunitException);
}

[ConditionalFact(typeof(WmiTestHelper), nameof(WmiTestHelper.IsWmiSupported))]
[ConditionalFact(typeof(ManagementObjectTests), nameof(IsWmiAndBinaryFormatterSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/34689", TestPlatforms.Windows, TargetFrameworkMonikers.Netcoreapp, TestRuntimes.Mono)]
[OuterLoop]
#if NET
Expand Down
Loading