diff --git a/Directory.Build.props b/Directory.Build.props
index 00aba0cf52..c278a8c6fa 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -64,12 +64,6 @@
net462
netcoreapp3.1
-
- $(NetMinimum)
diff --git a/Directory.Build.targets b/Directory.Build.targets
index aca11f2f1a..b720568ba0 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -3,20 +3,12 @@
-
-
- $(NetPrevious);$(NetCurrent)
-
-
-
-
- $(NetCurrent)
+
+
+
+ $(NetCurrent)
+
+ $(NetCurrent)
diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml
index 626a455cd2..447adc0a46 100644
--- a/eng/SourceBuildPrebuiltBaseline.xml
+++ b/eng/SourceBuildPrebuiltBaseline.xml
@@ -14,8 +14,5 @@
-
-
-
diff --git a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj
index c29921073e..c545bf659f 100644
--- a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj
+++ b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.csproj
@@ -2,18 +2,30 @@
+ 2.0.0
Microsoft.TestPlatform.Build
netstandard2.0
false
true
+
+
+
+ $(NetCurrent)
+
+
+
+
+ netstandard2.0
+
+
+
+
true
- Microsoft.TestPlatform.Build.nuspec
- Microsoft.TestPlatform.Build.sourcebuild.nuspec
- Microsoft.TestPlatform.Build.sourcebuild.product.nuspec
+ Microsoft.TestPlatform.Build.nuspec
$(OutputPath)
Microsoft.TestPlatform.Build
vstest visual-studio unittest testplatform mstest microsoft test testing
@@ -24,16 +36,15 @@
+
+
+
+
-
-
-
-
-
PreserveNewest
diff --git a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.nuspec b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.nuspec
index c529c32611..b0146e98f4 100644
--- a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.nuspec
+++ b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.nuspec
@@ -4,29 +4,29 @@
$CommonMetadataElements$
-
+
$CommonFileElements$
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.sourcebuild.nuspec b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.sourcebuild.nuspec
deleted file mode 100644
index cfafc21c32..0000000000
--- a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.sourcebuild.nuspec
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- $CommonMetadataElements$
-
-
-
-
-
-
-
-
- $CommonFileElements$
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.sourcebuild.product.nuspec b/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.sourcebuild.product.nuspec
deleted file mode 100644
index 8b9103e2aa..0000000000
--- a/src/Microsoft.TestPlatform.Build/Microsoft.TestPlatform.Build.sourcebuild.product.nuspec
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- $CommonMetadataElements$
-
-
-
-
-
-
-
- $CommonFileElements$
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Microsoft.TestPlatform.Extensions.BlameDataCollector.csproj b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Microsoft.TestPlatform.Extensions.BlameDataCollector.csproj
index f90dc4e6fe..6626ad639f 100644
--- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Microsoft.TestPlatform.Extensions.BlameDataCollector.csproj
+++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/Microsoft.TestPlatform.Extensions.BlameDataCollector.csproj
@@ -30,7 +30,7 @@
-
+
diff --git a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj
index c799309c56..151698d011 100644
--- a/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj
+++ b/src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.csproj
@@ -1,6 +1,6 @@
- netstandard2.0
+ netstandard2.0
diff --git a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj b/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj
index f80380cb74..823b26d472 100644
--- a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj
+++ b/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.csproj
@@ -3,12 +3,22 @@
$(NetCoreAppMinimum);$(NetFrameworkMinimum);net47;net471;net472;net48
+
+
+
+ Microsoft.TestPlatform.CLI.sourcebuild.nuspec
+
+
+
+
+ Microsoft.TestPlatform.CLI.nuspec
+
+
+
+
- Microsoft.TestPlatform.CLI.nuspec
- Microsoft.TestPlatform.CLI.sourcebuild.nuspec
- Microsoft.TestPlatform.CLI.sourcebuild.product.nuspec
- true
+ true
false
$(OutputPath)
Microsoft.TestPlatform.CLI
@@ -23,8 +33,7 @@
-
-
+
diff --git a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.sourcebuild.nuspec b/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.sourcebuild.nuspec
index 3f1469375e..efb992c36b 100644
--- a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.sourcebuild.nuspec
+++ b/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.sourcebuild.nuspec
@@ -13,100 +13,250 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.sourcebuild.product.nuspec b/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.sourcebuild.product.nuspec
deleted file mode 100644
index 5541bce3eb..0000000000
--- a/src/package/Microsoft.TestPlatform.CLI/Microsoft.TestPlatform.CLI.sourcebuild.product.nuspec
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
- $CommonMetadataElements$
-
-
-
-
-
-
- $CommonFileElements$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/package/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI.csproj b/src/package/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI.csproj
index f711b8068a..2dceda5955 100644
--- a/src/package/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI.csproj
+++ b/src/package/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI.csproj
@@ -3,7 +3,7 @@
Library
true
- $(NetFrameworkMinimum)
+ $(NetFrameworkMinimum)
None
diff --git a/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogDataCollectorTests.cs b/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogDataCollectorTests.cs
index abf09de509..4afa9a62c4 100644
--- a/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogDataCollectorTests.cs
+++ b/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogDataCollectorTests.cs
@@ -103,7 +103,6 @@ public void InitializeShouldInitializeDefaultEventLogNames()
_eventLogDataCollector.Initialize(null, _mockDataCollectionEvents.Object, _mockDataCollectionSink, _mockDataCollectionLogger.Object, _dataCollectionEnvironmentContext);
- Assert.IsNotNull(_eventLogDataCollector.EventLogNames);
CollectionAssert.AreEqual(eventLogNames, _eventLogDataCollector.EventLogNames.ToList());
}
@@ -124,7 +123,6 @@ public void InitializeShouldInitializeCustomEventLogNamesIfSpecifiedInConfigurat
_eventLogDataCollector.Initialize(expectedXmlDoc.DocumentElement, _mockDataCollectionEvents.Object, _mockDataCollectionSink, _mockDataCollectionLogger.Object, _dataCollectionEnvironmentContext);
- Assert.IsNotNull(_eventLogDataCollector.EventLogNames);
CollectionAssert.AreEqual(eventLogNames, _eventLogDataCollector.EventLogNames.ToList());
}
@@ -140,7 +138,6 @@ public void InitializeShouldInitializeDefaultLogEntryTypes()
_eventLogDataCollector.Initialize(null, _mockDataCollectionEvents.Object, _mockDataCollectionSink, _mockDataCollectionLogger.Object, _dataCollectionEnvironmentContext);
- Assert.IsNotNull(_eventLogDataCollector.EntryTypes);
CollectionAssert.AreEqual(entryTypes, _eventLogDataCollector.EntryTypes.ToList());
}
@@ -159,7 +156,6 @@ public void InitializeShouldInitializeEntryTypesIfSpecifiedInConfiguration()
expectedXmlDoc.LoadXml(configurationString);
_eventLogDataCollector.Initialize(expectedXmlDoc.DocumentElement, _mockDataCollectionEvents.Object, _mockDataCollectionSink, _mockDataCollectionLogger.Object, _dataCollectionEnvironmentContext);
- Assert.IsNotNull(_eventLogDataCollector.EntryTypes);
CollectionAssert.AreEqual(entryTypes, _eventLogDataCollector.EntryTypes.ToList());
}
@@ -178,7 +174,6 @@ public void InitializeShouldInitializeEventSourcesIfSpecifiedInConfiguration()
expectedXmlDoc.LoadXml(configurationString);
_eventLogDataCollector.Initialize(expectedXmlDoc.DocumentElement, _mockDataCollectionEvents.Object, _mockDataCollectionSink, _mockDataCollectionLogger.Object, _dataCollectionEnvironmentContext);
- Assert.IsNotNull(_eventLogDataCollector.EventSources);
CollectionAssert.AreEqual(eventSources, _eventLogDataCollector.EventSources.ToList());
}
diff --git a/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogXmlWriterTests.cs b/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogXmlWriterTests.cs
index a9bd34e617..4c1f6e622b 100644
--- a/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogXmlWriterTests.cs
+++ b/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/EventLogXmlWriterTests.cs
@@ -44,7 +44,7 @@ public void WriteEventLogEntriesToXmlFileShouldWriteLogEntryIfPresent()
// because otherwise the raw message and the message used to call WriteAllTextToFile won't match. E.g.
// api-version=2020-07-01&format=json in raw message, becomes
// api-version=2020-07-01&format=json in the xml file.
- var serializedMessage = new XElement("t", eventLogEntry.Message).LastNode!.ToString();
+ var serializedMessage = new XElement("t", eventLogEntry.Message).LastNode.ToString();
mockFileHelper.Verify(x => x.WriteAllTextToFile(FileName, It.Is(str => str.Contains(serializedMessage))));
}
diff --git a/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests.csproj b/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests.csproj
index eea478833c..757c0a874e 100644
--- a/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests.csproj
+++ b/test/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests/Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests.csproj
@@ -10,16 +10,19 @@
Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests
-
net48
Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests
-
+
+
+
+
+
diff --git a/test/Intent.Primitives/Intent.Primitives.csproj b/test/Intent.Primitives/Intent.Primitives.csproj
index e251c464ae..132c02c59c 100644
--- a/test/Intent.Primitives/Intent.Primitives.csproj
+++ b/test/Intent.Primitives/Intent.Primitives.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0
enable
enable
diff --git a/test/Intent/Intent.csproj b/test/Intent/Intent.csproj
index 45d0d9ea94..bb711c9256 100644
--- a/test/Intent/Intent.csproj
+++ b/test/Intent/Intent.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net6.0
enable
enable
diff --git a/test/SettingsMigrator.UnitTests/MigratorTests.cs b/test/SettingsMigrator.UnitTests/MigratorTests.cs
index 7ee4dfc83b..2608bc891f 100644
--- a/test/SettingsMigrator.UnitTests/MigratorTests.cs
+++ b/test/SettingsMigrator.UnitTests/MigratorTests.cs
@@ -56,9 +56,7 @@ public void MigratorGeneratesCorrectRunsettingsForEmbeddedTestSettings()
{
var doc = new XmlDocument();
doc.LoadXml(OldRunSettings);
- Assert.IsNotNull(doc.DocumentElement);
var settingsnode = doc.DocumentElement.SelectSingleNode(@"/RunSettings/MSTest/SettingsFile");
- Assert.IsNotNull(settingsnode);
settingsnode.InnerText = _oldTestsettingsPath;
File.WriteAllText(_oldRunsettingsPath, doc.InnerXml);
@@ -90,9 +88,7 @@ public void MigratorGeneratesCorrectRunsettingsWithDc()
var document = new XmlDocument();
document.Load(reader);
var root = document.DocumentElement;
- Assert.IsNotNull(root);
var dataCollectorNode = root.SelectNodes(@"/RunSettings/DataCollectionRunSettings/DataCollectors/DataCollector");
- Assert.IsNotNull(dataCollectorNode);
Assert.AreEqual(2, dataCollectorNode.Count, "Data collector is missing");
}
@@ -137,7 +133,6 @@ private static void Validate(string newRunsettingsPath)
var document = new XmlDocument();
document.Load(reader);
var root = document.DocumentElement;
- Assert.IsNotNull(root);
Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/WebTestRunConfiguration/Browser/Headers/Header"), "There should be a WebTestRunConfiguration node");
Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/LegacySettings"), "There should be a LegacySettings node");
@@ -145,9 +140,8 @@ private static void Validate(string newRunsettingsPath)
var scriptNode = root.SelectSingleNode(@"/RunSettings/LegacySettings/Scripts");
Assert.IsNotNull(scriptNode, "There should be a WebTestRunConfiguration node");
- Assert.IsNotNull(scriptNode.Attributes);
- Assert.AreEqual(".\\setup.bat", scriptNode.Attributes["setupScript"]!.Value, "setupScript does not match.");
- Assert.AreEqual(".\\cleanup.bat", scriptNode.Attributes["cleanupScript"]!.Value, "cleanupScript does not match.");
+ Assert.AreEqual(".\\setup.bat", scriptNode.Attributes["setupScript"].Value, "setupScript does not match.");
+ Assert.AreEqual(".\\cleanup.bat", scriptNode.Attributes["cleanupScript"].Value, "cleanupScript does not match.");
var forcedLegacyNode = root.SelectSingleNode(@"/RunSettings/MSTest/ForcedLegacyMode");
Assert.IsNotNull(forcedLegacyNode, "ForcedLegacy node should be present");
@@ -155,16 +149,14 @@ private static void Validate(string newRunsettingsPath)
var executionNode = root.SelectSingleNode(@" / RunSettings/LegacySettings/Execution");
Assert.IsNotNull(executionNode, "There should be a Execution node");
- Assert.IsNotNull(executionNode.Attributes);
- Assert.AreEqual("2", executionNode.Attributes["parallelTestCount"]!.Value, "parallelTestCount value does not match.");
- Assert.AreEqual("MSIL", executionNode.Attributes["hostProcessPlatform"]!.Value, "hostProcessPlatform value does not match.");
+ Assert.AreEqual("2", executionNode.Attributes["parallelTestCount"].Value, "parallelTestCount value does not match.");
+ Assert.AreEqual("MSIL", executionNode.Attributes["hostProcessPlatform"].Value, "hostProcessPlatform value does not match.");
Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/LegacySettings/Execution/Hosts"), "There should be a Hosts node");
var timeoutNode = root.SelectSingleNode(@"/RunSettings/LegacySettings/Execution/Timeouts");
Assert.IsNotNull(timeoutNode, "There should be a Timeouts node");
- Assert.IsNotNull(timeoutNode.Attributes);
- Assert.AreEqual("120000", timeoutNode.Attributes["testTimeout"]!.Value, "testTimeout value does not match.");
+ Assert.AreEqual("120000", timeoutNode.Attributes["testTimeout"].Value, "testTimeout value does not match.");
Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/LegacySettings/Execution/TestTypeSpecific/UnitTestRunConfig/AssemblyResolution/TestDirectory"), "There should be a Assembly resolution node");
@@ -174,7 +166,6 @@ private static void Validate(string newRunsettingsPath)
var dataCollectorNode = root.SelectSingleNode(@"/RunSettings/DataCollectionRunSettings/DataCollectors/DataCollector");
Assert.IsNotNull(dataCollectorNode, "There should be a DataCollector node");
- Assert.IsNotNull(dataCollectorNode.Attributes);
- Assert.AreEqual("Event Log", dataCollectorNode.Attributes["friendlyName"]!.Value, "Data collector does not match.");
+ Assert.AreEqual("Event Log", dataCollectorNode.Attributes["friendlyName"].Value, "Data collector does not match.");
}
}
diff --git a/test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj b/test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj
index e1eb198f26..cca7290825 100644
--- a/test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj
+++ b/test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj
@@ -8,19 +8,24 @@
- net48
+ net48
SettingsMigrator.UnitTests
-
-
+
+
+
+
+
+
+