diff --git a/eng/Workarounds.targets b/eng/Workarounds.targets index 62ecd5baee..32f68d1bc3 100644 --- a/eng/Workarounds.targets +++ b/eng/Workarounds.targets @@ -9,7 +9,7 @@ diff --git a/eng/tools/BaselineGenerator/BaselineGenerator.csproj b/eng/tools/BaselineGenerator/BaselineGenerator.csproj index 143b3063d7..082a9eaf02 100644 --- a/eng/tools/BaselineGenerator/BaselineGenerator.csproj +++ b/eng/tools/BaselineGenerator/BaselineGenerator.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + $(DefaultNetCoreTargetFramework) -s https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json $(MSBuildThisFileDirectory)../../ diff --git a/eng/tools/RepoTasks/RepoTasks.csproj b/eng/tools/RepoTasks/RepoTasks.csproj index a954207698..5bef776106 100644 --- a/eng/tools/RepoTasks/RepoTasks.csproj +++ b/eng/tools/RepoTasks/RepoTasks.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + $(DefaultNetCoreTargetFramework) $(TargetFrameworks);net472 $(DefineConstants);BUILD_MSI_TASKS false @@ -16,7 +16,7 @@ - + diff --git a/src/Components/Components.sln b/src/Components/Components.sln index b95bba6f44..046fc0b7ca 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -210,10 +210,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Signal EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Http.Connections.Client", "..\SignalR\clients\csharp\Http.Connections.Client\src\Microsoft.AspNetCore.Http.Connections.Client.csproj", "{F88118E1-6F4A-4F89-B047-5FFD2889B9F0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor", "Ignitor\src\Ignitor.csproj", "{A78CE874-76B7-46FE-8009-1ED5258BA0AA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor.Test", "Ignitor\test\Ignitor.Test.csproj", "{FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.HttpClient", "Blazor\Http\src\Microsoft.AspNetCore.Blazor.HttpClient.csproj", "{74D21785-2FAB-4266-B7C4-E311EC8EE0DF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.HttpClient.Tests", "Blazor\Http\test\Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj", "{E4C01A3F-D3C1-4639-A6A9-930E918843DD}" @@ -238,7 +234,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.HttpsP EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorServerApp", "Samples\BlazorServerApp\BlazorServerApp.csproj", "{BBF37AF9-8290-4B70-8BA8-0F6017B3B620}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ignitor", "Ignitor", "{29B5A306-7273-4649-8B04-26234D71ADBD}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ignitor", "Ignitor", "{BDE2397D-C53A-4783-8B3A-1F54F48A6926}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor", "Ignitor\src\Ignitor.csproj", "{CD0EF85C-4187-4515-A355-E5A0D4485F40}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor.Test", "Ignitor\test\Ignitor.Test.csproj", "{F31E8118-014E-4CCE-8A48-5282F7B9BB3E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -1354,30 +1354,6 @@ Global {F88118E1-6F4A-4F89-B047-5FFD2889B9F0}.Release|x64.Build.0 = Release|Any CPU {F88118E1-6F4A-4F89-B047-5FFD2889B9F0}.Release|x86.ActiveCfg = Release|Any CPU {F88118E1-6F4A-4F89-B047-5FFD2889B9F0}.Release|x86.Build.0 = Release|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Debug|x64.ActiveCfg = Debug|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Debug|x64.Build.0 = Debug|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Debug|x86.ActiveCfg = Debug|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Debug|x86.Build.0 = Debug|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Release|Any CPU.Build.0 = Release|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Release|x64.ActiveCfg = Release|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Release|x64.Build.0 = Release|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Release|x86.ActiveCfg = Release|Any CPU - {A78CE874-76B7-46FE-8009-1ED5258BA0AA}.Release|x86.Build.0 = Release|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Debug|x64.ActiveCfg = Debug|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Debug|x64.Build.0 = Debug|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Debug|x86.ActiveCfg = Debug|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Debug|x86.Build.0 = Debug|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Release|Any CPU.Build.0 = Release|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Release|x64.ActiveCfg = Release|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Release|x64.Build.0 = Release|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Release|x86.ActiveCfg = Release|Any CPU - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA}.Release|x86.Build.0 = Release|Any CPU {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|Any CPU.Build.0 = Debug|Any CPU {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1486,6 +1462,30 @@ Global {BBF37AF9-8290-4B70-8BA8-0F6017B3B620}.Release|x64.Build.0 = Release|Any CPU {BBF37AF9-8290-4B70-8BA8-0F6017B3B620}.Release|x86.ActiveCfg = Release|Any CPU {BBF37AF9-8290-4B70-8BA8-0F6017B3B620}.Release|x86.Build.0 = Release|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Debug|x64.ActiveCfg = Debug|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Debug|x64.Build.0 = Debug|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Debug|x86.ActiveCfg = Debug|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Debug|x86.Build.0 = Debug|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Release|Any CPU.Build.0 = Release|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Release|x64.ActiveCfg = Release|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Release|x64.Build.0 = Release|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Release|x86.ActiveCfg = Release|Any CPU + {CD0EF85C-4187-4515-A355-E5A0D4485F40}.Release|x86.Build.0 = Release|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Debug|x64.ActiveCfg = Debug|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Debug|x64.Build.0 = Debug|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Debug|x86.ActiveCfg = Debug|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Debug|x86.Build.0 = Debug|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|Any CPU.Build.0 = Release|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|x64.ActiveCfg = Release|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|x64.Build.0 = Release|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|x86.ActiveCfg = Release|Any CPU + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1585,8 +1585,6 @@ Global {DA137BD4-F7F1-4D53-855F-5EC40CEA36B0} = {2FC10057-7A0A-4E34-8302-879925BC0102} {0CDAB70B-71DC-43BE-ACB7-AD2EE3541FFB} = {2FC10057-7A0A-4E34-8302-879925BC0102} {F88118E1-6F4A-4F89-B047-5FFD2889B9F0} = {2FC10057-7A0A-4E34-8302-879925BC0102} - {A78CE874-76B7-46FE-8009-1ED5258BA0AA} = {29B5A306-7273-4649-8B04-26234D71ADBD} - {FC2A1EB0-A116-4689-92B7-239B1DCCF4CA} = {29B5A306-7273-4649-8B04-26234D71ADBD} {74D21785-2FAB-4266-B7C4-E311EC8EE0DF} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {E4C01A3F-D3C1-4639-A6A9-930E918843DD} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684} = {A27FF193-195B-4474-8E6C-840B2E339373} @@ -1596,6 +1594,8 @@ Global {173D84A3-0F37-480F-AC0F-7E2DBBE32B28} = {B0EEB429-4C8C-42AA-8822-3058E7DBC98F} {4664276D-606A-4BB3-873A-9EE84FB22877} = {2FC10057-7A0A-4E34-8302-879925BC0102} {BBF37AF9-8290-4B70-8BA8-0F6017B3B620} = {46E4300C-5726-4108-B9A2-18BB94EB26ED} + {CD0EF85C-4187-4515-A355-E5A0D4485F40} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926} + {F31E8118-014E-4CCE-8A48-5282F7B9BB3E} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE} diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf index 846c918116..ce01e6468f 100644 --- a/src/Components/ComponentsNoDeps.slnf +++ b/src/Components/ComponentsNoDeps.slnf @@ -26,17 +26,17 @@ "Components\\test\\Microsoft.AspNetCore.Components.Tests.csproj", "Forms\\src\\Microsoft.AspNetCore.Components.Forms.csproj", "Forms\\test\\Microsoft.AspNetCore.Components.Forms.Tests.csproj", - "Samples\\BlazorServer.Sample\\BlazorServer.Sample.csproj", + "Ignitor\\src\\Ignitor.csproj", + "Ignitor\\test\\Ignitor.Test.csproj", + "Samples\\BlazorServerApp\\BlazorServerApp.csproj", "Server\\src\\Microsoft.AspNetCore.Components.Server.csproj", "Server\\test\\Microsoft.AspNetCore.Components.Server.Tests.csproj", "Web\\src\\Microsoft.AspNetCore.Components.Web.csproj", "Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj", "test\\E2ETest\\Microsoft.AspNetCore.Components.E2ETests.csproj", - "test\\Ignitor.Test\\Ignitor.Test.csproj", "test\\testassets\\BasicTestApp\\BasicTestApp.csproj", - "test\\testassets\\Ignitor\\Ignitor.csproj", "test\\testassets\\TestContentPackage\\TestContentPackage.csproj", "test\\testassets\\TestServer\\Components.TestServer.csproj" ] } -} +} \ No newline at end of file diff --git a/src/Components/Web/src/Routing/NavLink.cs b/src/Components/Web/src/Routing/NavLink.cs index 516f81d8aa..cb3e68a2d4 100644 --- a/src/Components/Web/src/Routing/NavLink.cs +++ b/src/Components/Web/src/Routing/NavLink.cs @@ -109,6 +109,11 @@ namespace Microsoft.AspNetCore.Components.Routing private bool ShouldMatch(string currentUriAbsolute) { + if (_hrefAbsolute == null) + { + return false; + } + if (EqualsHrefExactlyOrIfTrailingSlashAdded(currentUriAbsolute)) { return true; diff --git a/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor b/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor index cf5031eb11..b2addca14b 100644 --- a/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor +++ b/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor @@ -20,6 +20,7 @@
  • With more parameters
  • Long page 1
  • Long page 2
  • +
  • Null href never matches
  • + } else diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor index f2f9098007..842ef1f6bc 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor @@ -7,7 +7,7 @@
    - About + About
    diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor index 9b5407d03b..74820a0b75 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor @@ -6,7 +6,7 @@
    - About + About
    diff --git a/src/ProjectTemplates/test/BlazorServerTemplateTest.cs b/src/ProjectTemplates/test/BlazorServerTemplateTest.cs index bf9fe12f2c..463b710ac3 100644 --- a/src/ProjectTemplates/test/BlazorServerTemplateTest.cs +++ b/src/ProjectTemplates/test/BlazorServerTemplateTest.cs @@ -36,7 +36,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -93,7 +93,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs b/src/ProjectTemplates/test/EmptyWebTemplateTest.cs index 64f5d8cf3e..56e2e8c105 100644 --- a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs +++ b/src/ProjectTemplates/test/EmptyWebTemplateTest.cs @@ -22,10 +22,19 @@ namespace Templates.Test public ITestOutputHelper Output { get; } - [Theory] - [InlineData(null)] - [InlineData("F#")] - public async Task EmptyWebTemplateAsync(string languageOverride) + [Fact] + public async Task EmptyWebTemplateCSharp() + { + await EmtpyTemplateCore(languageOverride: null); + } + + [Fact] + public async Task EmptyWebTemplateFSharp() + { + await EmtpyTemplateCore("F#"); + } + + private async Task EmtpyTemplateCore(string languageOverride) { Project = await ProjectFactory.GetOrCreateProject("empty" + (languageOverride == "F#" ? "fsharp" : "csharp"), Output); @@ -36,7 +45,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/Helpers/AspNetProcess.cs b/src/ProjectTemplates/test/Helpers/AspNetProcess.cs index cb071dc8f3..deb0c199d2 100644 --- a/src/ProjectTemplates/test/Helpers/AspNetProcess.cs +++ b/src/ProjectTemplates/test/Helpers/AspNetProcess.cs @@ -58,7 +58,7 @@ namespace Templates.Test.Helpers var arguments = published ? $"exec {dllPath}" : "run"; Process = ProcessEx.Run(output, workingDirectory, DotNetMuxer.MuxerPathOrDefault(), arguments, envVars: environmentVariables); - if(hasListeningUri) + if (hasListeningUri) { ListeningUri = GetListeningUri(output); } @@ -108,7 +108,7 @@ namespace Templates.Test.Helpers HttpMethod.Get, new Uri(ListeningUri, page.Url)); - var response = await _httpClient.SendAsync(request); + var response = await RequestWithRetries(client => client.SendAsync(request), _httpClient); Assert.Equal(HttpStatusCode.OK, response.StatusCode); var parser = new HtmlParser(); @@ -141,7 +141,7 @@ namespace Templates.Test.Helpers Assert.True(string.Equals(anchor.Href, expectedLink), $"Expected next link to be {expectedLink} but it was {anchor.Href}."); var result = await RetryHelper.RetryRequest(async () => { - return await _httpClient.GetAsync(anchor.Href); + return await RequestWithRetries(client => client.GetAsync(anchor.Href), _httpClient); }, logger: NullLogger.Instance); Assert.True(IsSuccessStatusCode(result), $"{anchor.Href} is a broken link!"); @@ -149,6 +149,28 @@ namespace Templates.Test.Helpers } } + private async Task RequestWithRetries(Func> requester, HttpClient client, int retries = 3, TimeSpan initialDelay = default) + { + var currentDelay = initialDelay == default ? TimeSpan.FromSeconds(30) : initialDelay; + for (int i = 0; i <= retries; i++) + { + try + { + return await requester(client); + } + catch (Exception) + { + if (i == retries) + { + throw; + } + await Task.Delay(currentDelay); + currentDelay *= 2; + } + } + throw new InvalidOperationException("Max retries reached."); + } + private Uri GetListeningUri(ITestOutputHelper output) { // Wait until the app is accepting HTTP requests @@ -190,7 +212,7 @@ namespace Templates.Test.Helpers internal Task SendRequest(string path) { - return _httpClient.GetAsync(new Uri(ListeningUri, path)); + return RequestWithRetries(client => client.GetAsync(new Uri(ListeningUri, path)), _httpClient); } public async Task AssertStatusCode(string requestUrl, HttpStatusCode statusCode, string acceptContentType = null) @@ -204,7 +226,7 @@ namespace Templates.Test.Helpers request.Headers.Add("Accept", acceptContentType); } - var response = await _httpClient.SendAsync(request); + var response = await RequestWithRetries(client => client.SendAsync(request), _httpClient); Assert.True(statusCode == response.StatusCode, $"Expected {requestUrl} to have status '{statusCode}' but it was '{response.StatusCode}'."); } diff --git a/src/ProjectTemplates/test/IdentityUIPackageTest.cs b/src/ProjectTemplates/test/IdentityUIPackageTest.cs index 204c560859..deede64521 100644 --- a/src/ProjectTemplates/test/IdentityUIPackageTest.cs +++ b/src/ProjectTemplates/test/IdentityUIPackageTest.cs @@ -134,7 +134,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(packageOptions: packageOptions); diff --git a/src/ProjectTemplates/test/MvcTemplateTest.cs b/src/ProjectTemplates/test/MvcTemplateTest.cs index 95f6ce784a..9ebaf1afc6 100644 --- a/src/ProjectTemplates/test/MvcTemplateTest.cs +++ b/src/ProjectTemplates/test/MvcTemplateTest.cs @@ -25,11 +25,14 @@ namespace Templates.Test public ProjectFactoryFixture ProjectFactory { get; } public ITestOutputHelper Output { get; } - [Theory] - [InlineData(null)] - [InlineData("F#")] - [Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2267", FlakyOn.All)] - public async Task MvcTemplate_NoAuthImplAsync(string languageOverride) + [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/14022")] + public async Task MvcTemplate_NoAuthFSharp() => await MvcTemplateCore(languageOverride: "F#"); + + [Fact] + public async Task MvcTemplate_NoAuthCSharp() => await MvcTemplateCore(languageOverride: null); + + + private async Task MvcTemplateCore(string languageOverride) { Project = await ProjectFactory.GetOrCreateProject("mvcnoauth" + (languageOverride == "F#" ? "fsharp" : "csharp"), Output); @@ -48,7 +51,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -98,8 +101,7 @@ namespace Templates.Test [Theory] [InlineData(true)] [InlineData(false)] - [Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2267", FlakyOn.All)] - public async Task MvcTemplate_IndividualAuthImplAsync(bool useLocalDB) + public async Task MvcTemplate_IndividualAuth(bool useLocalDB) { Project = await ProjectFactory.GetOrCreateProject("mvcindividual" + (useLocalDB ? "uld" : ""), Output); @@ -116,7 +118,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs b/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs index 8186ab4156..0d02a56f8f 100644 --- a/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs +++ b/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs @@ -33,7 +33,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -52,7 +52,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/RazorPagesTemplateTest.cs b/src/ProjectTemplates/test/RazorPagesTemplateTest.cs index 637d7179b5..7cd41d56b2 100644 --- a/src/ProjectTemplates/test/RazorPagesTemplateTest.cs +++ b/src/ProjectTemplates/test/RazorPagesTemplateTest.cs @@ -26,8 +26,7 @@ namespace Templates.Test public ITestOutputHelper Output { get; } [Fact] - [Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2327", FlakyOn.All)] - public async Task RazorPagesTemplate_NoAuthImplAsync() + public async Task RazorPagesTemplate_NoAuth() { Project = await ProjectFactory.GetOrCreateProject("razorpagesnoauth", Output); @@ -45,7 +44,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, createResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -95,10 +94,9 @@ namespace Templates.Test } [Theory] - [Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2335", FlakyOn.All)] [InlineData(false)] [InlineData(true)] - public async Task RazorPagesTemplate_IndividualAuthImplAsync(bool useLocalDB) + public async Task RazorPagesTemplate_IndividualAuth(bool useLocalDB) { Project = await ProjectFactory.GetOrCreateProject("razorpagesindividual" + (useLocalDB ? "uld" : ""), Output); @@ -115,7 +113,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs b/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs index 700349b773..1826b5a4eb 100644 --- a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs +++ b/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs @@ -76,7 +76,7 @@ namespace Templates.Test.SpaTemplateTest Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. using var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/WebApiTemplateTest.cs b/src/ProjectTemplates/test/WebApiTemplateTest.cs index 8e08db9068..89d047a06e 100644 --- a/src/ProjectTemplates/test/WebApiTemplateTest.cs +++ b/src/ProjectTemplates/test/WebApiTemplateTest.cs @@ -22,10 +22,13 @@ namespace Templates.Test public Project Project { get; set; } - [Theory] - [InlineData(null)] - [InlineData("F#")] - public async Task WebApiTemplateAsync(string languageOverride) + [Fact] + public async Task WebApiTemplateFSharp() => await WebApiTemplateCore(languageOverride: "F#"); + + [Fact] + public async Task WebApiTemplateCSharp() => await WebApiTemplateCore(languageOverride: null); + + private async Task WebApiTemplateCore(string languageOverride) { Project = await FactoryFixture.GetOrCreateProject("webapi" + (languageOverride == "F#" ? "fsharp" : "csharp"), Output); @@ -36,7 +39,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/WorkerTemplateTest.cs b/src/ProjectTemplates/test/WorkerTemplateTest.cs index fbe88be770..738eafc61d 100644 --- a/src/ProjectTemplates/test/WorkerTemplateTest.cs +++ b/src/ProjectTemplates/test/WorkerTemplateTest.cs @@ -32,7 +32,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.1/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs b/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs index 4206ab8f22..e408a22b69 100644 --- a/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs +++ b/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs @@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS // Start timer StartTimer(); - // For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/netcoreapp3.1/ + // For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/netcoreappX.Y/ // and contentRoot points to the project directory so you get things like static assets. // For a published app both point to the publish directory. var dllRoot = CheckIfPublishIsRequired(); diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs index ef54b75288..d5c2c1fefb 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs @@ -155,7 +155,8 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports var memory = _application.Output.GetMemory(); var receiveResult = await socket.ReceiveAsync(memory, token); - // Need to check again for netcoreapp3.1 because a close can happen between a 0-byte read and the actual read + + // Need to check again for netcoreapp3.0 and later because a close can happen between a 0-byte read and the actual read if (receiveResult.MessageType == WebSocketMessageType.Close) { return; diff --git a/src/Tools/Microsoft.dotnet-openapi/test/OpenApiAddFileTests.cs b/src/Tools/Microsoft.dotnet-openapi/test/OpenApiAddFileTests.cs index a75f78abe1..e4a17878fc 100644 --- a/src/Tools/Microsoft.dotnet-openapi/test/OpenApiAddFileTests.cs +++ b/src/Tools/Microsoft.dotnet-openapi/test/OpenApiAddFileTests.cs @@ -134,7 +134,7 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests Assert.Single(openApiRefs); } - [Fact (Skip = "https://github.com/aspnet/AspNetCore/pull/13571/#issuecomment-531466801")] + [Fact] public async Task OpenApi_Add_NSwagTypeScript() { var project = CreateBasicProject(withOpenApi: true); @@ -155,20 +155,9 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests Assert.Contains("", content); } - - // Build project and make sure it compiles - using var buildProc = ProcessEx.Run(_outputHelper, _tempDir.Root, "dotnet", "build"); - await buildProc.Exited; - Assert.True(buildProc.ExitCode == 0, $"Build failed: {buildProc.Output}"); - - - // Run project and make sure it doesn't crash - using var runProc = ProcessEx.Run(_outputHelper, _tempDir.Root, "dotnet", "run"); - Thread.Sleep(100); - Assert.False(runProc.HasExited, $"Run failed with: {runProc.Output}"); } - [Fact (Skip = "https://github.com/aspnet/AspNetCore/pull/13571/#issuecomment-531466801")] + [Fact] public async Task OpenApi_Add_FromJson() { var project = CreateBasicProject(withOpenApi: true); @@ -189,16 +178,6 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests Assert.Contains("