Upgrade CLI tools to .NET Core 2.1

This commit is contained in:
Nate McMaster 2017-12-12 14:37:42 -08:00
parent b434d49304
commit 1f3f010f87
23 changed files with 39 additions and 33 deletions

View File

@ -1,4 +1,8 @@
<Project> <Project>
<Import
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props"
Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " />
<Import Project="version.props" /> <Import Project="version.props" />
<Import Project="build\dependencies.props" /> <Import Project="build\dependencies.props" />
<Import Project="build\sources.props" /> <Import Project="build\sources.props" />

View File

@ -1,6 +1,5 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion> <RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -27,7 +27,7 @@
"Microsoft.AspNetCore.DeveloperCertificates.XPlat": { "Microsoft.AspNetCore.DeveloperCertificates.XPlat": {
"Exclusions": { "Exclusions": {
"DOC_MISSING": { "DOC_MISSING": {
"lib/netcoreapp2.0/Microsoft.AspNetCore.DeveloperCertificates.XPlat.dll": "Enter justification" "lib/netcoreapp2.1/Microsoft.AspNetCore.DeveloperCertificates.XPlat.dll": "Docs not required to shipoob package"
} }
} }
} }

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems> <EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>dotnet-developercertificates</AssemblyName> <AssemblyName>dotnet-developercertificates</AssemblyName>
<OutputType>exe</OutputType> <OutputType>exe</OutputType>
<Description>Command line tool to generate certificates used in ASP.NET Core during development.</Description> <Description>Command line tool to generate certificates used in ASP.NET Core during development.</Description>

View File

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<Description>Package for the CLI first run experience.</Description> <Description>Package for the CLI first run experience.</Description>
<DefineConstants>$(DefineConstants);XPLAT</DefineConstants> <DefineConstants>$(DefineConstants);XPLAT</DefineConstants>
<PackageTags>aspnet;cli</PackageTags> <PackageTags>aspnet;cli</PackageTags>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>dotnet-watch</AssemblyName> <AssemblyName>dotnet-watch</AssemblyName>
<OutputType>exe</OutputType> <OutputType>exe</OutputType>
<Description>Command line tool to watch for source file changes during development and restart the dotnet command.</Description> <Description>Command line tool to watch for source file changes during development and restart the dotnet command.</Description>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>dotnet-sql-cache</AssemblyName> <AssemblyName>dotnet-sql-cache</AssemblyName>
<OutputType>exe</OutputType> <OutputType>exe</OutputType>
<Description>Command line tool to create tables and indexes in a Microsoft SQL Server database for distributed caching.</Description> <Description>Command line tool to create tables and indexes in a Microsoft SQL Server database for distributed caching.</Description>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>dotnet-user-secrets</AssemblyName> <AssemblyName>dotnet-user-secrets</AssemblyName>
<OutputType>exe</OutputType> <OutputType>exe</OutputType>
<Description>Command line tool to manage user secrets for Microsoft.Extensions.Configuration.</Description> <Description>Command line tool to manage user secrets for Microsoft.Extensions.Configuration.</Description>

View File

@ -292,7 +292,7 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
{ {
changedEv.Set(); changedEv.Set();
} }
catch(ObjectDisposedException) catch (ObjectDisposedException)
{ {
// There's a known race condition here: // There's a known race condition here:
// even though we tell the watcher to stop raising events and we unsubscribe the handler // even though we tell the watcher to stop raising events and we unsubscribe the handler
@ -316,8 +316,10 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
var testFileFullPath = Path.Combine(dir, "foo1"); var testFileFullPath = Path.Combine(dir, "foo1");
File.WriteAllText(testFileFullPath, string.Empty); File.WriteAllText(testFileFullPath, string.Empty);
Assert.True(changedEv.WaitOne(DefaultTimeout)); Assert.True(changedEv.WaitOne(DefaultTimeout));
Assert.Equal(testFileFullPath, filesChanged.Single()); var fileChanged = Assert.Single(filesChanged);
Assert.Equal(testFileFullPath, fileChanged);
filesChanged.Clear(); filesChanged.Clear();
changedEv.Reset();
// On Unix the file write time is in 1s increments; // On Unix the file write time is in 1s increments;
// if we don't wait, there's a chance that the polling // if we don't wait, there's a chance that the polling
@ -327,8 +329,10 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
testFileFullPath = Path.Combine(dir, "foo2"); testFileFullPath = Path.Combine(dir, "foo2");
File.WriteAllText(testFileFullPath, string.Empty); File.WriteAllText(testFileFullPath, string.Empty);
Assert.True(changedEv.WaitOne(DefaultTimeout)); Assert.True(changedEv.WaitOne(DefaultTimeout));
Assert.Equal(testFileFullPath, filesChanged.Single()); fileChanged = Assert.Single(filesChanged);
Assert.Equal(testFileFullPath, fileChanged);
filesChanged.Clear(); filesChanged.Clear();
changedEv.Reset();
// On Unix the file write time is in 1s increments; // On Unix the file write time is in 1s increments;
// if we don't wait, there's a chance that the polling // if we don't wait, there's a chance that the polling
@ -340,6 +344,7 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
Assert.True(changedEv.WaitOne(DefaultTimeout)); Assert.True(changedEv.WaitOne(DefaultTimeout));
Assert.Equal(testFileFullPath, filesChanged.Single()); Assert.Equal(testFileFullPath, filesChanged.Single());
filesChanged.Clear(); filesChanged.Clear();
changedEv.Reset();
// On Unix the file write time is in 1s increments; // On Unix the file write time is in 1s increments;
// if we don't wait, there's a chance that the polling // if we don't wait, there's a chance that the polling
@ -348,7 +353,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
File.WriteAllText(testFileFullPath, string.Empty); File.WriteAllText(testFileFullPath, string.Empty);
Assert.True(changedEv.WaitOne(DefaultTimeout)); Assert.True(changedEv.WaitOne(DefaultTimeout));
Assert.Equal(testFileFullPath, filesChanged.Single()); fileChanged = Assert.Single(filesChanged);
Assert.Equal(testFileFullPath, fileChanged);
watcher.EnableRaisingEvents = false; watcher.EnableRaisingEvents = false;
watcher.OnFileChange -= handler; watcher.OnFileChange -= handler;

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes> <DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<OutputType>exe</OutputType> <OutputType>exe</OutputType>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<OutputType>exe</OutputType> <OutputType>exe</OutputType>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup> </PropertyGroup>

View File

@ -9,7 +9,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<OutputType>exe</OutputType> <OutputType>exe</OutputType>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -6,6 +6,7 @@ using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing;
using Microsoft.DotNet.Watcher.Internal; using Microsoft.DotNet.Watcher.Internal;
using Microsoft.Extensions.Tools.Internal; using Microsoft.Extensions.Tools.Internal;
using Xunit; using Xunit;
@ -274,12 +275,9 @@ namespace Microsoft.DotNet.Watcher.Tools.Tests
private async Task<IFileSet> GetFileSet(MsBuildFileSetFactory filesetFactory) private async Task<IFileSet> GetFileSet(MsBuildFileSetFactory filesetFactory)
{ {
_tempDir.Create(); _tempDir.Create();
var createTask = filesetFactory.CreateAsync(CancellationToken.None); return await filesetFactory
var finished = await Task.WhenAny(createTask, Task.Delay(TimeSpan.FromSeconds(10))); .CreateAsync(CancellationToken.None)
.TimeoutAfter(TimeSpan.FromSeconds(30));
Assert.Same(createTask, finished);
Assert.NotNull(createTask.Result);
return createTask.Result;
} }
public void Dispose() public void Dispose()

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -35,7 +35,7 @@ namespace Microsoft.Extensions.Configuration.UserSecrets.Tests
private const string ProjectTemplate = @"<Project ToolsVersion=""15.0"" Sdk=""Microsoft.NET.Sdk""> private const string ProjectTemplate = @"<Project ToolsVersion=""15.0"" Sdk=""Microsoft.NET.Sdk"">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks> <TargetFrameworks>netcoreapp2.1</TargetFrameworks>
{0} {0}
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup> </PropertyGroup>