Skip to content

Ability to exclude/include the platform .NET Core #2432

Closed
@jnm2

Description

@jnm2

The .NET Standard tests may be executed against a variety of runtimes, so ideally I would write this:

[Test]
[Platform(Exclude = "netcore", Reason = "BeginInvoke causes PlatformNotSupportedException")]
public static void WarningInBeginInvoke()
{
    new Action(() => Assert.Warn("(Warning message)"))
        .BeginInvoke(null, null)
        .AsyncWaitHandle.WaitOne();
}

Using #if !(NETSTANDARD1_3 || NETSTANDARD1_6) is not ideal because the .NET Standard tests can (and in theory should) be run against .NET Framework and Mono as well.

Unless we've got a new include/exclude attribute lined up to implement, can we just add the platform to the existing platform attribute?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions