Disable multilevel lookup and fix tests that were depending on .NET Core 1.0 shared framework

This commit is contained in:
Daniel Plaisted 2017-04-27 12:56:28 -07:00
parent 308b5137c2
commit af9a85fd3f
5 changed files with 8 additions and 4 deletions

View file

@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-throwingtool</AssemblyName>
<PackageId>$(AssemblyName)</PackageId>
</PropertyGroup>

View file

@ -67,6 +67,9 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR))
# Disable first run since we want to control all package sources
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Don't resolve shared frameworks from user or global locations
$env:DOTNET_MULTILEVEL_LOOKUP=0
# Enable vs test console logging
$env:VSTEST_BUILD_TRACE=1
$env:VSTEST_TRACE_BUILD=1

View file

@ -151,6 +151,10 @@ export VSTEST_BUILD_TRACE=1
export VSTEST_TRACE_BUILD=1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Don't resolve shared frameworks from user or global locations
DOTNET_MULTILEVEL_LOOKUP=0
toolsLocalPath="$REPOROOT/build_tools"
if [ ! -z $BOOTSTRAP_INSTALL_DIR]; then
toolsLocalPath = $BOOTSTRAP_INSTALL_DIR

View file

@ -14,7 +14,6 @@ namespace Microsoft.DotNet.Cli.Build.Tests
public class GivenThatWeWantToBeBackwardsCompatibleWith1xProjects : TestBase
{
[Theory]
[InlineData("netcoreapp1.0")]
[InlineData("netcoreapp1.1")]
public void ItRestoresBuildsAndRuns(string target)
{

View file

@ -122,7 +122,6 @@ namespace Microsoft.DotNet.Tests
new GenericCommand(toolPrefersCLIRuntime ? "portable-v1-prefercli" : "portable-v1")
.WithWorkingDirectory(testInstance.Root)
.WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0")
.Execute()
.Should().Fail();
}
@ -159,7 +158,6 @@ namespace Microsoft.DotNet.Tests
var result =
new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(testInstance.Root)
.WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0")
.Execute(toolPrefersCLIRuntime ? "portable-v1-prefercli" : "portable-v1");
result.Should().Pass()