From 715f1f6a104779d88efaeb54730cbde4155ff911 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 27 Sep 2016 16:29:56 -0700 Subject: [PATCH] Addressing code review comments. --- .../TestProjects/MSBuildTestApp/MSBuildTestApp.csproj | 1 - .../dotnet-new/CSharp_MSBuild/$projectName$.csproj | 4 ++-- src/dotnet/commands/dotnet-new/Program.cs | 7 +++---- test/EndToEnd/GivenDotNetUsesMSBuild.cs | 1 + test/dotnet-run3.Tests/GivenDotnetRun3RunsCsProj.cs | 2 ++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj index 14605e2de..3c75d48dc 100644 --- a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj +++ b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj @@ -5,7 +5,6 @@ Exe netcoreapp1.0 - bin\$(Configuration) diff --git a/src/dotnet/commands/dotnet-new/CSharp_MSBuild/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_MSBuild/$projectName$.csproj index 740dafd34..1cb4f8e21 100644 --- a/src/dotnet/commands/dotnet-new/CSharp_MSBuild/$projectName$.csproj +++ b/src/dotnet/commands/dotnet-new/CSharp_MSBuild/$projectName$.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/dotnet/commands/dotnet-new/Program.cs b/src/dotnet/commands/dotnet-new/Program.cs index 396253a46..29a2ea7a2 100644 --- a/src/dotnet/commands/dotnet-new/Program.cs +++ b/src/dotnet/commands/dotnet-new/Program.cs @@ -94,12 +94,11 @@ namespace Microsoft.DotNet.Tools.New private static void ReplaceProjectJsonTemplateValues(string projectDirectory) { string projectJsonFile = Path.Combine(projectDirectory, "project.json"); + string projectJsonTemplateFile = Path.Combine(projectDirectory, "project.json.template"); - if(File.Exists(Path.Combine(projectDirectory, "project.json.template"))) + if(File.Exists(projectJsonTemplateFile)) { - File.Move( - Path.Combine(projectDirectory, "project.json.template"), - projectJsonFile); + File.Move(projectJsonTemplateFile, projectJsonFile); } } diff --git a/test/EndToEnd/GivenDotNetUsesMSBuild.cs b/test/EndToEnd/GivenDotNetUsesMSBuild.cs index d0767a870..063944301 100644 --- a/test/EndToEnd/GivenDotNetUsesMSBuild.cs +++ b/test/EndToEnd/GivenDotNetUsesMSBuild.cs @@ -33,6 +33,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd .Should() .Pass(); + //TODO: https://github.com/dotnet/sdk/issues/187 - remove framework from below. new Run3Command() .WithWorkingDirectory(projectDirectory) .ExecuteWithCapturedOutput("--framework netcoreapp1.0") diff --git a/test/dotnet-run3.Tests/GivenDotnetRun3RunsCsProj.cs b/test/dotnet-run3.Tests/GivenDotnetRun3RunsCsProj.cs index a756f1a5d..62183ef9e 100644 --- a/test/dotnet-run3.Tests/GivenDotnetRun3RunsCsProj.cs +++ b/test/dotnet-run3.Tests/GivenDotnetRun3RunsCsProj.cs @@ -29,6 +29,7 @@ namespace Microsoft.DotNet.Cli.Run3.Tests .Should() .Pass(); + //TODO: https://github.com/dotnet/sdk/issues/187 - remove framework from below. new Run3Command() .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput("--framework netcoreapp1.0") @@ -53,6 +54,7 @@ namespace Microsoft.DotNet.Cli.Run3.Tests .Should() .Pass(); + //TODO: https://github.com/dotnet/sdk/issues/187 - remove framework from below. new Run3Command() .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput("--framework netcoreapp1.0")