Move the temp folder under the project root
- Makes it easier to find it - Works for .NET Framework when changing the app base - There seems to be a problem when quitting the child process with Ctrl + C
This commit is contained in:
parent
91acc03a13
commit
2f64f62e67
1 changed files with 4 additions and 3 deletions
|
@ -85,8 +85,9 @@ namespace Microsoft.DotNet.Tools.Run
|
||||||
{
|
{
|
||||||
CalculateDefaultsForNonAssigned();
|
CalculateDefaultsForNonAssigned();
|
||||||
|
|
||||||
// Create a temporary directory
|
// Create a temporary directory under the project root
|
||||||
var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
|
// REVIEW: MAX_PATH?
|
||||||
|
var tempDir = Path.Combine(_context.ProjectDirectory, "bin", ".dotnetrun", Guid.NewGuid().ToString("N"));
|
||||||
|
|
||||||
// Compile to that directory
|
// Compile to that directory
|
||||||
var result = Command.Create($"dotnet-compile", $"--output \"{tempDir}\" --temp-output \"{tempDir}\" --framework \"{_context.TargetFramework}\" --configuration \"{Configuration}\" {_context.ProjectFile.ProjectDirectory}")
|
var result = Command.Create($"dotnet-compile", $"--output \"{tempDir}\" --temp-output \"{tempDir}\" --framework \"{_context.TargetFramework}\" --configuration \"{Configuration}\" {_context.ProjectFile.ProjectDirectory}")
|
||||||
|
@ -136,7 +137,7 @@ namespace Microsoft.DotNet.Tools.Run
|
||||||
.ForwardStdErr()
|
.ForwardStdErr()
|
||||||
.EnvironmentVariable("DOTNET_HOME", runtime)
|
.EnvironmentVariable("DOTNET_HOME", runtime)
|
||||||
.Execute();
|
.Execute();
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
if (!PreserveTemporary)
|
if (!PreserveTemporary)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue