Skip to content

Commit

Permalink
Use Arcade (dotnet/extensions#586)
Browse files Browse the repository at this point in the history
Use arcade


Commit migrated from dotnet/extensions@f045899
  • Loading branch information
ryanbrandenburg committed Jan 29, 2019
1 parent de19c56 commit 7b02e5a
Show file tree
Hide file tree
Showing 76 changed files with 246 additions and 178 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\ParameterDefaultValue\ParameterDefaultValue.cs">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\cs\netstandard1.0\</PackagePath>
</Compile>
</ItemGroup>

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<Project>
<PropertyGroup>
<IsShipping>false</IsShipping>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\ParameterDefaultValue\ParameterDefaultValue.cs">
<Pack>true</Pack>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
Expand Down

This file was deleted.

26 changes: 24 additions & 2 deletions src/libraries/Common/src/Extensions/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
<Project>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />

<PropertyGroup>
<!-- This does not represent the TFM for the code. It's only here because /t:Pack requires it. -->
<TargetFramework>netstandard1.0</TargetFramework>
<IsPackable>true</IsPackable>
<IsShipping>false</IsShipping>
<NoBuild>true</NoBuild>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<EnableDefaultItems>false</EnableDefaultItems>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<PackageId>Microsoft.Extensions.$(ProjectDirName).Sources</PackageId>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DefaultExcludeItems>$(DefaultExcludeItems);$(BaseOutputPath);$(BaseIntermediateOutputPath);</DefaultExcludeItems>
<NoWarn>$(NoWarn);NU5105;CS8021</NoWarn>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildProjectDirectory)\**\*.cs" Exclude="$(DefaultExcludeItems)">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\cs\netstandard1.0\shared\</PackagePath>
</Compile>
<EmbeddedResource Include="$(MSBuildProjectDirectory)\**\*.resx" Exclude="$(DefaultExcludeItems)">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\any\any\shared\</PackagePath>
</EmbeddedResource>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Microsoft.Extensions.Configuration.IConfigurationBuilder
Microsoft.Extensions.Configuration.IConfigurationProvider
Microsoft.Extensions.Configuration.IConfigurationRoot
Microsoft.Extensions.Configuration.IConfigurationSection</Description>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
<PropertyGroup>
<Description>Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.Binder.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
</ItemGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<Description>Command line configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);commandline</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.CommandLine.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
</ItemGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<Description>Environment variables configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);envvar;environmentvariable</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.EnvironmentVariables.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
</ItemGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
<PropertyGroup>
<Description>Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.FileExtensions.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
<Reference Include="Microsoft.Extensions.FileProviders.Physical" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<Description>INI configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);ini</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.Ini.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<Description>JSON configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);json</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.Json.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<Description>User secrets configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);secrets;usersecrets</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.UserSecrets.Tests" />
</ItemGroup>

<ItemGroup>
<Content Include="build\netstandard2.0\$(MSBuildProjectName).props" PackagePath="%(Identity)" />
<Content Include="build\netstandard2.0\$(MSBuildProjectName).targets" PackagePath="%(Identity)" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ open System
break;
}

foreach (var file in new[] { Path.Join(_tempDir, "Directory.Build.props"), Path.Join(_tempDir, "Directory.Build.targets") })
{
if (!File.Exists(file))
{
using (var fileStream = File.CreateText(file))
{
fileStream.WriteLine(@"
<Project>
<!-- Intentionally empty to isolate tools projects from the result of the repo -->
</Project>
");
}
}
}

var assemblyInfoFile = Path.Combine(_tempDir, $"obj/Debug/{testTfm}/test.AssemblyInfo" + sourceExt);

AssertDotNet("restore");
Expand All @@ -103,7 +118,7 @@ open System

AssertDotNet("build --configuration Debug");

Assert.True(File.Exists(assemblyInfoFile), $"{assemblyInfoFile} should not exist but does not");
Assert.True(File.Exists(assemblyInfoFile), $"{assemblyInfoFile} should exist but does not");
var contents = File.ReadAllText(assemblyInfoFile);
Assert.Contains("assembly: Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute(\"xyz123\")", contents);
var lastWrite = new FileInfo(assemblyInfoFile).LastWriteTimeUtc;
Expand Down Expand Up @@ -134,10 +149,12 @@ void LogData(object obj, DataReceivedEventArgs e)
StartInfo = processInfo
};
process.OutputDataReceived += LogData;
process.ErrorDataReceived += LogData;
process.Start();
process.BeginOutputReadLine();
process.WaitForExit();
process.OutputDataReceived -= LogData;
process.ErrorDataReceived -= LogData;
Assert.Equal(0, process.ExitCode);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
<Description>XML configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);xml</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.Xml.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" />
<Reference Include="System.Security.Cryptography.Xml" />
</ItemGroup>

</Project>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
<PropertyGroup>
<Description>Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration.Abstractions" />
</ItemGroup>
Expand Down

This file was deleted.

Loading

0 comments on commit 7b02e5a

Please sign in to comment.