[master] Update dependencies from dotnet/toolset (#1161)
* Update dependencies from https://github.com/dotnet/toolset build 20190329.11 - Microsoft.Dotnet.Toolset.Internal - 3.0.100-preview4.19179.11 * Deleting the CliToolReferenceTests. They are not needed on this repo and they do not rely on any insertion from dependencies and are completely dependent on the CLI only. The only reason why they were here is because we took the whole E2E test project from the CLI and ported to sdk and toolset. * Cap project tools assets tfm netcoreapp2.2 to react to change in SDK
This commit is contained in:
parent
ec3aed15a5
commit
e5f45a8c85
5 changed files with 7 additions and 161 deletions
|
@ -1,6 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<!-- netcoreapp2.2 is the maximum TFM project tools support -->
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<!-- netcoreapp2.2 is the maximum TFM project tools support -->
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
<Uri>https://github.com/dotnet/templating</Uri>
|
||||
<Sha>42a212514e375a0821baab69fbac462e39590cfb</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Dotnet.Toolset.Internal" Version="3.0.100-preview4.19169.3">
|
||||
<Dependency Name="Microsoft.Dotnet.Toolset.Internal" Version="3.0.100-preview4.19179.11">
|
||||
<Uri>https://github.com/dotnet/toolset</Uri>
|
||||
<Sha>451276038744a1883f8a9f15206ecef734c0c21c</Sha>
|
||||
<Sha>a30f447cf8d6f2627c80376fdc8a00c8eb7c6ddb</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="NETStandard.Library" Version="2.1.0-prerelease.19180.1">
|
||||
<Uri>https://github.com/dotnet/standard</Uri>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<MicrosoftDotnetToolsetInternalPackageVersion>3.0.100-preview4.19169.3</MicrosoftDotnetToolsetInternalPackageVersion>
|
||||
<MicrosoftDotnetToolsetInternalPackageVersion>3.0.100-preview4.19179.11</MicrosoftDotnetToolsetInternalPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependencies from https://github.com/aspnet/EntityFrameworkCore -->
|
||||
|
|
|
@ -1,156 +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;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.TestFramework;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
[assembly: CollectionBehavior(DisableTestParallelization = true)]
|
||||
|
||||
namespace Microsoft.DotNet.Tests.EndToEnd
|
||||
{
|
||||
public class ProjectToolsTests : TestBase, IClassFixture<ProjectToolsTests.TestPackagesFixture>
|
||||
{
|
||||
public string TestPackagesDirectory { get; private set; }
|
||||
public string TestNuGetCache { get; private set; }
|
||||
|
||||
|
||||
public ProjectToolsTests(TestPackagesFixture testPackagesFixture)
|
||||
{
|
||||
TestPackagesDirectory = testPackagesFixture.TestPackagesDirectory;
|
||||
TestNuGetCache = testPackagesFixture.TestNuGetCache;
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void ItCanRunToolsInACSProj()
|
||||
{
|
||||
var testInstance = TestAssets.Get("MSBuildTestApp")
|
||||
.CreateInstance()
|
||||
.WithSourceFiles();
|
||||
|
||||
var testProjectDirectory = testInstance.Root;
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.WithEnvironmentVariable("NUGET_PACKAGES", TestNuGetCache)
|
||||
.WithEnvironmentVariable("TEST_PACKAGES", TestPackagesDirectory)
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
new DotnetCommand()
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.WithEnvironmentVariable("NUGET_PACKAGES", TestNuGetCache)
|
||||
.WithEnvironmentVariable("TEST_PACKAGES", TestPackagesDirectory)
|
||||
.ExecuteWithCapturedOutput("-d portable")
|
||||
.Should()
|
||||
.Pass()
|
||||
.And
|
||||
.HaveStdOutContaining("Hello Portable World!");;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItCanRunToolsThatPrefersTheCliRuntimeEvenWhenTheToolItselfDeclaresADifferentRuntime()
|
||||
{
|
||||
var testInstance = TestAssets.Get("MSBuildTestApp")
|
||||
.CreateInstance()
|
||||
.WithSourceFiles();
|
||||
|
||||
var testProjectDirectory = testInstance.Root;
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.WithEnvironmentVariable("NUGET_PACKAGES", TestNuGetCache)
|
||||
.WithEnvironmentVariable("TEST_PACKAGES", TestPackagesDirectory)
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
|
||||
new DotnetCommand()
|
||||
.WithWorkingDirectory(testInstance.Root)
|
||||
.WithEnvironmentVariable("NUGET_PACKAGES", TestNuGetCache)
|
||||
.WithEnvironmentVariable("TEST_PACKAGES", TestPackagesDirectory)
|
||||
.ExecuteWithCapturedOutput("-d prefercliruntime")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello I prefer the cli runtime World!");;
|
||||
}
|
||||
|
||||
public class TestPackagesFixture
|
||||
{
|
||||
public string TestPackagesDirectory { get; private set; }
|
||||
public string TestNuGetCache { get; private set; }
|
||||
|
||||
public TestPackagesFixture()
|
||||
{
|
||||
TestPackagesDirectory = SetupTestPackages();
|
||||
|
||||
TestNuGetCache = TestAssets.CreateTestDirectory(testProjectName: string.Empty,
|
||||
callingMethod: "packages",
|
||||
identifier: string.Empty)
|
||||
.FullName;
|
||||
|
||||
}
|
||||
|
||||
private string SetupTestPackages()
|
||||
{
|
||||
var directory = TestAssets.CreateTestDirectory(
|
||||
testProjectName: string.Empty,
|
||||
callingMethod: "TestPackages",
|
||||
identifier: string.Empty);
|
||||
|
||||
string testPackagesDirectory = Path.Combine(directory.FullName, "testPackages");
|
||||
|
||||
if (!Directory.Exists(testPackagesDirectory))
|
||||
{
|
||||
new DirectoryInfo(testPackagesDirectory).Create();
|
||||
}
|
||||
|
||||
var testPackageNames = new[]
|
||||
{
|
||||
"dotnet-portable",
|
||||
"dotnet-prefercliruntime"
|
||||
};
|
||||
|
||||
foreach (var testPackageName in testPackageNames)
|
||||
{
|
||||
|
||||
|
||||
var assetInfo = TestAssets.Get(TestAssetKinds.TestPackages, testPackageName);
|
||||
|
||||
var testProjectDirectory = new DirectoryInfo(Path.Combine(directory.FullName, testPackageName));
|
||||
|
||||
if (!testProjectDirectory.Exists)
|
||||
{
|
||||
testProjectDirectory.Create();
|
||||
}
|
||||
|
||||
var testInstance = new TestAssetInstance(assetInfo, testProjectDirectory)
|
||||
.WithSourceFiles()
|
||||
.WithRestoreFiles();
|
||||
|
||||
new PackCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
.Execute()
|
||||
.Should()
|
||||
.Pass();
|
||||
|
||||
string nupkgFilePathInOutput = Directory.GetFiles(Path.Combine(testProjectDirectory.FullName, "bin", "Debug"), "*.nupkg")
|
||||
.Single();
|
||||
|
||||
string nupkgFile = Path.Combine(testPackagesDirectory, Path.GetFileName(nupkgFilePathInOutput));
|
||||
|
||||
File.Copy(nupkgFilePathInOutput, nupkgFile);
|
||||
|
||||
}
|
||||
|
||||
return testPackagesDirectory;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue