Removing project.json from msbuild template and msbuild test app.
This commit is contained in:
parent
bbf9fe92cf
commit
2bbef9328b
9 changed files with 83 additions and 45 deletions
|
@ -4,14 +4,21 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
|
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
|
||||||
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
|
|
||||||
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
|
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" />
|
<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>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft.CSharp.targets" />
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -12,8 +12,7 @@
|
||||||
"type": "platform",
|
"type": "platform",
|
||||||
"version": "1.0.1"
|
"version": "1.0.1"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"imports": "dnxcore50"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,21 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
|
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
|
||||||
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" Exclude="$(GlobalExclude)" />
|
<Compile Include="**\*.cs" Exclude="$(GlobalExclude)" />
|
||||||
<EmbeddedResource Include="**\*.resx" 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>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,11 +16,16 @@ namespace Microsoft.DotNet.Cli.Build3.Tests
|
||||||
{
|
{
|
||||||
var testAppName = "MSBuildTestApp";
|
var testAppName = "MSBuildTestApp";
|
||||||
var testInstance = TestAssetsManager
|
var testInstance = TestAssetsManager
|
||||||
.CreateTestInstance(testAppName)
|
.CreateTestInstance(testAppName);
|
||||||
.WithLockFiles();
|
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.TestRoot;
|
var testProjectDirectory = testInstance.TestRoot;
|
||||||
|
|
||||||
|
new Restore3Command()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
new Build3Command()
|
new Build3Command()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.Execute()
|
.Execute()
|
||||||
|
|
|
@ -16,11 +16,16 @@ namespace Microsoft.DotNet.Cli.Publish3.Tests
|
||||||
{
|
{
|
||||||
var testAppName = "MSBuildTestApp";
|
var testAppName = "MSBuildTestApp";
|
||||||
var testInstance = TestAssetsManager
|
var testInstance = TestAssetsManager
|
||||||
.CreateTestInstance(testAppName)
|
.CreateTestInstance(testAppName);
|
||||||
.WithLockFiles();
|
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.TestRoot;
|
var testProjectDirectory = testInstance.TestRoot;
|
||||||
|
|
||||||
|
new Restore3Command()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
new Publish3Command()
|
new Publish3Command()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.Execute()
|
.Execute()
|
||||||
|
|
|
@ -13,11 +13,16 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
|
||||||
{
|
{
|
||||||
var testAppName = "MSBuildTestApp";
|
var testAppName = "MSBuildTestApp";
|
||||||
var testInstance = TestAssetsManager
|
var testInstance = TestAssetsManager
|
||||||
.CreateTestInstance(testAppName)
|
.CreateTestInstance(testAppName);
|
||||||
.WithLockFiles();
|
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.TestRoot;
|
var testProjectDirectory = testInstance.TestRoot;
|
||||||
|
|
||||||
|
new Restore3Command()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
new Build3Command()
|
new Build3Command()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.Execute()
|
.Execute()
|
||||||
|
@ -38,11 +43,16 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
|
||||||
{
|
{
|
||||||
var testAppName = "MSBuildTestApp";
|
var testAppName = "MSBuildTestApp";
|
||||||
var testInstance = TestAssetsManager
|
var testInstance = TestAssetsManager
|
||||||
.CreateTestInstance(testAppName)
|
.CreateTestInstance(testAppName);
|
||||||
.WithLockFiles();
|
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.TestRoot;
|
var testProjectDirectory = testInstance.TestRoot;
|
||||||
|
|
||||||
|
new Restore3Command()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
new Run3Command()
|
new Run3Command()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.ExecuteWithCapturedOutput()
|
.ExecuteWithCapturedOutput()
|
||||||
|
@ -57,11 +67,16 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
|
||||||
{
|
{
|
||||||
var testAppName = "MSBuildTestApp";
|
var testAppName = "MSBuildTestApp";
|
||||||
var testInstance = TestAssetsManager
|
var testInstance = TestAssetsManager
|
||||||
.CreateTestInstance(testAppName)
|
.CreateTestInstance(testAppName);
|
||||||
.WithLockFiles();
|
|
||||||
|
|
||||||
var testProjectDirectory = testInstance.TestRoot;
|
var testProjectDirectory = testInstance.TestRoot;
|
||||||
|
|
||||||
|
new Restore3Command()
|
||||||
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
|
.Execute()
|
||||||
|
.Should()
|
||||||
|
.Pass();
|
||||||
|
|
||||||
new Run3Command()
|
new Run3Command()
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
|
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue