Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
2e9e5ef
Migrate Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests to MSTest.Sdk o…
Evangelink Jun 18, 2026
283c29d
Merge remote-tracking branch 'fork/evangelink/mstest-testframework-fo…
Evangelink Jun 18, 2026
f5872e8
Merge origin/main into evangelink/mstest-mtp-blazoraot-tests
Jun 19, 2026
a5a86d8
Merge remote-tracking branch 'origin/main' into evangelink/mstest-mtp…
Evangelink Jun 22, 2026
5a0ae19
Migrate remaining StaticWebAssets.Tests files to MSTest
Copilot Jun 22, 2026
bf569ec
Merge branch 'main' into evangelink/mstest-mtp-blazoraot-tests
Evangelink Jun 22, 2026
0318219
Merge remote-tracking branch 'origin/main' into evangelink/mstest-mtp…
Evangelink Jun 22, 2026
023640c
Migrate GenerateStaticWebAssetsManifestMultiThreadingTest to MSTest
Evangelink Jun 22, 2026
d1d9bf4
Remove spurious blank lines introduced during MSTest migration
Jun 22, 2026
f3a760c
Merge branch 'main' into evangelink/mstest-mtp-blazoraot-tests
Evangelink Jun 22, 2026
8f3bf74
Fix CI build break: restore MSTest attributes in TransientSdkResoluti…
Evangelink Jun 23, 2026
3d7cc05
Fully serialize StaticWebAssets tests (MSTestParallelizeScope=None)
Evangelink Jun 23, 2026
c0d29be
Merge branch 'main' into evangelink/mstest-mtp-blazoraot-tests
Evangelink Jun 25, 2026
347b5ec
Merge branch 'main' into evangelink/mstest-mtp-blazoraot-tests
Evangelink Jun 25, 2026
d280d99
Remove duplicate using directives in TypeScriptIntegrationTest
Evangelink Jun 25, 2026
75a8f71
Merge remote-tracking branch 'origin/main' into pr54862-fix
Evangelink Jun 26, 2026
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
@@ -1,4 +1,4 @@
<Project Sdk="MSTest.Sdk">
<Project Sdk="MSTest.Sdk">

<PropertyGroup>
<EnableDefaultItems>false</EnableDefaultItems>
Expand All @@ -9,6 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<PackageId>testSdkBlazorWasmAoT</PackageId>
<BuildHelixPayload Condition="'$(RunAoTTests)' != 'true'">false</BuildHelixPayload>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

using System.Runtime.CompilerServices;
using Microsoft.NET.Sdk.BlazorWebAssembly.Tests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static Microsoft.NET.Sdk.BlazorWebAssembly.Tests.ServiceWorkerAssert;

namespace Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ public void Build50Hosted_Works()

[TestMethod]
[CoreMSBuildOnly]
// https://github.com/dotnet/sdk/issues/49665
[OSCondition(ConditionMode.Exclude, OperatingSystems.OSX)]
[OSCondition(ConditionMode.Exclude, OperatingSystems.OSX)] // https://github.com/dotnet/sdk/issues/49665
public void Publish50Hosted_Works()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public void Build60Hosted_Works()
[TestMethod]
[OSCondition(OperatingSystems.Windows)]
[RequiresMSBuildVersion("17.13")]
[Ignore("https://github.com/dotnet/sdk/issues/49925")] // https://github.com/dotnet/sdk/issues/44886
// https://github.com/dotnet/sdk/issues/42145
[Ignore("https://github.com/dotnet/sdk/issues/49925")] // https://github.com/dotnet/sdk/issues/44886, https://github.com/dotnet/sdk/issues/42145
public void Publish60Hosted_Works()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

using System.Text.Json;
using Microsoft.NET.Sdk.WebAssembly;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.NET.Sdk.BlazorWebAssembly.Tests
{
[TestClass]
Expand Down Expand Up @@ -273,4 +273,4 @@ public void Build_SatelliteAssembliesFileIsDeleted_IfAllSatelliteFilesAreRemoved
satelliteResources.Should().BeNull();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
using System.Text.Json;
using Microsoft.NET.Sdk.WebAssembly;
using static Microsoft.NET.Sdk.BlazorWebAssembly.Tests.ServiceWorkerAssert;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.NET.Sdk.BlazorWebAssembly.Tests
{
[TestClass]
public class WasmPublishIntegrationTest : WasmPublishIntegrationTestBase
{

[TestMethod]

[RequiresMSBuildVersion("17.12")]
public void Publish_MinimalApp_Works()
{
Expand Down Expand Up @@ -1697,4 +1697,4 @@ public static DirectoryInfo GetOutputDirectory(this DotnetPublishCommand command
return new DirectoryInfo(Path.Combine(baseDirectory.FullName, "publish"));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
using System.Text.Json;
using System.Text.RegularExpressions;
using static Microsoft.NET.Sdk.BlazorWebAssembly.Tests.ServiceWorkerAssert;
using Microsoft.VisualStudio.TestTools.UnitTesting;


using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Microsoft.NET.Sdk.BlazorWebAssembly.Tests
{
[TestClass]
Expand Down Expand Up @@ -247,4 +247,4 @@ public void Publish_DeterministicAcrossBuilds_WhenNoSourcesChange()
updatedCapture.Should().Be(capture);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.IO.Compression;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.AspNetCore.StaticWebAssets.Tasks;
using Microsoft.Build.Framework;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Text.Json;
using System.Xml.Linq;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.NET.TestFramework.Commands;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.IO.Compression;
using System.Text.Json;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Xml.Linq;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Xml.Linq;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using Microsoft.NET.TestFramework.Commands;
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;


namespace Microsoft.NET.Sdk.StaticWebAssets.Tests
{
[TestCategory("NugetIsolation")]
Expand All @@ -18,13 +16,14 @@ namespace Microsoft.NET.Sdk.StaticWebAssets.Tests
public abstract class IsolatedNuGetPackageFolderAspNetSdkBaselineTest : AspNetSdkBaselineTest
{
protected abstract string RestoreNugetPackagePath { get; }

private string? _cachePath;
protected override string GetNuGetCachePath() =>
_cachePath ??= Path.GetFullPath(Path.Combine(SdkTestContext.Current.TestExecutionDirectory, Shorten(RestoreNugetPackagePath)));

private static string Shorten(string restoreNugetPackagePath) =>
restoreNugetPackagePath
.Replace("IntegrationTest", string.Empty, StringComparison.OrdinalIgnoreCase)
.Replace("Tests", string.Empty, StringComparison.OrdinalIgnoreCase);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.AspNetCore.StaticWebAssets.Tasks;

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
using Microsoft.AspNetCore.StaticWebAssets.Tasks;

using Microsoft.NET.TestFramework;

using Microsoft.NET.TestFramework.Commands;

using Microsoft.NET.TestFramework.Assertions;

using Microsoft.NET.TestFramework.Utilities;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
</PropertyGroup>

<!-- These integration tests share on-disk test asset directories and NuGet caches across
test methods (for example via the BuildFrameworkAssetsConsumer helper), so they must run
sequentially. Under xUnit this was enforced by
[assembly: CollectionBehavior(DisableTestParallelization = true)]. Override the repo-wide
MethodLevel default (test/Directory.Build.props) so MSTest.Sdk emits [assembly: DoNotParallelize]. -->
<PropertyGroup>
<!-- These tests were authored for xUnit with assembly-wide parallelization disabled
([assembly: CollectionBehavior(DisableTestParallelization = true)]). They are not parallel-safe:
many integration tests in the same class share fixed test asset directories (e.g. helpers like
BuildFrameworkAssetsConsumer reuse the same [CallerMemberName]-derived path), and several task
tests mutate the process-global current directory via Directory.SetCurrentDirectory. Running any
of them concurrently causes file-in-use, file-already-exists, missing-metadata, and deleted-cwd
(GetCwd) races. Override the repo-wide MethodLevel default with None, which emits
[assembly: DoNotParallelize] to preserve the original fully-serialized semantics. -->
<MSTestParallelizeScope>None</MSTestParallelizeScope>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Text.Json;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Diagnostics.Eventing.Reader;
using System.Globalization;
using System.Text.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Globalization;
using System.Text.Json;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;
Expand All @@ -19,7 +18,6 @@
namespace Microsoft.NET.Sdk.StaticWebAssets.Tests.StaticWebAssets;

[TestClass]

public class ApplyCompressionNegotiationTest
{
[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Moq;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests
{
[TestClass]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.AspNetCore.StaticWebAssets.Tasks.Utils;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
Expand All @@ -17,7 +16,6 @@
namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

[TestClass]

public class AssetToCompressTest : IDisposable
{
private readonly string _testDirectory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Microsoft.Build.Utilities;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.NET.Sdk.Razor.Test
{
[TestClass]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.AspNetCore.StaticWebAssets.Tasks;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
Expand All @@ -17,7 +16,6 @@
namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

[TestClass]

public class ComputeEndpointsForReferenceStaticWebAssetsMultiThreadingTest
{
[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Microsoft.AspNetCore.StaticWebAssets.Tasks;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
Expand All @@ -17,7 +16,6 @@
namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

[TestClass]

public class ComputeEndpointsForReferenceStaticWebAssetsTest
{
[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable disable

using Microsoft.NET.TestFramework;
using Microsoft.NET.TestFramework.Commands;
using Microsoft.NET.TestFramework.Assertions;
Expand All @@ -13,6 +14,7 @@

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests
{
[DoNotParallelize]
[TestClass]
public class ComputeReferenceStaticWebAssetItemsTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Text.Json;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;
using Microsoft.Build.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Microsoft.Build.Utilities;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.NET.Sdk.Razor.Test
{
[TestClass]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
using Microsoft.Build.Utilities;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.NET.Sdk.StaticWebAssets.Tests.StaticWebAssets;

[TestClass]

public class ContentTypeProviderTests
{
private readonly TaskLoggingHelper _log = new TestTaskLoggingHelper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.NET.TestFramework.Assertions;
using Microsoft.NET.TestFramework.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Diagnostics.Metrics;
using System.Diagnostics;
using Microsoft.AspNetCore.StaticWebAssets.Tasks;
Expand All @@ -22,7 +21,6 @@
namespace Microsoft.NET.Sdk.StaticWebAssets.Tests;

[TestClass]

public class DefineStaticWebAssetEndpointsTest
{
[TestMethod]
Expand Down
Loading
Loading