Skip to content
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
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "6.0.100-preview.6.21313.2"
"version": "6.0.100-preview.7.21324.2"
},
"tools": {
"dotnet": "6.0.100-preview.6.21313.2",
"dotnet": "6.0.100-preview.7.21324.2",
"runtimes": {
"dotnet/x64": [
"2.1.27",
Expand Down
2 changes: 0 additions & 2 deletions src/ProjectTemplates/Shared/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ internal async Task<ProcessResult> RunDotNetNewAsync(
Directory.Delete(TemplateOutputDir, recursive: true);
}

// Temporary while investigating why this process occasionally never runs or exits on Debian 9
environmentVariables.Add("COREHOST_TRACE", "1");
using var execution = ProcessEx.Run(Output, AppContext.BaseDirectory, DotNetMuxer.MuxerPathOrDefault(), argString, environmentVariables);
await execution.Exited;
return new ProcessResult(execution);
Expand Down
4 changes: 2 additions & 2 deletions src/ProjectTemplates/Shared/TemplatePackageInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ private static async Task InstallTemplatePackages(ITestOutputHelper output)

private static async Task VerifyCanFindTemplate(ITestOutputHelper output, string templateName)
{
var proc = await RunDotNetNew(output, $"");
if (!proc.Output.Contains($" {templateName} "))
var proc = await RunDotNetNew(output, $"--list");
if (!(proc.Output.Contains($" {templateName} ") || proc.Output.Contains($",{templateName}") || proc.Output.Contains($"{templateName},")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you quickly summarize why these lines in the installer need to change❔ For example has a bare dotnet new command been deprecated at the same time the output format changed❔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example has a bare dotnet new command been deprecated at the same time the output format changed❔

No clue, I'm testing to see if that's the case by using --list.

The first part with checking commas is because dotnet new now displays all "short names" for the template. Might be able to clean it up a bit, but again, doing exploratory testing here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. I don't remember a breaking change notification but the output might not be something we should really rely on. @KathleenDollard who should we loop in here❔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like --list worked, now just failing on some restore issues.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old dotnet new output would list all templates it looks like, new dotnet new lists a predetermined list of "common templates".

Looks like a very deliberate change, so I think our reaction to add --list is fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the ors I added can be removed now that --list is used

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, I checked and it was displaying templates the way your are testing them. For me the --list would just display a new prompt, and then the same table as before without the --list.

{
throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}.");
}
Expand Down