diff --git a/test/Microsoft.TestCommon/FactDiscoverer.cs b/test/Microsoft.TestCommon/FactDiscoverer.cs index c6187585..db913e18 100644 --- a/test/Microsoft.TestCommon/FactDiscoverer.cs +++ b/test/Microsoft.TestCommon/FactDiscoverer.cs @@ -42,13 +42,13 @@ namespace Microsoft.TestCommon IAttributeInfo factAttribute) { var baseCases = base.Discover(discoveryOptions, testMethod, factAttribute); - if (!String.IsNullOrEmpty(factAttribute.GetNamedArgument(nameof(FactAttribute.Skip)))) + if (!String.IsNullOrEmpty(factAttribute.GetNamedArgument("Skip"))) { // No need to change skipped tests. return baseCases; } - var platforms = factAttribute.GetNamedArgument(nameof(FactAttribute.Platforms)); + var platforms = factAttribute.GetNamedArgument("Platforms"); if ((platforms & Platform) != 0) { // No need to change tests that should run on the current platform. @@ -71,7 +71,7 @@ namespace Microsoft.TestCommon } // Replace test with its skipped equivalent. - var platformJustification = factAttribute.GetNamedArgument(nameof(FactAttribute.PlatformJustification)); + var platformJustification = factAttribute.GetNamedArgument("PlatformJustification"); var skipReason = String.Format(platformJustification, platforms.ToString().Replace(", ", " | "), Platform); var testCase = new SkippedXunitTestCase( _diagnosticMessageSink, diff --git a/test/Microsoft.TestCommon/PortReserver.cs b/test/Microsoft.TestCommon/PortReserver.cs index 45866ceb..a84ed27d 100644 --- a/test/Microsoft.TestCommon/PortReserver.cs +++ b/test/Microsoft.TestCommon/PortReserver.cs @@ -143,7 +143,8 @@ namespace Microsoft.TestCommon Mutex mutex = new Mutex(initiallyOwned: false, name: "WebStack-RandomPortAcquisition"); if (!mutex.WaitOne(TimeSpan.FromSeconds(timeoutInSeconds))) { - throw new InvalidOperationException($"Unable to reserve global Mutex within {timeoutInSeconds} seconds."); + throw new InvalidOperationException( + String.Format("Unable to reserve global Mutex within {0} seconds.", timeoutInSeconds)); } return mutex; diff --git a/test/Microsoft.TestCommon/TheoryDiscoverer.cs b/test/Microsoft.TestCommon/TheoryDiscoverer.cs index 986e5c54..8ca4c834 100644 --- a/test/Microsoft.TestCommon/TheoryDiscoverer.cs +++ b/test/Microsoft.TestCommon/TheoryDiscoverer.cs @@ -40,13 +40,13 @@ namespace Microsoft.TestCommon IAttributeInfo theoryAttribute) { var baseCases = base.Discover(discoveryOptions, testMethod, theoryAttribute); - if (!String.IsNullOrEmpty(theoryAttribute.GetNamedArgument(nameof(TheoryAttribute.Skip)))) + if (!String.IsNullOrEmpty(theoryAttribute.GetNamedArgument("Skip"))) { // No need to change skipped tests. return baseCases; } - var platforms = theoryAttribute.GetNamedArgument(nameof(TheoryAttribute.Platforms)); + var platforms = theoryAttribute.GetNamedArgument("Platforms"); if ((platforms & Platform) != 0) { // No need to change tests that should run on the current platform. @@ -55,7 +55,7 @@ namespace Microsoft.TestCommon // Update the individual test cases as needed: Skip test cases that would otherwise run. var testCases = new List(); - var platformJustification = theoryAttribute.GetNamedArgument(nameof(TheoryAttribute.PlatformJustification)); + var platformJustification = theoryAttribute.GetNamedArgument("PlatformJustification"); var skipReason = String.Format(platformJustification, platforms.ToString().Replace(", ", " | "), Platform); foreach (var baseCase in baseCases) { diff --git a/tools/WebStack.settings.targets b/tools/WebStack.settings.targets index b8728ff1..024219d6 100644 --- a/tools/WebStack.settings.targets +++ b/tools/WebStack.settings.targets @@ -36,6 +36,9 @@ v4.5 + + 5 + true true