Skip to content

fix template tests for SDK 5.0.401 #37011

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

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "5.0.207"
"version": "5.0.401"
},
"tools": {
"dotnet": "5.0.207",
"dotnet": "5.0.401",
"runtimes": {
"dotnet/x64": [
"2.1.30",
Expand Down
7 changes: 5 additions & 2 deletions src/ProjectTemplates/Shared/TemplatePackageInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,12 @@ private static async Task VerifyCannotFindTemplateAsync(ITestOutputHelper output
{
var proc = await RunDotNetNew(output, $"\"{templateName}\"");

if (!proc.Output.Contains("Couldn't find an installed template that matches the input, searching online for one that does..."))
if (!proc.Error.Contains($"No templates found matching: '{templateName}'."))
{
throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found. " +
$"Process exit code:{proc.ExitCode}" +
$"StdOut:{proc.Output}." +
$"StdErr:{proc.Error}");
}
}
finally
Expand Down