Skip to content

Moving to version 18 #15209

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

Merged
merged 8 commits into from
Jul 15, 2025
Merged
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
13 changes: 2 additions & 11 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@
</PropertyGroup>

<PropertyGroup>
<!--
This version is read by vsts-prebuild.ps1 and is a base for the current version, this should be updated at the start of
new iteration to the goal number. This is also used to version the local packages. This version needs to be statically
readable when we read the file as xml, don't move it to a .props file, unless you change the build server process
-->
<TPVersionPrefix>17.10.0</TPVersionPrefix>
<!--
Versioning is defined from the build script. Use a default dev build if it's not defined.
Sets the AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion
-->
<Version Condition="'$(Version)' == ''">$(TPVersionPrefix)-dev</Version>
<!-- Override the AssemblyVersion as 15.0.0 since protocol depends on this version for serialization. This is also defined in build script. -->
<AssemblyVersion Condition="'$(AssemblyVersion)' == ''">15.0.0</AssemblyVersion>
<!-- Auto generating binding redirects breaks testhost when running under net8.0 vstest.console as .NET Framework net462. -->
Expand Down Expand Up @@ -147,6 +136,8 @@
<TestRunnerName>MSTest</TestRunnerName>
<!-- Skip windows only tests on non-windows systems. -->
<TestRunnerAdditionalArguments Condition=" '$(OS)' != 'Windows_NT' ">$(TestRunnerAdditionalArguments) --filter "TestCategory!=Windows&amp;TestCategory!=Windows-Review"</TestRunnerAdditionalArguments>
<!-- Do not capture test output on CI to help community see errors -->
<TestCaptureOutput Condition=" '$(ContinuousIntegrationBuild)' == 'true' ">false</TestCaptureOutput>
</PropertyGroup>

</Project>
9 changes: 5 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from appending +<commitId>, which breaks DTAAgent.
-->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<VersionPrefix>17.15.0</VersionPrefix>
<VersionPrefix>18.0.0</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
</PropertyGroup>
<PropertyGroup Label="Arcade settings">
Expand Down Expand Up @@ -57,7 +57,7 @@
Make sure you are taking a version from a release branch (rel/d*) in VS. Otherwise there won't be symbols for the dlls in package,
a and it will create a symcheck bug on re-insertion into VS.
-->
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>17.13.35723.115</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>18.0.0-preview-1-10811-208</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
<MicrosoftVisualStudioEnterpriseAspNetHelper>$(MicrosoftVisualStudioDiagnosticsUtilitiesVersion)</MicrosoftVisualStudioEnterpriseAspNetHelper>
<MicrosoftVisualStudioInteropVersion>17.13.39960</MicrosoftVisualStudioInteropVersion>
<MicrosoftVSTelemetryVersion>17.13.24</MicrosoftVSTelemetryVersion>
Expand All @@ -69,8 +69,9 @@
<SystemComponentModelCompositionVersion>8.0.0</SystemComponentModelCompositionVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
<TestPlatformExternalsVersion>17.10.0-preview-2-34602-162</TestPlatformExternalsVersion>
<MicrosoftInternalTestPlatformExtensions>17.10.0-preview-2-34602-162</MicrosoftInternalTestPlatformExtensions>
<!-- <TestPlatformExternalsVersion>18.0.0-preview-1-10804-064</TestPlatformExternalsVersion> -->
<TestPlatformExternalsVersion>18.0.0-preview-1-10811-208</TestPlatformExternalsVersion>
<MicrosoftInternalTestPlatformExtensions>18.0.0-preview-1-10811-208</MicrosoftInternalTestPlatformExtensions>
<TestPlatformMSDiaVersion>17.12.35519.223</TestPlatformMSDiaVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.1.0</SystemRuntimeCompilerServicesUnsafeVersion>
Expand Down
12 changes: 6 additions & 6 deletions src/testhost.x86/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.TestWindow.Interfaces" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="11.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
<bindingRedirect oldVersion="11.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.UnitTestFramework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="10.1.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Resource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.ControllerObject" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.ExecutionCommon" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<!-- Microsoft.Extensions.DependencyModel depends on version 9.0.0, and newer versions of that nuget don't support all the frameworks we need anymore. -->
Expand Down
4 changes: 2 additions & 2 deletions src/vstest.console/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<!-- Test adapters compiled against version 11-14, need to be redirected to version 15. -->
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.TestPlatform.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="11.0.0.0-14.0.0.0" newVersion="15.0.0.0" />
<bindingRedirect oldVersion="11.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-16.0.0.0" newVersion="17.0.0.0" />
<bindingRedirect oldVersion="10.0.0.0-18.0.0.0" newVersion="18.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<!-- Microsoft.Extensions.DependencyModel depends on version 9.0.0, and newer versions of that nuget don't support all the frameworks we need anymore. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static void ClassInit(TestContext _)

[TestMethod]
[TestCategory("Windows-Review")]
[Ignore("Code Coverage is using 17.x.x dependency, will be solved in other PR. https://github.com/microsoft/vstest/issues/15223")]
[NetFullTargetFrameworkDataSourceAttribute(useCoreRunner: false)]
[NetCoreTargetFrameworkDataSourceAttribute(useCoreRunner: false)]
public void RunMultipleTestAssembliesWithCodeCoverage(RunnerInfo runnerInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ public void RunTestsWithCustomTestHostLauncherUsesLaunchWhenGivenAnOutdatedITest
[TestMethod]
[TestCategory("Windows-Review")]
[TestCategory("Feature")]
[RunnerCompatibilityDataSource(AfterFeature = Features.MULTI_TFM)]
// "Just row" used here because mstest does not cooperate with older versions of vstest.console correctly, so we test with just the latest version available..
[RunnerCompatibilityDataSource(AfterFeature = Features.MULTI_TFM, JustRow = 0)]
public void RunAllTestsWithMixedTFMsWillProvideAdditionalInformationToTheDebugger(RunnerInfo runnerInfo)
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void RunTestsWithRunSettingsWithParallel(RunnerInfo runnerInfo)
[TestMethod]
[TestCategory("Windows-Review")]
[NetFullTargetFrameworkDataSource()]
public void RunTestsWithTestSettings(RunnerInfo runnerInfo)
public void RunTestsWithTestSettingsInTpv2(RunnerInfo runnerInfo)
{
SetTestEnvironment(_testEnvironment, runnerInfo);
ExecuteNotSupportedRunnerFrameworkTests(runnerInfo.RunnerFramework, NetFramework, Message);
Expand Down Expand Up @@ -130,6 +130,72 @@ public void RunTestsWithTestSettings(RunnerInfo runnerInfo)
Assert.AreEqual(1, _runEventHandler.TestResults.Count(t => t.Outcome == TestOutcome.Skipped));
}

[TestMethod]
[TestCategory("Windows-Review")]
[NetFullTargetFrameworkDataSource()]
public void RunTestsWithTestSettingsInTpv0(RunnerInfo runnerInfo)
{
SetTestEnvironment(_testEnvironment, runnerInfo);
ExecuteNotSupportedRunnerFrameworkTests(runnerInfo.RunnerFramework, NetFramework, Message);
Setup();

var testSettingsXml = """
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="VS19 repro." id="9b2f344b-e089-447e-8ed6-5e333b0a0361" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>This is a default test run configuration for a local test run.</Description>
<Deployment>
<DeploymentItem filename="UnitTest1.cs" />
</Deployment>
<Execution hostProcessPlatform="MSIL">
<Hosts skipUnhostableTests="false">
<AspNet name="ASP.NET" executionType="WebDev" />
<VSSDKTestHostRunConfig name="VS IDE" HiveKind="DevEnv" HiveName="10.0" xmlns="http://microsoft.com/schemas/VisualStudio/SDK/Tools/IdeHostAdapter/2006/06" />
</Hosts>
<Timeouts runTimeout="3540000" testTimeout="2400000" />
<TestTypeSpecific>
<WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
<Browser name="Internet Explorer 6.0">
<Headers>
<Header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" />
<Header name="Accept" value="*/*" />
<Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
<Header name="Accept-Encoding" value="GZIP" />
</Headers>
</Browser>
</WebTestRunConfiguration>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
<RuntimeResolution>
<Directory path="%HOMEDRIVE%\t\UnitTestProject5\UnitTestProject5\bin\Debug" includeSubDirectories="true" />
</RuntimeResolution>
</AssemblyResolution>
</UnitTestRunConfig>
</TestTypeSpecific>
<AgentRule name="LocalMachineDefaultRole">
</AgentRule>
</Execution>
<Properties />
</TestSettings>
""";

var testsettingsFile = Path.Combine(TempDirectory.Path, "tempsettings.testsettings");

File.WriteAllText(testsettingsFile, testSettingsXml, Encoding.UTF8);

var source = GetAssetFullPath("MstestV1UnitTestProject.dll");

InvokeVsTestForExecution(source, null, runnerInfo.TargetFramework, runSettings: testsettingsFile, null);

// Assert
// Ensure that we are actually running via TPv0 provider.
StringAssert.Contains(StdOutWithWhiteSpace, "The test execution was delegated to legacy TestPlatform runner");

ValidateSummaryStatus(2, 2, 1);
ExitCodeEquals(1); // failing tests
StdErrHasTestRunFailedMessageButNoOtherError();
}

[TestMethod]
[NetFullTargetFrameworkDataSource]
[NetCoreTargetFrameworkDataSource]
Expand Down