diff --git a/test/dotnet.Tests/CommandTests/Run/RunFileTests.cs b/test/dotnet.Tests/CommandTests/Run/RunFileTests.cs index 54c5c8454936..80bacf3a0b33 100644 --- a/test/dotnet.Tests/CommandTests/Run/RunFileTests.cs +++ b/test/dotnet.Tests/CommandTests/Run/RunFileTests.cs @@ -2545,9 +2545,9 @@ public void ProjectReference_Errors() [Theory] // https://github.com/dotnet/aspnetcore/issues/63440 [InlineData(true, null)] - [InlineData(false, null, Skip = "Needs https://github.com/dotnet/aspnetcore/pull/63496")] + [InlineData(false, null)] [InlineData(true, "test-id")] - [InlineData(false, "test-id", Skip = "Needs https://github.com/dotnet/aspnetcore/pull/63496")] + [InlineData(false, "test-id")] public void UserSecrets(bool useIdArg, string? userSecretsId) { var testInstance = _testAssetsManager.CreateTestDirectory(); @@ -2569,6 +2569,10 @@ public void UserSecrets(bool useIdArg, string? userSecretsId) var programPath = Path.Join(testInstance.Path, "Program.cs"); File.WriteAllText(programPath, code); + // Remove artifacts from possible previous runs of this test. + var artifactsDir = VirtualProjectBuildingCommand.GetArtifactsPath(programPath); + if (Directory.Exists(artifactsDir)) Directory.Delete(artifactsDir, recursive: true); + if (useIdArg) { if (userSecretsId == null)