Fix tests on netcoreapp1.1 only platforms

This commit is contained in:
Eric Erhardt 2017-02-20 10:01:29 -06:00
parent 996d458e30
commit 8aaffc2238
40 changed files with 203 additions and 151 deletions

View file

@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks> <TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback> <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers> <RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -11,11 +12,6 @@
<Version>1.0.0-*</Version> <Version>1.0.0-*</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@ -25,7 +21,4 @@
<Version>1.0.0-*</Version> <Version>1.0.0-*</Version>
</DotNetCliToolReference> </DotNetCliToolReference>
</ItemGroup> </ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project> </Project>

View file

@ -4,6 +4,7 @@
<AssemblyName>AppWithRedirectsAndConfig</AssemblyName> <AssemblyName>AppWithRedirectsAndConfig</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers> <RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -4,6 +4,7 @@
<AssemblyName>AppWithRedirectsNoConfig</AssemblyName> <AssemblyName>AppWithRedirectsNoConfig</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers> <RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -2,7 +2,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks> <TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50;netcoreapp1.0</PackageTargetFallback> <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50;netcoreapp1.1</PackageTargetFallback>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-throwingtool</AssemblyName> <AssemblyName>dotnet-throwingtool</AssemblyName>
<PackageId>$(AssemblyName)</PackageId> <PackageId>$(AssemblyName)</PackageId>
</PropertyGroup> </PropertyGroup>
@ -13,10 +13,4 @@
</BuiltProjectOutputGroupOutput> </BuiltProjectOutputGroupOutput>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
</ItemGroup>
</Project> </Project>

View file

@ -2,15 +2,10 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="dotnet-throwingtool"> <DotNetCliToolReference Include="dotnet-throwingtool">
<Version>1.0.0</Version> <Version>1.0.0</Version>

View file

@ -2,12 +2,12 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<GeneratedPackageId>random-name</GeneratedPackageId> <GeneratedPackageId>random-name</GeneratedPackageId>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.3" />
<DotNetCliToolReference Include="$(GeneratedPackageId)"> <DotNetCliToolReference Include="$(GeneratedPackageId)">
<Version>1.0.0</Version> <Version>1.0.0</Version>
</DotNetCliToolReference> </DotNetCliToolReference>

View file

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<GeneratedPackageId>random-name</GeneratedPackageId> <GeneratedPackageId>random-name</GeneratedPackageId>
<PackageId>$(GeneratedPackageId)</PackageId> <PackageId>$(GeneratedPackageId)</PackageId>
<AssemblyName>dotnet-randompackage</AssemblyName> <AssemblyName>dotnet-randompackage</AssemblyName>
@ -14,8 +14,4 @@
</BuiltProjectOutputGroupOutput> </BuiltProjectOutputGroupOutput>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.3" />
</ItemGroup>
</Project> </Project>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-tool-with-output-name</AssemblyName> <AssemblyName>dotnet-tool-with-output-name</AssemblyName>
<PackageId>ToolWithOutputName</PackageId> <PackageId>ToolWithOutputName</PackageId>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
@ -12,13 +12,4 @@
</BuiltProjectOutputGroupOutput> </BuiltProjectOutputGroupOutput>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.4</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project> </Project>

View file

@ -3,10 +3,11 @@
<PropertyGroup> <PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix> <VersionPrefix>1.0.0-rc</VersionPrefix>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-dependency-tool-invoker</AssemblyName> <AssemblyName>dotnet-dependency-tool-invoker</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback> <PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@ -22,9 +23,6 @@
</BuiltProjectOutputGroupOutput> </BuiltProjectOutputGroupOutput>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.4</Version>
</PackageReference>
<PackageReference Include="NuGet.Frameworks"> <PackageReference Include="NuGet.Frameworks">
<Version>$(CLI_NuGet_Version)</Version> <Version>$(CLI_NuGet_Version)</Version>
</PackageReference> </PackageReference>
@ -32,8 +30,4 @@
<Version>$(SdkNugetVersion)</Version> <Version>$(SdkNugetVersion)</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project> </Project>

View file

@ -1,24 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup> <PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix> <VersionPrefix>1.0.0-rc</VersionPrefix>
<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks> <TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
<AssemblyName>dotnet-desktop-and-portable</AssemblyName> <AssemblyName>dotnet-desktop-and-portable</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers> <RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)"> <BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath> <FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput> </BuiltProjectOutputGroupOutput>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.4</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />

View file

@ -2,9 +2,10 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-portable</AssemblyName> <AssemblyName>dotnet-portable</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -12,14 +13,4 @@
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath> <FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput> </BuiltProjectOutputGroupOutput>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.4</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project> </Project>

View file

@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.0</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -14,7 +15,4 @@
<Version>1.0.0</Version> <Version>1.0.0</Version>
</DotNetCliToolReference> </DotNetCliToolReference>
</ItemGroup> </ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> </Project>
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -17,7 +18,4 @@
<Version>1.0.0</Version> <Version>1.0.0</Version>
</DotNetCliToolReference> </DotNetCliToolReference>
</ItemGroup> </ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> </Project>
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -1,23 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ToolWithOutputName"> <PackageReference Include="ToolWithOutputName">
<Version>1.0.0</Version> <Version>1.0.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="dotnet-dependency-tool-invoker"> <DotNetCliToolReference Include="dotnet-dependency-tool-invoker">
<Version>1.0.0-*</Version> <Version>1.0.0-*</Version>
</DotNetCliToolReference> </DotNetCliToolReference>
</ItemGroup> </ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> </Project>
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks> <TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="dotnet-portable"> <DotNetCliToolReference Include="dotnet-portable">
<Version>1.0.0</Version> <Version>1.0.0</Version>
@ -17,7 +13,4 @@
<Version>1.0.0</Version> <Version>1.0.0</Version>
</DotNetCliToolReference> </DotNetCliToolReference>
</ItemGroup> </ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> </Project>
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks> <TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers> <RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;fedora.24-x64;opensuse.13.2-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,13 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
<PackageReference Include="dotnet-portable"> <PackageReference Include="dotnet-portable">
<Version>1.0.0</Version> <Version>1.0.0</Version>
<PrivateAssets>All</PrivateAssets> <PrivateAssets>All</PrivateAssets>

View file

@ -2,13 +2,11 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
<PackageReference Include="MSTest.TestFramework"> <PackageReference Include="MSTest.TestFramework">
<Version>1.0.6-preview</Version> <Version>1.0.6-preview</Version>
</PackageReference> </PackageReference>

View file

@ -2,13 +2,11 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.1</TargetFramework>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk"> <PackageReference Include="Microsoft.NET.Test.Sdk">
<Version>$(CLI_TestPlatform_Version)</Version> <Version>$(CLI_TestPlatform_Version)</Version>
</PackageReference> </PackageReference>

View file

@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic; using System.Collections.Generic;
using NuGet.Frameworks;
using NuGet.ProjectModel; using NuGet.ProjectModel;
namespace Microsoft.DotNet.Cli.Utils namespace Microsoft.DotNet.Cli.Utils
@ -22,6 +23,8 @@ namespace Microsoft.DotNet.Cli.Utils
string FullOutputPath { get; } string FullOutputPath { get; }
NuGetFramework DotnetCliToolTargetFramework { get; }
Dictionary<string, string> EnvironmentVariables { get; } Dictionary<string, string> EnvironmentVariables { get; }
} }
} }

View file

@ -13,6 +13,8 @@ namespace Microsoft.DotNet.Cli.Utils
{ {
internal class MSBuildProject : IProject internal class MSBuildProject : IProject
{ {
private static readonly NuGetFramework s_toolPackageFramework = FrameworkConstants.CommonFrameworks.NetCoreApp10;
private Project _project; private Project _project;
private string _projectRoot; private string _projectRoot;
@ -60,6 +62,25 @@ namespace Microsoft.DotNet.Cli.Utils
} }
} }
public NuGetFramework DotnetCliToolTargetFramework
{
get
{
var frameworkString = _project
.AllEvaluatedProperties
.FirstOrDefault(p => p.Name.Equals("DotnetCliToolTargetFramework"))
?.EvaluatedValue;
if (string.IsNullOrEmpty(frameworkString))
{
return s_toolPackageFramework;
}
return NuGetFramework.Parse(frameworkString);
}
}
public Dictionary<string, string> EnvironmentVariables public Dictionary<string, string> EnvironmentVariables
{ {
get get

View file

@ -18,8 +18,6 @@ namespace Microsoft.DotNet.Cli.Utils
{ {
private const string ProjectToolsCommandResolverName = "projecttoolscommandresolver"; private const string ProjectToolsCommandResolverName = "projecttoolscommandresolver";
private static readonly NuGetFramework s_toolPackageFramework = FrameworkConstants.CommonFrameworks.NetCoreApp10;
private static readonly CommandResolutionStrategy s_commandResolutionStrategy = private static readonly CommandResolutionStrategy s_commandResolutionStrategy =
CommandResolutionStrategy.ProjectToolsPackage; CommandResolutionStrategy.ProjectToolsPackage;
@ -133,8 +131,14 @@ namespace Microsoft.DotNet.Cli.Utils
ProjectToolsCommandResolverName, ProjectToolsCommandResolverName,
string.Join(Environment.NewLine, possiblePackageRoots.Select((p) => $"- {p}")))); string.Join(Environment.NewLine, possiblePackageRoots.Select((p) => $"- {p}"))));
var toolPackageFramework = project.DotnetCliToolTargetFramework;
string nugetPackagesRoot; string nugetPackagesRoot;
var toolLockFile = GetToolLockFile(toolLibraryRange, possiblePackageRoots, out nugetPackagesRoot); var toolLockFile = GetToolLockFile(
toolLibraryRange,
toolPackageFramework,
possiblePackageRoots,
out nugetPackagesRoot);
if (toolLockFile == null) if (toolLockFile == null)
{ {
@ -147,7 +151,7 @@ namespace Microsoft.DotNet.Cli.Utils
toolLockFile.Path)); toolLockFile.Path));
var toolLibrary = toolLockFile.Targets var toolLibrary = toolLockFile.Targets
.FirstOrDefault(t => s_toolPackageFramework == t.TargetFramework) .FirstOrDefault(t => toolPackageFramework == t.TargetFramework)
?.Libraries.FirstOrDefault( ?.Libraries.FirstOrDefault(
l => StringComparer.OrdinalIgnoreCase.Equals(l.Name, toolLibraryRange.Name)); l => StringComparer.OrdinalIgnoreCase.Equals(l.Name, toolLibraryRange.Name));
if (toolLibrary == null) if (toolLibrary == null)
@ -161,7 +165,11 @@ namespace Microsoft.DotNet.Cli.Utils
var depsFileRoot = Path.GetDirectoryName(toolLockFile.Path); var depsFileRoot = Path.GetDirectoryName(toolLockFile.Path);
var depsFilePath = GetToolDepsFilePath(toolLibraryRange, toolLockFile, depsFileRoot); var depsFilePath = GetToolDepsFilePath(
toolLibraryRange,
toolPackageFramework,
toolLockFile,
depsFileRoot);
var normalizedNugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(nugetPackagesRoot); var normalizedNugetPackagesRoot = PathUtility.EnsureNoTrailingDirectorySeparator(nugetPackagesRoot);
@ -203,12 +211,13 @@ namespace Microsoft.DotNet.Cli.Utils
private LockFile GetToolLockFile( private LockFile GetToolLockFile(
SingleProjectInfo toolLibrary, SingleProjectInfo toolLibrary,
NuGetFramework framework,
IEnumerable<string> possibleNugetPackagesRoot, IEnumerable<string> possibleNugetPackagesRoot,
out string nugetPackagesRoot) out string nugetPackagesRoot)
{ {
foreach (var packagesRoot in possibleNugetPackagesRoot) foreach (var packagesRoot in possibleNugetPackagesRoot)
{ {
if (TryGetToolLockFile(toolLibrary, packagesRoot, out LockFile lockFile)) if (TryGetToolLockFile(toolLibrary, framework, packagesRoot, out LockFile lockFile))
{ {
nugetPackagesRoot = packagesRoot; nugetPackagesRoot = packagesRoot;
return lockFile; return lockFile;
@ -221,11 +230,12 @@ namespace Microsoft.DotNet.Cli.Utils
private bool TryGetToolLockFile( private bool TryGetToolLockFile(
SingleProjectInfo toolLibrary, SingleProjectInfo toolLibrary,
NuGetFramework framework,
string nugetPackagesRoot, string nugetPackagesRoot,
out LockFile lockFile) out LockFile lockFile)
{ {
lockFile = null; lockFile = null;
var lockFilePath = GetToolLockFilePath(toolLibrary, nugetPackagesRoot); var lockFilePath = GetToolLockFilePath(toolLibrary, framework, nugetPackagesRoot);
if (!File.Exists(lockFilePath)) if (!File.Exists(lockFilePath))
{ {
@ -248,6 +258,7 @@ namespace Microsoft.DotNet.Cli.Utils
private string GetToolLockFilePath( private string GetToolLockFilePath(
SingleProjectInfo toolLibrary, SingleProjectInfo toolLibrary,
NuGetFramework framework,
string nugetPackagesRoot) string nugetPackagesRoot)
{ {
var toolPathCalculator = new ToolPathCalculator(nugetPackagesRoot); var toolPathCalculator = new ToolPathCalculator(nugetPackagesRoot);
@ -255,11 +266,12 @@ namespace Microsoft.DotNet.Cli.Utils
return toolPathCalculator.GetBestLockFilePath( return toolPathCalculator.GetBestLockFilePath(
toolLibrary.Name, toolLibrary.Name,
VersionRange.Parse(toolLibrary.Version), VersionRange.Parse(toolLibrary.Version),
s_toolPackageFramework); framework);
} }
private string GetToolDepsFilePath( private string GetToolDepsFilePath(
SingleProjectInfo toolLibrary, SingleProjectInfo toolLibrary,
NuGetFramework framework,
LockFile toolLockFile, LockFile toolLockFile,
string depsPathRoot) string depsPathRoot)
{ {
@ -272,24 +284,26 @@ namespace Microsoft.DotNet.Cli.Utils
ProjectToolsCommandResolverName, ProjectToolsCommandResolverName,
depsJsonPath)); depsJsonPath));
EnsureToolJsonDepsFileExists(toolLockFile, depsJsonPath, toolLibrary); EnsureToolJsonDepsFileExists(toolLockFile, framework, depsJsonPath, toolLibrary);
return depsJsonPath; return depsJsonPath;
} }
private void EnsureToolJsonDepsFileExists( private void EnsureToolJsonDepsFileExists(
LockFile toolLockFile, LockFile toolLockFile,
NuGetFramework framework,
string depsPath, string depsPath,
SingleProjectInfo toolLibrary) SingleProjectInfo toolLibrary)
{ {
if (!File.Exists(depsPath)) if (!File.Exists(depsPath))
{ {
GenerateDepsJsonFile(toolLockFile, depsPath, toolLibrary); GenerateDepsJsonFile(toolLockFile, framework, depsPath, toolLibrary);
} }
} }
internal void GenerateDepsJsonFile( internal void GenerateDepsJsonFile(
LockFile toolLockFile, LockFile toolLockFile,
NuGetFramework framework,
string depsPath, string depsPath,
SingleProjectInfo toolLibrary) SingleProjectInfo toolLibrary)
{ {
@ -298,7 +312,7 @@ namespace Microsoft.DotNet.Cli.Utils
depsPath)); depsPath));
var dependencyContext = new DepsJsonBuilder() var dependencyContext = new DepsJsonBuilder()
.Build(toolLibrary, null, toolLockFile, s_toolPackageFramework, null); .Build(toolLibrary, null, toolLockFile, framework, null);
var tempDepsFile = Path.GetTempFileName(); var tempDepsFile = Path.GetTempFileName();
using (var fileStream = File.Open(tempDepsFile, FileMode.Open, FileAccess.Write)) using (var fileStream = File.Open(tempDepsFile, FileMode.Open, FileAccess.Write))

View file

@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
{ {
string projectDirectory = directory.Path; string projectDirectory = directory.Path;
string newArgs = "console --debug:ephemeral-hive"; string newArgs = "console -f netcoreapp1.1 --debug:ephemeral-hive";
new NewCommandShim() new NewCommandShim()
.WithWorkingDirectory(projectDirectory) .WithWorkingDirectory(projectDirectory)
.Execute(newArgs) .Execute(newArgs)
@ -112,7 +112,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
new DotnetCommand() new DotnetCommand()
.WithWorkingDirectory(testProjectDirectory) .WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput( .ExecuteWithCapturedOutput(
$"-d dependency-tool-invoker -c {configuration} -f netcoreapp1.0 portable") $"-d dependency-tool-invoker -c {configuration} -f netcoreapp1.1 portable")
.Should().Pass() .Should().Pass()
.And.HaveStdOutContaining("Hello Portable World!");; .And.HaveStdOutContaining("Hello Portable World!");;
} }

View file

@ -201,7 +201,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
.Should().Pass(); .Should().Pass();
var factory = new ProjectDependenciesCommandFactory( var factory = new ProjectDependenciesCommandFactory(
FrameworkConstants.CommonFrameworks.NetCoreApp10, FrameworkConstants.CommonFrameworks.NetCoreApp11,
configuration, configuration,
null, null,
null, null,
@ -210,7 +210,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
var command = factory.Create("dotnet-tool-with-output-name", null); var command = factory.Create("dotnet-tool-with-output-name", null);
command.CommandArgs.Should().Contain( command.CommandArgs.Should().Contain(
Path.Combine("toolwithoutputname", "1.0.0", "lib", "netcoreapp1.0", "dotnet-tool-with-output-name.dll")); Path.Combine("toolwithoutputname", "1.0.0", "lib", "netcoreapp1.1", "dotnet-tool-with-output-name.dll"));
} }
} }
} }

View file

@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
CommandName = "dotnet-portable", CommandName = "dotnet-portable",
Configuration = "Debug", Configuration = "Debug",
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName, ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 Framework = FrameworkConstants.CommonFrameworks.NetCoreApp11
}; };
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
@ -83,7 +83,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
CommandName = "dotnet-portable", CommandName = "dotnet-portable",
Configuration = "Debug", Configuration = "Debug",
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName, ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 Framework = FrameworkConstants.CommonFrameworks.NetCoreApp11
}; };
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
@ -109,7 +109,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
CommandName = "nonexistent-command", CommandName = "nonexistent-command",
CommandArguments = null, CommandArguments = null,
ProjectDirectory = MSBuildTestProjectInstance.Root.FullName, ProjectDirectory = MSBuildTestProjectInstance.Root.FullName,
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 Framework = FrameworkConstants.CommonFrameworks.NetCoreApp11
}; };
var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments);
@ -135,7 +135,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
CommandName = "dotnet-portable", CommandName = "dotnet-portable",
Configuration = "Debug", Configuration = "Debug",
ProjectDirectory = testInstance.Root.FullName, ProjectDirectory = testInstance.Root.FullName,
Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10, Framework = FrameworkConstants.CommonFrameworks.NetCoreApp11,
OutputPath = outputDir.FullName OutputPath = outputDir.FullName
}; };

View file

@ -18,7 +18,7 @@ namespace Microsoft.DotNet.Tests
public class GivenAProjectToolsCommandResolver : TestBase public class GivenAProjectToolsCommandResolver : TestBase
{ {
private static readonly NuGetFramework s_toolPackageFramework = private static readonly NuGetFramework s_toolPackageFramework =
FrameworkConstants.CommonFrameworks.NetCoreApp10; FrameworkConstants.CommonFrameworks.NetCoreApp11;
private const string TestProjectName = "AppWithToolDependency"; private const string TestProjectName = "AppWithToolDependency";
@ -279,6 +279,7 @@ namespace Microsoft.DotNet.Tests
var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
projectToolsCommandResolver.GenerateDepsJsonFile( projectToolsCommandResolver.GenerateDepsJsonFile(
lockFile, lockFile,
s_toolPackageFramework,
depsJsonFile, depsJsonFile,
new SingleProjectInfo("dotnet-portable", "1.0.0", Enumerable.Empty<ResourceAssemblyInfo>())); new SingleProjectInfo("dotnet-portable", "1.0.0", Enumerable.Empty<ResourceAssemblyInfo>()));

View file

@ -0,0 +1,27 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.DotNet.PlatformAbstractions;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public static class EnvironmentInfo
{
public static bool HasSharedFramework(string framework)
{
if (framework == "netcoreapp1.0")
{
string rid = RuntimeEnvironment.GetRuntimeIdentifier();
switch (rid)
{
case "fedora.24-x64":
case "opensuse.42.1-x64":
case "ubuntu.16.10-x64":
return false;
}
}
return true;
}
}
}

View file

@ -0,0 +1,18 @@
// 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 Xunit;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public class RequiresSpecificFrameworkFactAttribute : FactAttribute
{
public RequiresSpecificFrameworkFactAttribute(string framework)
{
if (!EnvironmentInfo.HasSharedFramework(framework))
{
this.Skip = $"This test requires a shared framework that isn't present: {framework}";
}
}
}
}

View file

@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp1.0") var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp1.1")
.GetFile($"{testAppName}.dll"); .GetFile($"{testAppName}.dll");
var outputRunCommand = new TestCommand("dotnet"); var outputRunCommand = new TestCommand("dotnet");
@ -46,7 +46,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
string dir = "pkgs"; string dir = "pkgs";
string args = $"--packages {dir}"; string args = $"--packages {dir}";
string newArgs = $"console -o \"{rootPath}\" --debug:ephemeral-hive"; string newArgs = $"console -f netcoreapp1.1 -o \"{rootPath}\" --debug:ephemeral-hive";
new NewCommandShim() new NewCommandShim()
.WithWorkingDirectory(rootPath) .WithWorkingDirectory(rootPath)
.Execute(newArgs) .Execute(newArgs)
@ -65,7 +65,12 @@ namespace Microsoft.DotNet.Cli.Build.Tests
.Execute() .Execute()
.Should().Pass(); .Should().Pass();
var outputDll = Directory.EnumerateFiles(Path.Combine(rootPath, "bin"), "*.dll", SearchOption.AllDirectories).Single(); var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var outputDll = Directory.EnumerateFiles(
Path.Combine(rootPath, "bin", configuration, "netcoreapp1.1"), "*.dll",
SearchOption.TopDirectoryOnly)
.Single();
var outputRunCommand = new TestCommand("dotnet"); var outputRunCommand = new TestCommand("dotnet");

View file

@ -431,6 +431,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug") .Execute("build -c Debug")
.Should().Pass(); .Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.0"))
{
// running the app requires netcoreapp1.0
return;
}
var cmd = new DotnetCommand() var cmd = new DotnetCommand()
.WithWorkingDirectory(projectDirectory) .WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug"); .ExecuteWithCapturedOutput("run -c Debug");
@ -483,6 +489,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug") .Execute("build -c Debug")
.Should().Pass(); .Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.0"))
{
// running the app requires netcoreapp1.0
return;
}
var cmd = new DotnetCommand() var cmd = new DotnetCommand()
.WithWorkingDirectory(projectDirectory) .WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug"); .ExecuteWithCapturedOutput("run -c Debug");
@ -534,6 +546,12 @@ namespace Microsoft.DotNet.Migration.Tests
.Execute("build -c Debug") .Execute("build -c Debug")
.Should().Pass(); .Should().Pass();
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.0"))
{
// running the app requires netcoreapp1.0
return;
}
var cmd = new DotnetCommand() var cmd = new DotnetCommand()
.WithWorkingDirectory(projectDirectory) .WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("run -c Debug"); .ExecuteWithCapturedOutput("run -c Debug");

View file

@ -492,7 +492,7 @@ namespace Microsoft.DotNet.Migration.Tests
} }
outputsIdentical.Should().BeTrue(); outputsIdentical.Should().BeTrue();
VerifyAllMSBuildOutputsRunnable(projectDirectory); VerifyAllMSBuildOutputsRunnable(projectDirectory);
} }
@ -543,7 +543,7 @@ namespace Microsoft.DotNet.Migration.Tests
.And.Contain("Migration failed."); .And.Contain("Migration failed.");
} }
[Fact] [RequiresSpecificFrameworkFact("netcoreapp1.0")]
public void ItMigratesAndPublishesProjectsWithRuntimes() public void ItMigratesAndPublishesProjectsWithRuntimes()
{ {
var projectName = "PJTestAppSimple"; var projectName = "PJTestAppSimple";
@ -745,6 +745,12 @@ namespace Microsoft.DotNet.Migration.Tests
private void VerifyAllMSBuildOutputsRunnable(DirectoryInfo projectDirectory) private void VerifyAllMSBuildOutputsRunnable(DirectoryInfo projectDirectory)
{ {
if (!EnvironmentInfo.HasSharedFramework("netcoreapp1.0"))
{
// running the apps requires netcoreapp1.0
return;
}
var dllFileName = Path.GetFileName(projectDirectory.FullName) + ".dll"; var dllFileName = Path.GetFileName(projectDirectory.FullName) + ".dll";
var runnableDlls = projectDirectory var runnableDlls = projectDirectory

View file

@ -30,6 +30,13 @@ namespace Microsoft.DotNet.New.Tests
string projectType, string projectType,
bool useNuGetConfigForAspNet) bool useNuGetConfigForAspNet)
{ {
if (language == "F#" && !EnvironmentInfo.HasSharedFramework("netcoreapp1.0"))
{
// F# requires netcoreapp1.0 to be present in order to build
// https://github.com/dotnet/netcorecli-fsc/issues/76
return;
}
string rootPath = TestAssetsManager.CreateTestDirectory(identifier: $"{language}_{projectType}").Path; string rootPath = TestAssetsManager.CreateTestDirectory(identifier: $"{language}_{projectType}").Path;
new TestCommand("dotnet") { WorkingDirectory = rootPath } new TestCommand("dotnet") { WorkingDirectory = rootPath }

View file

@ -29,11 +29,11 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
new PublishCommand() new PublishCommand()
.WithWorkingDirectory(testProjectDirectory) .WithWorkingDirectory(testProjectDirectory)
.Execute("--framework netcoreapp1.0") .Execute("--framework netcoreapp1.1")
.Should().Pass(); .Should().Pass();
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0", "publish", $"{testAppName}.dll"); var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.1", "publish", $"{testAppName}.dll");
new TestCommand("dotnet") new TestCommand("dotnet")
.ExecuteWithCapturedOutput(outputDll) .ExecuteWithCapturedOutput(outputDll)
@ -56,7 +56,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier(); var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
new PublishCommand() new PublishCommand()
.WithFramework("netcoreapp1.0") .WithFramework("netcoreapp1.1")
.WithRuntime(rid) .WithRuntime(rid)
.WithWorkingDirectory(testProjectDirectory) .WithWorkingDirectory(testProjectDirectory)
//Workaround for https://github.com/dotnet/cli/issues/4501 //Workaround for https://github.com/dotnet/cli/issues/4501
@ -67,7 +67,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var outputProgram = testProjectDirectory var outputProgram = testProjectDirectory
.GetDirectory("bin", configuration, "netcoreapp1.0", rid, "publish", $"{testAppName}{Constants.ExeSuffix}") .GetDirectory("bin", configuration, "netcoreapp1.1", rid, "publish", $"{testAppName}{Constants.ExeSuffix}")
.FullName; .FullName;
new TestCommand(outputProgram) new TestCommand(outputProgram)
@ -85,7 +85,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
string dir = "pkgs"; string dir = "pkgs";
string args = $"--packages {dir}"; string args = $"--packages {dir}";
string newArgs = $"console -o \"{rootPath}\""; string newArgs = $"console -f netcoreapp1.1 -o \"{rootPath}\"";
new NewCommandShim() new NewCommandShim()
.WithWorkingDirectory(rootPath) .WithWorkingDirectory(rootPath)
.Execute(newArgs) .Execute(newArgs)
@ -107,7 +107,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var outputProgram = rootDir var outputProgram = rootDir
.GetDirectory("bin", configuration, "netcoreapp1.0", "publish", $"{rootDir.Name}.dll") .GetDirectory("bin", configuration, "netcoreapp1.1", "publish", $"{rootDir.Name}.dll")
.FullName; .FullName;
new TestCommand(outputProgram) new TestCommand(outputProgram)

View file

@ -72,7 +72,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
new RunCommand() new RunCommand()
.WithWorkingDirectory(testProjectDirectory) .WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput("--framework netcoreapp1.0") .ExecuteWithCapturedOutput("--framework netcoreapp1.1")
.Should().Pass() .Should().Pass()
.And.HaveStdOutContaining("Hello World!"); .And.HaveStdOutContaining("Hello World!");
} }
@ -123,7 +123,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
string dir = "pkgs"; string dir = "pkgs";
string args = $"--packages {dir}"; string args = $"--packages {dir}";
string newArgs = $"console -o \"{rootPath}\""; string newArgs = $"console -f netcoreapp1.1 -o \"{rootPath}\"";
new NewCommandShim() new NewCommandShim()
.WithWorkingDirectory(rootPath) .WithWorkingDirectory(rootPath)
.Execute(newArgs) .Execute(newArgs)

View file

@ -87,7 +87,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
string expectedError = Path.Combine(testProjectDirectory, "bin", string expectedError = Path.Combine(testProjectDirectory, "bin",
configuration, "netcoreapp1.0", "VSTestDotNetCore.dll"); configuration, "netcoreapp1.1", "VSTestDotNetCore.dll");
expectedError = "The test source file " + "\"" + expectedError + "\"" + " provided was not found."; expectedError = "The test source file " + "\"" + expectedError + "\"" + " provided was not found.";
// Call test // Call test

View file

@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests
.Should().Pass(); .Should().Pass();
var outputDll = testRoot var outputDll = testRoot
.GetDirectory("bin", configuration, "netcoreapp1.0") .GetDirectory("bin", configuration, "netcoreapp1.1")
.GetFile($"{testAppName}.dll"); .GetFile($"{testAppName}.dll");
var argsForVstest = $"\"{outputDll.FullName}\" {TestBase.ConsoleLoggerOutputNormal}"; var argsForVstest = $"\"{outputDll.FullName}\" {TestBase.ConsoleLoggerOutputNormal}";

View file

@ -109,7 +109,7 @@ namespace Microsoft.DotNet.Tests
.WithSourceFiles() .WithSourceFiles()
.WithRestoreFiles(); .WithRestoreFiles();
const string framework = ".NETCoreApp,Version=v1.0"; const string framework = ".NETCoreApp,Version=v1.1";
new BuildCommand() new BuildCommand()
.WithProjectDirectory(testInstance.Root) .WithProjectDirectory(testInstance.Root)
@ -289,7 +289,7 @@ namespace Microsoft.DotNet.Tests
.WithRestoreFiles(); .WithRestoreFiles();
var assetsFile = new DirectoryInfo(new RepoDirectoriesProvider().NugetPackages) var assetsFile = new DirectoryInfo(new RepoDirectoriesProvider().NugetPackages)
.GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp1.0") .GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp1.1")
.GetFile("project.assets.json"); .GetFile("project.assets.json");
var stopWatch = Stopwatch.StartNew(); var stopWatch = Stopwatch.StartNew();
@ -319,7 +319,7 @@ namespace Microsoft.DotNet.Tests
.WithRestoreFiles(); .WithRestoreFiles();
var assetsFile = new DirectoryInfo(new RepoDirectoriesProvider().NugetPackages) var assetsFile = new DirectoryInfo(new RepoDirectoriesProvider().NugetPackages)
.GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp1.0") .GetDirectory(".tools", "dotnet-portable", "1.0.0", "netcoreapp1.1")
.GetFile("project.assets.json"); .GetFile("project.assets.json");
var stopWatch = Stopwatch.StartNew(); var stopWatch = Stopwatch.StartNew();