Merge branch 'master' into merges/release/2.0.0-to-master-20170907-070027
This commit is contained in:
commit
a8dd209359
359 changed files with 3255 additions and 1755 deletions
|
@ -1,5 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
|
@ -15,16 +14,17 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrecompileScript"
|
||||
BeforeTargets="Build"
|
||||
Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
||||
<Exec Command="$(DotnetInOutputDirectory) publish ../ArgumentsReflector/ArgumentsReflector.csproj --output $(MSBuildThisFileDirectory)/$(OutputPath)" />
|
||||
|
||||
<Exec Command="$(PreviousStageDotnet) publish ../ArgumentsReflector/ArgumentsReflector.csproj --output $(OutputPath)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
<Import Project="..\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -22,10 +20,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit.netcore.extensions" Version="1.0.0-prerelease-00206" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
{
|
||||
string projectDirectory = directory.Path;
|
||||
|
||||
string newArgs = "console -f netcoreapp2.0 --debug:ephemeral-hive --no-restore";
|
||||
string newArgs = "console -f netcoreapp2.1 --debug:ephemeral-hive --no-restore";
|
||||
new NewCommandShim()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute(newArgs)
|
||||
|
@ -112,7 +112,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
|||
new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.ExecuteWithCapturedOutput(
|
||||
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp2.0 portable")
|
||||
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp2.1 portable")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello Portable World!");;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net46</TargetFramework>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
|
@ -17,8 +15,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.1.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Deployment.WindowsInstaller" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
param(
|
||||
[string]$InputMsi,
|
||||
[string]$DotnetDir
|
||||
[string]$DotnetDir,
|
||||
[string]$TestDir
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\..\..\scripts\common\_common.ps1"
|
||||
|
@ -37,7 +38,7 @@ if(!(Test-Path $inputMsi))
|
|||
|
||||
$testName = "Microsoft.DotNet.Cli.Msi.Tests"
|
||||
$testProj="$PSScriptRoot\$testName\$testName.csproj"
|
||||
$testBin="$RepoRoot\artifacts\tests\$testName"
|
||||
$testBin="$TestDir\$testName"
|
||||
|
||||
pushd "$DotnetDir"
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -21,9 +19,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -8,6 +8,7 @@ using Microsoft.DotNet.TestFramework;
|
|||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using NuGet.Frameworks;
|
||||
using Xunit;
|
||||
using Microsoft.DotNet.Tools.Tests.Utilities;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Utils.Tests
|
||||
{
|
||||
|
@ -189,7 +190,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
.Should().Pass();
|
||||
|
||||
var factory = new ProjectDependenciesCommandFactory(
|
||||
FrameworkConstants.CommonFrameworks.NetCoreApp20,
|
||||
NuGetFrameworks.NetCoreApp21,
|
||||
configuration,
|
||||
null,
|
||||
null,
|
||||
|
@ -198,7 +199,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
var command = factory.Create("dotnet-tool-with-output-name", null);
|
||||
|
||||
command.CommandArgs.Should().Contain(
|
||||
Path.Combine("toolwithoutputname", "1.0.0", "lib", "netcoreapp2.0", "dotnet-tool-with-output-name.dll"));
|
||||
Path.Combine("toolwithoutputname", "1.0.0", "lib", "netcoreapp2.1", "dotnet-tool-with-output-name.dll"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ using Microsoft.DotNet.TestFramework;
|
|||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using NuGet.Frameworks;
|
||||
using Xunit;
|
||||
using Microsoft.DotNet.Tools.Tests.Utilities;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Utils.Tests
|
||||
{
|
||||
|
@ -47,7 +48,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "dotnet-portable",
|
||||
Configuration = "Debug",
|
||||
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
|
||||
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp20
|
||||
Framework = NuGetFrameworks.NetCoreApp21
|
||||
};
|
||||
|
||||
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
|
||||
|
@ -83,7 +84,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "dotnet-portable",
|
||||
Configuration = "Debug",
|
||||
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
|
||||
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp20
|
||||
Framework = NuGetFrameworks.NetCoreApp21
|
||||
};
|
||||
|
||||
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
|
||||
|
@ -109,7 +110,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "nonexistent-command",
|
||||
CommandArguments = null,
|
||||
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
|
||||
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp20
|
||||
Framework = NuGetFrameworks.NetCoreApp21
|
||||
};
|
||||
|
||||
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
|
||||
|
@ -135,7 +136,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
|||
CommandName = "dotnet-portable",
|
||||
Configuration = "Debug",
|
||||
ProjectDirectory = testInstance.Root.FullName,
|
||||
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp20,
|
||||
Framework = NuGetFrameworks.NetCoreApp21,
|
||||
OutputPath = outputDir.FullName
|
||||
};
|
||||
|
||||
|
|
|
@ -12,13 +12,14 @@ using NuGet.Frameworks;
|
|||
using NuGet.ProjectModel;
|
||||
using NuGet.Versioning;
|
||||
using Xunit;
|
||||
using Microsoft.DotNet.Tools.Tests.Utilities;
|
||||
|
||||
namespace Microsoft.DotNet.Tests
|
||||
{
|
||||
public class GivenAProjectToolsCommandResolver : TestBase
|
||||
{
|
||||
private static readonly NuGetFramework s_toolPackageFramework =
|
||||
FrameworkConstants.CommonFrameworks.NetCoreApp20;
|
||||
NuGetFrameworks.NetCoreApp21;
|
||||
|
||||
private const string TestProjectName = "AppWithToolDependency";
|
||||
|
||||
|
@ -309,7 +310,7 @@ namespace Microsoft.DotNet.Tests
|
|||
|
||||
result.Should().NotBeNull();
|
||||
|
||||
result.Args.Should().Contain("--fx-version 2.0.1");
|
||||
result.Args.Should().Contain("--fx-version 2.1.0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -375,7 +376,7 @@ namespace Microsoft.DotNet.Tests
|
|||
"dotnet-fallbackfoldertool",
|
||||
"1.0.0",
|
||||
"lib",
|
||||
"netcoreapp2.0",
|
||||
"netcoreapp2.1",
|
||||
"dotnet-fallbackfoldertool.dll"));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -30,15 +28,16 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="NuGet.Versioning" Version="$(CLI_NuGet_Version)" />
|
||||
<PackageReference Include="NuGet.Packaging" Version="$(CLI_NuGet_Version)" />
|
||||
<PackageReference Include="NuGet.Frameworks" Version="$(CLI_NuGet_Version)" />
|
||||
<PackageReference Include="NuGet.ProjectModel" Version="$(CLI_NuGet_Version)" />
|
||||
<PackageReference Include="Moq" Version="4.7.25" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
|
||||
<PackageReference Include="Microsoft.Build.Runtime" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -19,10 +17,11 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="Moq" Version="4.7.25" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- https://github.com/dotnet/cli/issues/6672: Re-enable net461 as a TFM for tests. -->
|
||||
<TargetFrameworks>$(CliTargetFramework)</TargetFrameworks>
|
||||
|
|
|
@ -1,183 +0,0 @@
|
|||
// 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 System.IO;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using NuGet.Frameworks;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
{
|
||||
public sealed class BuildPJCommand : TestCommand
|
||||
{
|
||||
|
||||
private bool _captureOutput;
|
||||
|
||||
private string _configuration;
|
||||
|
||||
private NuGetFramework _framework;
|
||||
|
||||
private string _runtime;
|
||||
|
||||
private bool _noDependencies;
|
||||
|
||||
private DirectoryInfo _outputPath;
|
||||
|
||||
private FileInfo _projectFile;
|
||||
|
||||
private DirectoryInfo _workingDirectory;
|
||||
|
||||
public BuildPJCommand()
|
||||
: base(new RepoDirectoriesProvider().PjDotnet)
|
||||
{
|
||||
}
|
||||
|
||||
public override CommandResult Execute(string args = "")
|
||||
{
|
||||
args = $"build {GetNoDependencies()} {GetProjectFile()} {GetOutputPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {args}";
|
||||
|
||||
if (_workingDirectory != null)
|
||||
{
|
||||
this.WithWorkingDirectory(_workingDirectory.FullName);
|
||||
}
|
||||
|
||||
if (_captureOutput)
|
||||
{
|
||||
return base.ExecuteWithCapturedOutput(args);
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.Execute(args);
|
||||
}
|
||||
}
|
||||
|
||||
public override CommandResult ExecuteWithCapturedOutput(string args = "")
|
||||
{
|
||||
WithCapturedOutput();
|
||||
|
||||
return Execute(args);
|
||||
}
|
||||
|
||||
public BuildPJCommand WithCapturedOutput()
|
||||
{
|
||||
_captureOutput = true;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithConfiguration(string configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithFramework(NuGetFramework framework)
|
||||
{
|
||||
_framework = framework;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithRuntime(string runtime)
|
||||
{
|
||||
_runtime = runtime;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithNoDependencies()
|
||||
{
|
||||
_noDependencies = true;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithOutputPath(DirectoryInfo outputPath)
|
||||
{
|
||||
_outputPath = outputPath;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithProjectDirectory(DirectoryInfo projectDirectory)
|
||||
{
|
||||
_workingDirectory = projectDirectory;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithProjectFile(FileInfo projectFile)
|
||||
{
|
||||
_projectFile = projectFile;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildPJCommand WithWorkingDirectory(DirectoryInfo workingDirectory)
|
||||
{
|
||||
_workingDirectory = workingDirectory;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private string GetConfiguration()
|
||||
{
|
||||
if (_configuration == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"--configuration {_configuration}";
|
||||
}
|
||||
|
||||
private string GetFramework()
|
||||
{
|
||||
if (_framework == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"--framework {_framework.GetShortFolderName()}";
|
||||
}
|
||||
|
||||
private string GetRuntime()
|
||||
{
|
||||
if (_runtime == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"--runtime {_runtime}";
|
||||
}
|
||||
|
||||
private string GetNoDependencies()
|
||||
{
|
||||
if (!_noDependencies)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return "--no-dependencies";
|
||||
}
|
||||
|
||||
private string GetOutputPath()
|
||||
{
|
||||
if (_outputPath == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"\"{_outputPath.FullName}\"";
|
||||
}
|
||||
|
||||
private string GetProjectFile()
|
||||
{
|
||||
if (_projectFile == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"\"{_projectFile.FullName}\"";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// 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 RestoreProjectJsonCommand : TestCommand
|
||||
{
|
||||
public RestoreProjectJsonCommand()
|
||||
: base(new RepoDirectoriesProvider().PjDotnet)
|
||||
{
|
||||
}
|
||||
|
||||
public override CommandResult Execute(string args="")
|
||||
{
|
||||
args = $"restore {args}";
|
||||
|
||||
return base.Execute(args);
|
||||
}
|
||||
|
||||
public override CommandResult ExecuteWithCapturedOutput(string args = "")
|
||||
{
|
||||
args = $"restore {args}";
|
||||
return base.ExecuteWithCapturedOutput(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -238,6 +238,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
psi.Environment[item.Key] = item.Value;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Flow the TEST_PACKAGES environment variable to the child process
|
||||
psi.Environment["TEST_PACKAGES"] = System.Environment.GetEnvironmentVariable("TEST_PACKAGES");
|
||||
}
|
||||
|
||||
private void AddWorkingDirectoryTo(ProcessStartInfo psi)
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Microsoft.DotNet.Tools.Tests.Utilities Class Library</Description>
|
||||
<TargetFramework>netstandard1.5</TargetFramework>
|
||||
|
@ -20,7 +18,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,14 @@
|
|||
using NuGet.Frameworks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Tests.Utilities
|
||||
{
|
||||
// This class is for frameworks that aren't yet in NuGet's FrameworkConstants.CommonFrameworks class
|
||||
public static class NuGetFrameworks
|
||||
{
|
||||
public static readonly NuGetFramework NetCoreApp21
|
||||
= new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, new Version(2, 1, 0, 0));
|
||||
}
|
||||
}
|
|
@ -78,7 +78,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
{
|
||||
// TODO: Nick Guerrera (Nick.Guerrera@microsoft.com) hacked this method for temporary use.
|
||||
// There is a blob decoder feature in progress but it won't ship in time for our milestone.
|
||||
// Replace this method with the blob decoder feature when later it is availale.
|
||||
// Replace this method with the blob decoder feature when later it is available.
|
||||
|
||||
var signature = reader.GetMemberReference((MemberReferenceHandle)attribute.Constructor).Signature;
|
||||
var signatureReader = reader.GetBlobReader(signature);
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
private string _stage2Sdk;
|
||||
private string _stage2WithBackwardsCompatibleRuntimesDirectory;
|
||||
private string _testPackages;
|
||||
private string _pjDotnet;
|
||||
private string _testWorkingFolder;
|
||||
|
||||
public static string RepoRoot
|
||||
{
|
||||
|
@ -37,9 +37,14 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
string directory = AppContext.BaseDirectory;
|
||||
#endif
|
||||
|
||||
while (!Directory.Exists(Path.Combine(directory, ".git")) && directory != null)
|
||||
while (directory != null)
|
||||
{
|
||||
directory = Directory.GetParent(directory).FullName;
|
||||
var gitDirOrFile = Path.Combine(directory, ".git");
|
||||
if (Directory.Exists(gitDirOrFile) || File.Exists(gitDirOrFile))
|
||||
{
|
||||
break;
|
||||
}
|
||||
directory = Directory.GetParent(directory)?.FullName;
|
||||
}
|
||||
|
||||
if (directory == null)
|
||||
|
@ -58,7 +63,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
{
|
||||
if (string.IsNullOrEmpty(s_buildRid))
|
||||
{
|
||||
var buildInfoPath = Path.Combine(RepoRoot, "artifacts", "obj", "BuildInfo.props");
|
||||
var buildInfoPath = Path.Combine(RepoRoot, "bin", "obj", "BuildInfo.props");
|
||||
var root = XDocument.Load(buildInfoPath).Root;
|
||||
var ns = root.Name.Namespace;
|
||||
|
||||
|
@ -81,38 +86,46 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
public string Artifacts => _artifacts;
|
||||
public string BuiltDotnet => _builtDotnet;
|
||||
public string NugetPackages => _nugetPackages;
|
||||
public string PjDotnet => _pjDotnet;
|
||||
public string Stage2Sdk => _stage2Sdk;
|
||||
public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory;
|
||||
public string TestPackages => _testPackages;
|
||||
public string TestWorkingFolder => _testWorkingFolder;
|
||||
|
||||
public RepoDirectoriesProvider(
|
||||
string artifacts = null,
|
||||
string builtDotnet = null,
|
||||
string nugetPackages = null,
|
||||
string corehostPackages = null,
|
||||
string corehostDummyPackages = null,
|
||||
string pjDotnet = null)
|
||||
string corehostDummyPackages = null)
|
||||
{
|
||||
_artifacts = artifacts ?? Path.Combine(RepoRoot, "artifacts", BuildRid);
|
||||
// Ideally this wouldn't be hardcoded, so that you could use stage n to build stage n + 1, and then use stage n + 1 to run tests
|
||||
int previousStage = 2;
|
||||
|
||||
_artifacts = artifacts ?? Path.Combine(RepoRoot,
|
||||
"bin",
|
||||
previousStage.ToString(),
|
||||
BuildRid);
|
||||
_builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish");
|
||||
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
|
||||
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
|
||||
_stage2Sdk = Directory
|
||||
.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk"))
|
||||
.EnumerateDirectories(Path.Combine(_artifacts, "dotnet", "sdk"))
|
||||
.First(d => !d.Contains("NuGetFallbackFolder"));
|
||||
|
||||
_stage2WithBackwardsCompatibleRuntimesDirectory =
|
||||
Path.Combine(_artifacts, "stage2WithBackwardsCompatibleRuntimes");
|
||||
_testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages");
|
||||
}
|
||||
Path.Combine(_artifacts, "dotnetWithBackwardsCompatibleRuntimes");
|
||||
|
||||
private string GetPjDotnetPath()
|
||||
{
|
||||
return new DirectoryInfo(Path.Combine(RepoRoot, ".dotnet_stage0PJ"))
|
||||
.GetDirectories().First()
|
||||
.GetFiles("dotnet*").First()
|
||||
.FullName;
|
||||
_testPackages = Environment.GetEnvironmentVariable("TEST_PACKAGES");
|
||||
if (string.IsNullOrEmpty(_testPackages))
|
||||
{
|
||||
throw new InvalidOperationException("TEST_PACKAGES environment variable not set");
|
||||
}
|
||||
|
||||
_testWorkingFolder = Path.Combine(RepoRoot,
|
||||
"bin",
|
||||
(previousStage + 1).ToString(),
|
||||
BuildRid,
|
||||
"test");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
s_testAssets = new TestAssets(
|
||||
new DirectoryInfo(assetsRoot),
|
||||
new FileInfo(new Muxer().MuxerPath),
|
||||
new FileInfo(new RepoDirectoriesProvider().PjDotnet));
|
||||
new RepoDirectoriesProvider().TestWorkingFolder);
|
||||
}
|
||||
|
||||
return s_testAssets;
|
||||
|
|
16
test/MsBuildScript.Tests/runtests.target
Normal file
16
test/MsBuildScript.Tests/runtests.target
Normal file
|
@ -0,0 +1,16 @@
|
|||
<Project DefaultTargets="RunMsBuildScriptTests">
|
||||
<Import Project="../../dir.props" />
|
||||
<Import Project="$(RepoRoot)/build/compile/LzmaArchive.targets" />
|
||||
|
||||
<UsingTask TaskName="DownloadFile" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="EnsureFileExistsOnAzureBlobStorage" AssemblyFile="$(CLIBuildDll)" />
|
||||
|
||||
<Target Name="RunMsBuildScriptTests" DependsOnTargets="EnsureAllDependencyFilesExist"></Target>
|
||||
|
||||
<Target Name="EnsureAllDependencyFilesExist">
|
||||
<EnsureFileExistsOnAzureBlobStorage Condition="$(HostRid.StartsWith('win'))" FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerWixLibFileName)" />
|
||||
<EnsureFileExistsOnAzureBlobStorage FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerArchiveFileName)" />
|
||||
<EnsureFileExistsOnAzureBlobStorage FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreSharedRuntimeVersionFileName)" />
|
||||
<EnsureFileExistsOnAzureBlobStorage FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(NugetPackagesArchiveName)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,11 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
<AssemblyName>Msbuild.Tests.Utilities</AssemblyName>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4;portable-net451+win8</AssetTargetFallback>
|
||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -19,7 +20,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="Microsoft.DotNet.ProjectJsonMigration" Version="$(CliMigrateVersion)" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="test-packages" value="../../artifacts/testpackages" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -1,5 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
|
@ -7,6 +6,7 @@
|
|||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
<AssemblyName>binding-redirects.Tests</AssemblyName>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4;portable-net451+win8</AssetTargetFallback>
|
||||
<RestoreAdditionalProjectSources>$(TestOutputDir)/packages</RestoreAdditionalProjectSources>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -14,9 +14,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
|
@ -15,8 +14,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace Microsoft.DotNet.Cli.Package.Add.Tests
|
|||
|
||||
var packageName = "Newtonsoft.Json";
|
||||
var packageVersion = "9.0.1";
|
||||
var framework = "netcoreapp2.0";
|
||||
var framework = "netcoreapp2.1";
|
||||
var cmd = new DotnetCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput($"add package {packageName} --version {packageVersion} --framework {framework}");
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -22,9 +20,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -661,7 +661,7 @@ Commands:
|
|||
[InlineData("nonexistingframeworkname")]
|
||||
public void WhenFrameworkSwitchIsNotMatchingAnyOfTargetedFrameworksItPrintsError(string framework)
|
||||
{
|
||||
var setup = Setup();
|
||||
var setup = Setup(framework);
|
||||
var lib = new ProjDir(setup.LibDir);
|
||||
var net45lib = new ProjDir(Path.Combine(setup.TestRoot, "Net45Lib"));
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
|
@ -20,10 +19,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="Microsoft.DotNet.ProjectJsonMigration" Version="$(CliMigrateVersion)" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -13,8 +11,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
|
||||
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.0")
|
||||
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.1")
|
||||
.GetFile($"{testAppName}.dll");
|
||||
|
||||
var outputRunCommand = new DotnetCommand();
|
||||
|
@ -66,7 +66,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
|
||||
new BuildCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("--framework netcoreapp2.0")
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
string dir = "pkgs";
|
||||
string args = $"--packages {dir}";
|
||||
|
||||
string newArgs = $"console -f netcoreapp2.0 -o \"{rootPath}\" --debug:ephemeral-hive --no-restore";
|
||||
string newArgs = $"console -f netcoreapp2.1 -o \"{rootPath}\" --debug:ephemeral-hive --no-restore";
|
||||
new NewCommandShim()
|
||||
.WithWorkingDirectory(rootPath)
|
||||
.Execute(newArgs)
|
||||
|
@ -115,7 +115,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
|
||||
var outputDll = Directory.EnumerateFiles(
|
||||
Path.Combine(rootPath, "bin", configuration, "netcoreapp2.0"), "*.dll",
|
||||
Path.Combine(rootPath, "bin", configuration, "netcoreapp2.1"), "*.dll",
|
||||
SearchOption.TopDirectoryOnly)
|
||||
.Single();
|
||||
|
||||
|
@ -131,7 +131,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
|||
{
|
||||
var testAppName = "MSBuildTestApp";
|
||||
var testInstance = TestAssets.Get(testAppName)
|
||||
.CreateInstance(testAppName)
|
||||
.CreateInstance()
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
|
@ -14,9 +13,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli.Clean.Tests
|
|||
.Should().Pass();
|
||||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
var outputFolder = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.0", "win7-x64");
|
||||
var outputFolder = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.1", "win7-x64");
|
||||
|
||||
outputFolder.Should().NotBeEmpty();
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -14,9 +12,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -38,6 +38,8 @@ SDK commands:
|
|||
nuget Provides additional NuGet commands.
|
||||
msbuild Runs Microsoft Build Engine (MSBuild).
|
||||
vstest Runs Microsoft Test Execution Command Line Tool.
|
||||
store Stores the specified assemblies in the runtime store.
|
||||
help Show help.
|
||||
|
||||
Common options:
|
||||
-v|--verbosity Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
|
||||
|
@ -54,7 +56,7 @@ runtime-options:
|
|||
--additionalprobingpath <path> Path containing probing policy and assemblies to probe for.
|
||||
--fx-version <version> Version of the installed Shared Framework to use to run the application.
|
||||
--roll-forward-on-no-candidate-fx Roll forward on no candidate shared framework is enabled.
|
||||
--additional-deps <path> Path to additonal deps.json file.";
|
||||
--additional-deps <path> Path to additional deps.json file.";
|
||||
|
||||
[Theory]
|
||||
[InlineData("--help")]
|
||||
|
@ -89,6 +91,19 @@ runtime-options:
|
|||
cmd.StdOut.Should().ContainVisuallySameFragmentIfNotLocalized(HelpText);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("complete")]
|
||||
[InlineData("parse")]
|
||||
public void WhenCommandWithoutDocLinkIsPassedToDotnetHelpItPrintsError(string command)
|
||||
{
|
||||
var cmd = new DotnetCommand()
|
||||
.ExecuteWithCapturedOutput($"help {command}");
|
||||
|
||||
cmd.Should().Fail();
|
||||
cmd.StdErr.Should().Contain(string.Format(Tools.Help.LocalizableStrings.CommandDoesNotExist, command));
|
||||
cmd.StdOut.Should().ContainVisuallySameFragmentIfNotLocalized(HelpText);
|
||||
}
|
||||
|
||||
[WindowsOnlyFact]
|
||||
public void WhenRunOnWindowsDotnetHelpCommandShouldContainProperProcessInformation()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -18,9 +16,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -19,9 +17,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.ProjectJsonMigration" Version="$(CliMigrateVersion)" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -23,11 +21,12 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="Moq" Version="4.7.25" />
|
||||
<PackageReference Include="Microsoft.DotNet.ProjectJsonMigration" Version="$(CliMigrateVersion)" />
|
||||
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -18,8 +16,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
17
test/dotnet-new.Tests/AspNetNuGetConfiguration.cs
Normal file
17
test/dotnet-new.Tests/AspNetNuGetConfiguration.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using System.IO;
|
||||
|
||||
namespace Microsoft.DotNet.New.Tests
|
||||
{
|
||||
public class AspNetNuGetConfiguration
|
||||
{
|
||||
public static void WriteNuGetConfigWithAspNetPrivateFeeds(string path)
|
||||
{
|
||||
string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config";
|
||||
using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName))
|
||||
using (Stream output = File.OpenWrite(path))
|
||||
{
|
||||
input.CopyTo(output);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -44,11 +44,17 @@ namespace Microsoft.DotNet.New.Tests
|
|||
var rootPath = TestAssets.CreateTestDirectory().FullName;
|
||||
var packagesDirectory = Path.Combine(rootPath, "packages");
|
||||
|
||||
// For testing the 2.1 templates - some of their packages are currently only in private feeds.
|
||||
var configFile = Path.Combine(rootPath, "NuGet.Config");
|
||||
AspNetNuGetConfiguration.WriteNuGetConfigWithAspNetPrivateFeeds(configFile);
|
||||
// For "normal" builds, once the packages needed for 2.1 templates are in the public feeds
|
||||
//var configFile = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
|
||||
|
||||
foreach (string cSharpTemplate in cSharpTemplates)
|
||||
{
|
||||
var projectFolder = Path.Combine(rootPath, cSharpTemplate + "1");
|
||||
Directory.CreateDirectory(projectFolder);
|
||||
CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory);
|
||||
CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory, configFile);
|
||||
}
|
||||
|
||||
Directory.EnumerateFiles(packagesDirectory, $"*.nupkg", SearchOption.AllDirectories)
|
||||
|
@ -58,31 +64,30 @@ namespace Microsoft.DotNet.New.Tests
|
|||
private void CreateAndRestoreNewProject(
|
||||
string projectType,
|
||||
string projectFolder,
|
||||
string packagesDirectory)
|
||||
string packagesDirectory,
|
||||
string configFile)
|
||||
{
|
||||
var repoRootNuGetConfig = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
|
||||
|
||||
new NewCommand()
|
||||
.WithWorkingDirectory(projectFolder)
|
||||
.Execute($"{projectType} --debug:ephemeral-hive --no-restore")
|
||||
.Should().Pass();
|
||||
|
||||
// https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed.
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(projectFolder)
|
||||
.Execute($"--configfile {repoRootNuGetConfig} --packages {packagesDirectory} /p:DisableImplicitAssetTargetFallback=true")
|
||||
.Execute($"--configfile {configFile} --packages {packagesDirectory}")
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("console", "microsoft.netcore.app")]
|
||||
[InlineData("classlib", "netstandard.library")]
|
||||
// re-enable when this bug is resolved: https://github.com/dotnet/cli/issues/7574
|
||||
//[InlineData("classlib", "netstandard.library")]
|
||||
public void NewProjectRestoresCorrectPackageVersion(string type, string packageName)
|
||||
{
|
||||
var rootPath = TestAssets.CreateTestDirectory(identifier: $"_{type}").FullName;
|
||||
var packagesDirectory = Path.Combine(rootPath, "packages");
|
||||
var projectName = "Project";
|
||||
var expectedVersion = "2.0.0";
|
||||
var expectedVersion = GetFrameworkPackageVersion();
|
||||
var repoRootNuGetConfig = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
|
||||
|
||||
new NewCommand()
|
||||
|
@ -98,6 +103,32 @@ namespace Microsoft.DotNet.New.Tests
|
|||
new DirectoryInfo(Path.Combine(packagesDirectory, packageName))
|
||||
.Should().Exist()
|
||||
.And.HaveDirectory(expectedVersion);
|
||||
|
||||
string GetFrameworkPackageVersion()
|
||||
{
|
||||
var dotnetDir = new FileInfo(DotnetUnderTest.FullName).Directory;
|
||||
var sharedFxDir = dotnetDir
|
||||
.GetDirectory("shared", "Microsoft.NETCore.App")
|
||||
.EnumerateDirectories()
|
||||
.Single(d => d.Name.StartsWith("2.1.0"));
|
||||
|
||||
if (packageName == "microsoft.netcore.app")
|
||||
{
|
||||
return sharedFxDir.Name;
|
||||
}
|
||||
|
||||
var depsFile = Path.Combine(sharedFxDir.FullName, "Microsoft.NETCore.App.deps.json");
|
||||
using (var stream = File.OpenRead(depsFile))
|
||||
using (var reader = new DependencyContextJsonReader())
|
||||
{
|
||||
var context = reader.Read(stream);
|
||||
var dependency = context
|
||||
.RuntimeLibraries
|
||||
.Single(library => string.Equals(library.Name, packageName, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
return dependency.Version;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,14 +20,15 @@ namespace Microsoft.DotNet.New.Tests
|
|||
[InlineData("C#", "classlib", false, false)]
|
||||
[InlineData("C#", "mstest", false, false)]
|
||||
[InlineData("C#", "xunit", false, false)]
|
||||
[InlineData("C#", "web", false, false)]
|
||||
[InlineData("C#", "mvc", false, false)]
|
||||
[InlineData("C#", "webapi", false, false)]
|
||||
[InlineData("C#", "web", true, false)]
|
||||
[InlineData("C#", "mvc", true, false)]
|
||||
[InlineData("C#", "webapi", true, false)]
|
||||
[InlineData("C#", "angular", false, true)]
|
||||
[InlineData("C#", "react", false, true)]
|
||||
[InlineData("C#", "reactredux", false, true)]
|
||||
[InlineData("F#", "console", false, false)]
|
||||
[InlineData("F#", "classlib", false, false)]
|
||||
// re-enable when this bug is resolved: https://github.com/dotnet/cli/issues/7574
|
||||
//[InlineData("F#", "classlib", false, false)]
|
||||
[InlineData("F#", "mstest", false, false)]
|
||||
[InlineData("F#", "xunit", false, false)]
|
||||
[InlineData("F#", "mvc", true, false)]
|
||||
|
@ -50,8 +51,7 @@ namespace Microsoft.DotNet.New.Tests
|
|||
|
||||
if (useNuGetConfigForAspNet)
|
||||
{
|
||||
var configFile = new FileInfo(Path.Combine(rootPath, "..", "..", "..", "..", "..", "NuGet.tempaspnetpatch.config"));
|
||||
File.Copy(configFile.FullName, Path.Combine(rootPath, "NuGet.Config"));
|
||||
AspNetNuGetConfiguration.WriteNuGetConfigWithAspNetPrivateFeeds(Path.Combine(rootPath, "NuGet.Config"));
|
||||
}
|
||||
|
||||
if (skipSpaWebpackSteps)
|
||||
|
@ -61,10 +61,9 @@ namespace Microsoft.DotNet.New.Tests
|
|||
Directory.CreateDirectory(Path.Combine(rootPath, "wwwroot", "dist"));
|
||||
}
|
||||
|
||||
// https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed.
|
||||
new TestCommand("dotnet")
|
||||
.WithWorkingDirectory(rootPath)
|
||||
.Execute($"restore /p:DisableImplicitAssetTargetFallback=true")
|
||||
.Execute($"restore")
|
||||
.Should().Pass();
|
||||
|
||||
var buildResult = new TestCommand("dotnet")
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<clear />
|
||||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="DotnetCore" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
|
||||
<add key="aspnet-final" value="https://dotnet.myget.org/F/aspnetcore-2-0-0-preview1-no-timestamp/api/v3/index.json" />
|
||||
<add key="aspnet-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
|
||||
</packageSources>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -9,15 +7,20 @@
|
|||
<AssetTargetFallback>$(AssetTargetFallback);dnxcore50;portable-net45+win8</AssetTargetFallback>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="NuGet.tempaspnetpatch.config" />
|
||||
<EmbeddedResource Include="NuGet.tempaspnetpatch.config" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
|
||||
<ProjectReference Include="..\..\src\dotnet\dotnet.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -16,9 +14,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Moq" Version="4.7.25" />
|
||||
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0 " />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -22,9 +20,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -33,11 +33,11 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute("--framework netcoreapp2.0")
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Should().Pass();
|
||||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.0", "publish", $"{testAppName}.dll");
|
||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.1", "publish", $"{testAppName}.dll");
|
||||
|
||||
new DotnetCommand()
|
||||
.ExecuteWithCapturedOutput(outputDll)
|
||||
|
@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute("--framework netcoreapp2.0")
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("--framework netcoreapp2.0")
|
||||
.Execute("--framework netcoreapp2.1")
|
||||
.Should().Pass();
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
new PublishCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.0 --no-restore")
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.1 --no-restore")
|
||||
.Should().Fail()
|
||||
.And.HaveStdOutContaining("project.assets.json");
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
|
||||
|
||||
new PublishCommand()
|
||||
.WithFramework("netcoreapp2.0")
|
||||
.WithFramework("netcoreapp2.1")
|
||||
.WithRuntime(rid)
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute()
|
||||
|
@ -119,7 +119,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
|
||||
var outputProgram = testProjectDirectory
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.0", rid, "publish", $"{testAppName}{Constants.ExeSuffix}")
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.1", rid, "publish", $"{testAppName}{Constants.ExeSuffix}")
|
||||
.FullName;
|
||||
|
||||
EnsureProgramIsRunnable(outputProgram);
|
||||
|
@ -185,7 +185,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
|
||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
return testProjectDirectory
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.0", rid, "publish");
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.1", rid, "publish");
|
||||
}
|
||||
|
||||
private static void EnsureProgramIsRunnable(string path)
|
||||
|
@ -227,7 +227,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
|
||||
var outputProgram = rootDir
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.0", "publish", $"{rootDir.Name}.dll")
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.1", "publish", $"{rootDir.Name}.dll")
|
||||
.FullName;
|
||||
|
||||
new TestCommand(outputProgram)
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -21,8 +19,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -19,9 +17,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.ProjectJsonMigration" Version="$(CliMigrateVersion)" />
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -19,9 +17,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.ProjectJsonMigration" Version="$(CliMigrateVersion)" />
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -15,10 +13,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
|
||||
new RunCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.0")
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.1")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("This string came from the test library!");
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
|
||||
new RunCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.0")
|
||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.1")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World!");
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -18,8 +16,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -22,9 +20,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -22,8 +20,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -22,8 +20,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
{
|
||||
public class GivenDotnetStoresAndPublishesProjects : TestBase
|
||||
{
|
||||
private static string _tfm = "netcoreapp2.0";
|
||||
private static string _tfm = "netcoreapp2.1";
|
||||
private static string _frameworkVersion = TestAssetInstance.CurrentRuntimeFrameworkVersion;
|
||||
private static string _arch = RuntimeEnvironment.RuntimeArchitecture.ToLowerInvariant();
|
||||
|
||||
|
@ -108,7 +108,8 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
|||
" path: 'lib/netstandard1.3/NuGet.Configuration.dll'");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
// Windows only for now due to https://github.com/dotnet/cli/issues/7501
|
||||
[WindowsOnlyFact]
|
||||
public void ItPublishesAnAppWithMultipleProfiles()
|
||||
{
|
||||
var testAppName = "MultiDependentProject";
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -14,8 +12,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -40,8 +40,8 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
result.StdOut
|
||||
.Should().Contain("Total tests: 3. Passed: 2. Failed: 1. Skipped: 0.", "because .NET 4.6 tests will pass")
|
||||
.And.Contain("Passed TestNamespace.VSTestTests.VSTestPassTestDesktop", "because .NET 4.6 tests will pass")
|
||||
.And.Contain("Total tests: 3. Passed: 1. Failed: 2. Skipped: 0.", "because netcoreapp2.0 tests will fail")
|
||||
.And.Contain("Failed TestNamespace.VSTestTests.VSTestFailTestNetCoreApp", "because netcoreapp2.0 tests will fail");
|
||||
.And.Contain("Total tests: 3. Passed: 1. Failed: 2. Skipped: 0.", "because netcoreapp2.1 tests will fail")
|
||||
.And.Contain("Failed TestNamespace.VSTestTests.VSTestFailTestNetCoreApp", "because netcoreapp2.1 tests will fail");
|
||||
}
|
||||
result.ExitCode.Should().Be(1);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
|
||||
new DotnetTestCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --framework netcoreapp2.0")
|
||||
.ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --framework netcoreapp2.1")
|
||||
.Should().Pass();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
var testProjectDirectory = this.CopyAndRestoreVSTestDotNetCoreTestApp("5");
|
||||
string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||
string expectedError = Path.Combine(testProjectDirectory, "bin",
|
||||
configuration, "netcoreapp2.0", "VSTestCore.dll");
|
||||
configuration, "netcoreapp2.1", "VSTestCore.dll");
|
||||
expectedError = "The test source file " + "\"" + expectedError + "\"" + " provided was not found.";
|
||||
|
||||
// Call test
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -14,8 +12,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests
|
|||
.Should().Pass();
|
||||
|
||||
var outputDll = testRoot
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.0")
|
||||
.GetDirectory("bin", configuration, "netcoreapp2.1")
|
||||
.GetFile($"{testAppName}.dll");
|
||||
|
||||
var argsForVstest = $"\"{outputDll.FullName}\" --logger:console;verbosity=normal";
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -14,8 +12,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Tests
|
|||
_testInstance.Root.FullName,
|
||||
"bin",
|
||||
configuration,
|
||||
"netcoreapp2.0",
|
||||
"netcoreapp2.1",
|
||||
"publish",
|
||||
"VBTestApp.dll");
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace Microsoft.DotNet.Tests
|
|||
".tools",
|
||||
toolName);
|
||||
|
||||
// Other tests may have restored the tool for netcoreapp2.0, so delete its tools folder
|
||||
// Other tests may have restored the tool for netcoreapp2.1, so delete its tools folder
|
||||
if (Directory.Exists(toolFolder))
|
||||
{
|
||||
Directory.Delete(toolFolder, true);
|
||||
|
@ -246,8 +246,8 @@ namespace Microsoft.DotNet.Tests
|
|||
.CreateInstance()
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
const string framework = ".NETCoreApp,Version=v2.0";
|
||||
|
||||
string framework = Tools.Tests.Utilities.NuGetFrameworks.NetCoreApp21.DotNetFrameworkName;
|
||||
|
||||
new BuildCommand()
|
||||
.WithProjectDirectory(testInstance.Root)
|
||||
|
@ -423,7 +423,7 @@ namespace Microsoft.DotNet.Tests
|
|||
.WithRestoreFiles();
|
||||
|
||||
var assetsFile = new DirectoryInfo(new RepoDirectoriesProvider().NugetPackages)
|
||||
.GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp2.0")
|
||||
.GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp2.1")
|
||||
.GetFile("project.assets.json");
|
||||
|
||||
var stopWatch = Stopwatch.StartNew();
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Tests.ParserTests
|
|||
private readonly ITestOutputHelper output;
|
||||
|
||||
[Fact]
|
||||
public void RunParserCanGetArguementFromDoubleDash()
|
||||
public void RunParserCanGetArgumentFromDoubleDash()
|
||||
{
|
||||
var runCommand = RunCommand.FromArgs(new[]{ "--", "foo" });
|
||||
runCommand.Args.Single().Should().Be("foo");
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Tests
|
|||
[Fact]
|
||||
public void VersionCommandDisplaysCorrectVersion()
|
||||
{
|
||||
var versionFilePath = Path.Combine(AppContext.BaseDirectory, ".version");
|
||||
var versionFilePath = Path.Combine(AppContext.BaseDirectory, "ExpectedSdkVersion.txt");
|
||||
var version = GetVersionFromFile(versionFilePath);
|
||||
|
||||
CommandResult result = new DotnetCommand()
|
||||
|
@ -31,14 +31,8 @@ namespace Microsoft.DotNet.Tests
|
|||
{
|
||||
using (var reader = new StreamReader(File.OpenRead(versionFilePath)))
|
||||
{
|
||||
SkipCommit(reader);
|
||||
return reader.ReadLine();
|
||||
}
|
||||
}
|
||||
|
||||
private void SkipCommit(StreamReader reader)
|
||||
{
|
||||
reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
|
@ -23,11 +22,35 @@
|
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\artifacts\*\stage2\sdk\*\.version">
|
||||
<Link>.version</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="WriteExpectedVersion"
|
||||
BeforeTargets="BeforeBuild"
|
||||
DependsOnTargets="PrepareForBuild">
|
||||
|
||||
<PropertyGroup>
|
||||
<ExpectedVersionFileInIntermediateFolder>$(IntermediateOutputPath)ExpectedSdkVersion.txt</ExpectedVersionFileInIntermediateFolder>
|
||||
|
||||
<VersionFileContent>$(SdkVersion)</VersionFileContent>
|
||||
<ExistingVersionFileContent Condition=" Exists('$(ExpectedVersionFileInIntermediateFolder)') ">
|
||||
$([System.IO.File]::ReadAllText($(ExpectedVersionFileInIntermediateFolder)))
|
||||
</ExistingVersionFileContent>
|
||||
|
||||
<ShouldOverwriteVersionFile>false</ShouldOverwriteVersionFile>
|
||||
<ShouldOverwriteVersionFile
|
||||
Condition=" '$(ExistingVersionFileContent.Trim())' != '$(VersionFileContent.Trim())' ">true</ShouldOverwriteVersionFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(ExpectedVersionFileInIntermediateFolder)"
|
||||
Lines="$(VersionFileContent)"
|
||||
Condition=" '$(ShouldOverwriteVersionFile)' == 'true' "
|
||||
Overwrite="true" />
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="$(ExpectedVersionFileInIntermediateFolder)" CopyToOutputDirectory="PreserveNewest" />
|
||||
<FileWrites Include="$(ExpectedVersionFileInIntermediateFolder)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
|
||||
|
@ -37,10 +60,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit.netcore.extensions" Version="1.0.0-prerelease-00206" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
|
||||
<PackageReference Include="Microsoft.DotNet.Cli.CommandLine" Version="$(CliCommandLineParserVersion)" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
|
@ -14,8 +12,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161024-02" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue