Removing project.json from msbuild template and msbuild test app.

This commit is contained in:
Livar Cunha 2016-09-27 14:41:06 -07:00
parent bbf9fe92cf
commit 2bbef9328b
9 changed files with 83 additions and 45 deletions

View file

@ -4,14 +4,21 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.Sdk">
<Version>1.0.0-alpha-20160927-2</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft.CSharp.targets" />

View file

@ -1,13 +0,0 @@
{
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.Sdk": "1.0.0-alpha-20160923-4",
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
}
}
}
}
}

View file

@ -12,8 +12,7 @@
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}
}

View file

@ -3,14 +3,21 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" Exclude="$(GlobalExclude)" />
<EmbeddedResource Include="**\*.resx" Exclude="$(GlobalExclude)" />
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.Sdk">
<Version>1.0.0-alpha-20160927-2</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -1,14 +0,0 @@
{
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.Sdk": "1.0.0-alpha-20160923-4",
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
}
}
}
}

View file

@ -0,0 +1,27 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public sealed class Restore3Command : TestCommand
{
public Restore3Command()
: base("dotnet")
{
}
public override CommandResult Execute(string args = "")
{
args = $"restore3 {args}";
return base.Execute(args);
}
public override CommandResult ExecuteWithCapturedOutput(string args = "")
{
args = $"restore3 {args}";
return base.ExecuteWithCapturedOutput(args);
}
}
}

View file

@ -16,11 +16,16 @@ namespace Microsoft.DotNet.Cli.Build3.Tests
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssetsManager
.CreateTestInstance(testAppName)
.WithLockFiles();
.CreateTestInstance(testAppName);
var testProjectDirectory = testInstance.TestRoot;
new Restore3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
new Build3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()

View file

@ -16,11 +16,16 @@ namespace Microsoft.DotNet.Cli.Publish3.Tests
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssetsManager
.CreateTestInstance(testAppName)
.WithLockFiles();
.CreateTestInstance(testAppName);
var testProjectDirectory = testInstance.TestRoot;
new Restore3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
new Publish3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()

View file

@ -13,11 +13,16 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssetsManager
.CreateTestInstance(testAppName)
.WithLockFiles();
.CreateTestInstance(testAppName);
var testProjectDirectory = testInstance.TestRoot;
new Restore3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
new Build3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
@ -38,11 +43,16 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssetsManager
.CreateTestInstance(testAppName)
.WithLockFiles();
.CreateTestInstance(testAppName);
var testProjectDirectory = testInstance.TestRoot;
new Restore3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
new Run3Command()
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput()
@ -57,11 +67,16 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssetsManager
.CreateTestInstance(testAppName)
.WithLockFiles();
.CreateTestInstance(testAppName);
var testProjectDirectory = testInstance.TestRoot;
new Restore3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
new Run3Command()
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")