Updating tests to reflect msbuild projects running without project.json.

This commit is contained in:
Livar Cunha 2016-09-27 15:38:59 -07:00
parent 2bbef9328b
commit c41b35f06f
5 changed files with 12 additions and 9 deletions

View file

@ -5,7 +5,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
<OutputPath>bin\$(Configuration)</OutputPath>
</PropertyGroup>
<ItemGroup>

View file

@ -95,9 +95,12 @@ namespace Microsoft.DotNet.Tools.New
{
string projectJsonFile = Path.Combine(projectDirectory, "project.json");
File.Move(
Path.Combine(projectDirectory, "project.json.template"),
projectJsonFile);
if(File.Exists(Path.Combine(projectDirectory, "project.json.template")))
{
File.Move(
Path.Combine(projectDirectory, "project.json.template"),
projectJsonFile);
}
}
private static void ReplaceFileTemplateNames(string projectDirectory)

View file

@ -21,7 +21,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
.Should()
.Pass();
new RestoreCommand()
new Restore3Command()
.WithWorkingDirectory(projectDirectory)
.Execute()
.Should()
@ -35,7 +35,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
new Run3Command()
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput()
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
.Should()
.Pass()
.And

View file

@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli.Publish3.Tests
new Publish3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Execute("--framework netcoreapp1.0")
.Should()
.Pass();

View file

@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
new Run3Command()
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput()
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
.Should()
.Pass()
.And
@ -55,7 +55,7 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
new Run3Command()
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput()
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
.Should()
.Pass()
.And