Upgrade to RC.3

This commit is contained in:
Nate McMaster 2017-01-18 11:14:43 -08:00
parent e325d9b52e
commit fac6b44bbd
17 changed files with 48 additions and 174 deletions

View File

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26020.0
VisualStudioVersion = 15.0.26118.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{66517987-2A5A-4330-B130-207039378FD4}"
EndProject

View File

@ -8,10 +8,11 @@
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Internal.AspNetCore.Sdk" Version="1.0.0-*" PrivateAssets="All" />
<PackageReference Include="Internal.AspNetCore.Sdk" Version="1.0.1-*" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -1,5 +0,0 @@
{
"sdk": {
"version": "1.0.0-preview4-004233"
}
}

View File

@ -9,21 +9,21 @@
<PackageId>Microsoft.DotNet.Watcher.Tools</PackageId>
<PackageTags>dotnet;watch</PackageTags>
<PackageType>DotnetCliTool</PackageType>
<NetCoreAppImplicitPackageVersion>1.0.0</NetCoreAppImplicitPackageVersion>
<ContentTargetFolders>toolassets</ContentTargetFolders>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\..\shared\**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
<EmbeddedResource Include="dotnetwatch.targets" LogicalName="dotnetwatch.targets" />
<Content Include="toolassets\*.targets" CopyToOutputDirectory="PreserveNewest" Pack="true" PackagePath="%(Identity)" />
<None Include="prefercliruntime" Pack="true" PackagePath="\prefercliruntime" />
<None Include="$(ProjectRuntimeConfigFilePath)" Pack="true" PackagePath="lib\$(TargetFramework)" Condition="'$(DesignTimeBuild)'!='true'" />
<None Include="toolassets\*.targets" Pack="true" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Process.Sources" Version="1.1.0-*" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.Process.Sources" Version="1.2.0-*" PrivateAssets="All" />
</ItemGroup>
<Import Project="..\workaround.targets" />
</Project>

View File

@ -1,115 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// TODO remove and using Microsoft.Extensions.Process.Sources when https://github.com/dotnet/sdk/issues/115 is fixed
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
namespace Microsoft.Extensions.Internal
{
internal static class ProcessExtensions
{
private static readonly bool _isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
private static readonly TimeSpan _defaultTimeout = TimeSpan.FromSeconds(30);
public static void KillTree(this Process process)
{
process.KillTree(_defaultTimeout);
}
public static void KillTree(this Process process, TimeSpan timeout)
{
string stdout;
if (_isWindows)
{
RunProcessAndWaitForExit(
"taskkill",
$"/T /F /PID {process.Id}",
timeout,
out stdout);
}
else
{
var children = new HashSet<int>();
GetAllChildIdsUnix(process.Id, children, timeout);
foreach (var childId in children)
{
KillProcessUnix(childId, timeout);
}
KillProcessUnix(process.Id, timeout);
}
}
private static void GetAllChildIdsUnix(int parentId, ISet<int> children, TimeSpan timeout)
{
string stdout;
var exitCode = RunProcessAndWaitForExit(
"pgrep",
$"-P {parentId}",
timeout,
out stdout);
if (exitCode == 0 && !string.IsNullOrEmpty(stdout))
{
using (var reader = new StringReader(stdout))
{
while (true)
{
var text = reader.ReadLine();
if (text == null)
{
return;
}
int id;
if (int.TryParse(text, out id))
{
children.Add(id);
// Recursively get the children
GetAllChildIdsUnix(id, children, timeout);
}
}
}
}
}
private static void KillProcessUnix(int processId, TimeSpan timeout)
{
string stdout;
RunProcessAndWaitForExit(
"kill",
$"-TERM {processId}",
timeout,
out stdout);
}
private static int RunProcessAndWaitForExit(string fileName, string arguments, TimeSpan timeout, out string stdout)
{
var startInfo = new ProcessStartInfo
{
FileName = fileName,
Arguments = arguments,
RedirectStandardOutput = true,
UseShellExecute = false
};
var process = Process.Start(startInfo);
stdout = null;
if (process.WaitForExit((int)timeout.TotalMilliseconds))
{
stdout = process.StandardOutput.ReadToEnd();
}
else
{
process.Kill();
}
return process.ExitCode;
}
}
}

View File

@ -8,17 +8,18 @@
<PackageId>Microsoft.Extensions.Caching.SqlConfig.Tools</PackageId>
<PackageTags>cache;distributedcache;sqlserver</PackageTags>
<PackageType>DotnetCliTool</PackageType>
<NetCoreAppImplicitPackageVersion>1.0.0</NetCoreAppImplicitPackageVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\..\shared\**\*.cs" />
<None Include="prefercliruntime" Pack="true" PackagePath="\prefercliruntime" />
<None Include="$(ProjectRuntimeConfigFilePath)" Pack="true" PackagePath="lib\$(TargetFramework)" Condition="'$(DesignTimeBuild)'!='true'" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.1.0" />
</ItemGroup>
<Import Project="..\workaround.targets" />
</Project>

View File

@ -9,19 +9,19 @@
<PackageTags>configuration;secrets;usersecrets</PackageTags>
<PackageType>DotnetCliTool</PackageType>
<GenerateUserSecretsAttribute>false</GenerateUserSecretsAttribute>
<NetCoreAppImplicitPackageVersion>1.0.0</NetCoreAppImplicitPackageVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\..\shared\**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
<EmbeddedResource Include="resources\ProjectIdResolverTargets.xml" LogicalName="ProjectIdResolverTargets.xml" />
<None Include="prefercliruntime" Pack="true" PackagePath="\prefercliruntime" />
<None Include="$(ProjectRuntimeConfigFilePath)" Pack="true" PackagePath="lib\$(TargetFramework)" Condition="'$(DesignTimeBuild)'!='true'" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="1.0.1" />
</ItemGroup>
<Import Project="..\workaround.targets" />
</Project>

23
src/workaround.targets Normal file
View File

@ -0,0 +1,23 @@
<Project>
<!-- workaround https://github.com/NuGet/Home/issues/4321
When fixed, replace with this instead
<None Include="$(ProjectRuntimeConfigFilePath)" Pack="true" PackagePath="lib\$(TargetFramework)\" />
-->
<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes);lib\**\*</DefaultItemExcludes>
</PropertyGroup>
<Target Name="PackRuntimeConfigurationFile"
DependsOnTargets="GenerateBuildRuntimeConfigurationFiles"
BeforeTargets="_GetPackageFiles">
<Copy SourceFiles="$(ProjectRuntimeConfigFilePath)" DestinationFolder="$(MSBuildProjectDirectory)\lib\netcoreapp1.0\" />
<ItemGroup>
<_PackageFiles Include="lib\netcoreapp1.0\*.json" BuildAction="None" PackagePath="%(Identity)" />
</ItemGroup>
</Target>
<Target Name="CleanupTempRuntimeConfigurationFile"
AfterTargets="Pack">
<RemoveDir Directories="$(MSBuildProjectDirectory)\lib\" />
</Target>
<!-- end workaround -->
</Project>

View File

@ -4,10 +4,10 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp1.0;netcoreapp1.1</TargetFrameworks>
<DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" Exclude="TestProjects\**\*" />
<Compile Include="..\Shared\**\*.cs" />
<Content Include="TestProjects\**\*" CopyToOutputDirectory="PreserveNewest" />
<Content Include="..\..\src\Microsoft.DotNet.Watcher.Tools\toolassets\DotNetWatchInner.targets" Link="toolassets\DotNetWatchInner.targets" CopyToOutputDirectory="PreserveNewest" />
@ -18,19 +18,11 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.DotNet.Watcher.Tools\Microsoft.DotNet.Watcher.Tools.csproj" />
<ProjectReference Include="..\Microsoft.DotNet.Watcher.Tools.Tests\Microsoft.DotNet.Watcher.Tools.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161123-03" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
<PackageReference Include="xunit" Version="2.2.0-*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.1'">
<PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.0'">
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
</ItemGroup>
<Target Name="CleanTestProjects" BeforeTargets="CoreCompile">
<RemoveDir Directories="$(TargetDir)TestProjects" Condition="Exists('$(TargetDir)TestProjects')" />
</Target>

View File

@ -6,10 +6,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
<ProjectReference Include="..\Dependency\Dependency.csproj" />
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
</ItemGroup>
</Project>

View File

@ -2,13 +2,6 @@
<PropertyGroup>
<TargetFramework>netstandard1.5</TargetFramework>
<OutputType>library</OutputType>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
</ItemGroup>
</Project>

View File

@ -3,12 +3,11 @@
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<OutputType>exe</OutputType>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.cs;include\*.cs" Exclude="exclude\*" />
<EmbeddedResource Include="**\*.resx" />
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
</ItemGroup>
</Project>

View File

@ -5,10 +5,4 @@
<OutputType>exe</OutputType>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
</ItemGroup>
</Project>

View File

@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\Shared\**\*.cs" />
<Content Include="..\..\src\Microsoft.DotNet.Watcher.Tools\toolassets\DotNetWatchInner.targets" Link="toolassets\DotNetWatchInner.targets" CopyToOutputDirectory="PreserveNewest" />
<Content Include="..\..\src\Microsoft.DotNet.Watcher.Tools\toolassets\DotNetWatchOuter.targets" Link="toolassets\DotNetWatchOuter.targets" CopyToOutputDirectory="PreserveNewest" />
@ -16,8 +15,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.DotNet.Watcher.Tools\Microsoft.DotNet.Watcher.Tools.csproj" />
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161123-03" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
<PackageReference Include="xunit" Version="2.2.0-*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
</ItemGroup>

View File

@ -7,14 +7,12 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\Shared\**\*.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Extensions.SecretManager.Tools\Microsoft.Extensions.SecretManager.Tools.csproj" />
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161123-03" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
<PackageReference Include="xunit" Version="2.2.0-*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
</ItemGroup>

View File

@ -37,11 +37,11 @@ namespace Microsoft.Extensions.Configuration.UserSecrets.Tests
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
{0}
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<ItemGroup>
<Compile Include=""**\*.cs"" Exclude=""Excluded.cs"" />
<PackageReference Include=""Microsoft.NETCore.App"" Version=""1.0.1"" />
<Compile Include=""**\*.cs"" Exclude=""Excluded.cs;$(DefaultItemExcludes)"" />
</ItemGroup>
</Project>";

View File

@ -7,13 +7,11 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\..\shared\**\*.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161123-03" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
<PackageReference Include="xunit" Version="2.2.0-*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />
</ItemGroup>