Skip to content

Commit f385308

Browse files
committed
Pass "--debug:ephemeral-hive" to "dotnet new"
1 parent 4e21e92 commit f385308

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

AspNetCoreSdkTests/Util/DotNetUtil.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ public static string New(string template, string workingDirectory)
5959
// Clear all packages sources by default. May be overridden by NuGetPackageSource parameter.
6060
File.WriteAllText(Path.Combine(workingDirectory, "NuGet.config"), _clearPackageSourcesNuGetConfig);
6161

62-
return RunDotNet($"new {template} --name {template} --output . --no-restore", workingDirectory);
62+
// Pass "--debug:ephemeral-hive" to build template contents in-memory, rather than using the default
63+
// "%UserProfile%\.templateengine" cache, which may be out-of-date when testing newer builds with the same version.
64+
return RunDotNet($"new {template} --name {template} --output . --no-restore --debug:ephemeral-hive", workingDirectory);
6365
}
6466

6567
public static string Restore(string workingDirectory, NuGetPackageSource packageSource, RuntimeIdentifier runtimeIdentifier)

0 commit comments

Comments
 (0)