Skip to content

Commit

Permalink
Add Arcade SDK files (dotnet#155)
Browse files Browse the repository at this point in the history
* Add Arcade SDK files

* fix nuget config

* update a few files
  • Loading branch information
michellemcdaniel authored Nov 26, 2018
1 parent 0a033c2 commit bef565a
Show file tree
Hide file tree
Showing 70 changed files with 4,379 additions and 11 deletions.
8 changes: 8 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
</Project>
4 changes: 4 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
</Project>
15 changes: 15 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />

<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="benchmarkdotnet-ci-feed" value="https://ci.appveyor.com/nuget/benchmarkdotnet" />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="arcade" value="https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json" />
</packageSources>
</configuration>
83 changes: 83 additions & 0 deletions eng/BuildTask.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>

<PropertyGroup>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IsPackable>true</IsPackable>
</PropertyGroup>

<!--
Default to including all *.props and *.targets files
from the project directory into the NuGet package root
-->
<ItemGroup Condition="'$(EnableDefaultItems)' != 'false'">
<None Condition="'$(EnableDefaultNoneItems)' != 'false'"
Include="**/*.props;**/*.targets" Pack="true">
<PackagePath>%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<None Include="$(RepoRoot)LICENSE.txt" PackagePath="LICENSE.txt" Pack="true"/>
<None Include="$(RepoRoot)THIRD-PARTY-NOTICES.txt" PackagePath="THIRD-PARTY-NOTICES.txt" Pack="true"/>
</ItemGroup>

<ItemGroup>
<!--
Update all PackageReference and ProjectReference Items to have
PrivateAssets="All" and default Publish to true.
This removes the dependency nodes from the generated nuspec and
forces the publish output to contain the dlls.
-->
<PackageReference Update="@(PackageReference)">
<PrivateAssets>All</PrivateAssets>
<Publish Condition="'%(PackageReference.Publish)' == ''">true</Publish>
<ExcludeAssets Condition="'%(PackageReference.Publish)' == 'false'">runtime</ExcludeAssets>
</PackageReference>
<ProjectReference Update="@(ProjectReference)">
<PrivateAssets>All</PrivateAssets>
<Publish Condition="'%(ProjectReference.Publish)' == ''">true</Publish>
</ProjectReference>

<!--
Update all Reference items to have Pack="false"
This removes the frameworkDependency nodes from the generated nuspec
-->
<Reference Update="@(Reference)">
<Pack>false</Pack>
</Reference>

<!--
Do not include assemblies that MSBuild ships with in the package.
-->
<PackageReference Update="Microsoft.Build" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="Microsoft.Build.Framework" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="Microsoft.Build.Tasks.Core" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="Microsoft.Build.Utilities.Core" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.Collections.Immutable" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.IO.Compression" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.Runtime.InteropServices.RuntimeInformation" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
<PackageReference Update="System.Threading.Tasks.Dataflow" PrivateAssets="All" Publish="false" ExcludeAssets="runtime" />
</ItemGroup>

<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddBuildOutputToPackageCore;_AddBuildOutputToPackageDesktop</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<Target Name="_AddBuildOutputToPackageCore" DependsOnTargets="Publish" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ItemGroup>
<!-- Publish .NET Core assets and include them in the package under tools directory. -->
<TfmSpecificPackageFile Include="$(PublishDir)**"
PackagePath="tools/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/>
</ItemGroup>
</Target>

<Target Name="_AddBuildOutputToPackageDesktop" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<ItemGroup>
<!-- Include .NET Framework build outputs in the package under tools directory. -->
<TfmSpecificPackageFile Include="$(OutputPath)**" PackagePath="tools/$(TargetFramework)/%(RecursiveDir)%(FileName)%(Extension)"/>
</ItemGroup>
</Target>
</Project>
37 changes: 37 additions & 0 deletions eng/Signing.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<Project>
<ItemGroup>
<!--
Suppresses code signing on this file because it causes a false-positive on SIGN001. This assembly comes from https://www.nuget.org/packages/Microsoft.VisualStudio.OLE.Interop/, but isn't code signed.
TODO: Make SIGN001 suppressable.
-->
<FileSignInfo Include="Microsoft.VisualStudio.OLE.Interop.dll" CertificateName="None" />
</ItemGroup>

<!--
These are third party libraries that we use in Arcade. We need to sign them even if they
are already signed. However, they must be signed with a 3rd party certificate.
-->
<ItemGroup>
<FileSignInfo Include="AWSSDK.Core.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="AWSSDK.S3.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="CommandLine.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Handlebars.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="SleetLib.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Swashbuckle.AspNetCore.Swagger.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Octokit.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="YamlDotNet.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Mono.Options.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Newtonsoft.Json.Bson.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="SevenZip.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="winterop.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="wix.dll" CertificateName="3PartySHA2" />

<!-- Despite being called "Microsoft.*", these are not produced by Microsoft. These assemblies come from the Wix toolset project. -->
<FileSignInfo Include="Microsoft.Deployment.Compression.Cab.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Microsoft.Deployment.Compression.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Microsoft.Deployment.Resources.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Microsoft.Deployment.WindowsInstaller.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Microsoft.Deployment.WindowsInstaller.Package.dll" CertificateName="3PartySHA2" />
</ItemGroup>
</Project>
23 changes: 23 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.18569.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>578524df5ce9f5785745727d406d4b7731a507cb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Maestro.Tasks" Version="1.0.0-beta.18569.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>578524df5ce9f5785745727d406d4b7731a507cb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SignTool" Version="1.0.0-beta.18569.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>578524df5ce9f5785745727d406d4b7731a507cb</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.18569.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>578524df5ce9f5785745727d406d4b7731a507cb</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
73 changes: 73 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- This repo version -->
<VersionPrefix>1.0.0</VersionPrefix>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<!-- Opt-out repo features -->
<UsingToolXliff>false</UsingToolXliff>
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
<MicrosoftNetFrameworkReferenceAssembliesVersion>1.0.0-alpha-004</MicrosoftNetFrameworkReferenceAssembliesVersion>
<!-- Libs -->
<CommandLineParserVersion>2.2.1</CommandLineParserVersion>
<CredentialManagementVersion>1.0.2</CredentialManagementVersion>
<HandlebarsNetVersion>1.9.5</HandlebarsNetVersion>
<LibGit2SharpVersion>0.25.2</LibGit2SharpVersion>
<log4netVersion>2.0.8</log4netVersion>
<SystemNetHttpVersion>4.3.3</SystemNetHttpVersion>
<MicrosoftBuildVersion>15.7.179</MicrosoftBuildVersion>
<MicrosoftBuildFrameworkVersion>15.7.179</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildTasksCoreVersion>15.7.179</MicrosoftBuildTasksCoreVersion>
<MicrosoftBuildUtilitiesCoreVersion>15.7.179</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftCodeAnalysisCSharpVersion>2.9.0</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftDotNetVersionToolsVersion>2.2.0-preview1-02815-01</MicrosoftDotNetVersionToolsVersion>
<MicrosoftIdentityModelClientsActiveDirectoryVersion>3.19.8</MicrosoftIdentityModelClientsActiveDirectoryVersion>
<MicrosoftRestClientRuntimeVersion>2.3.13</MicrosoftRestClientRuntimeVersion>
<MicrosoftExtensionsFileSystemGlobbingVersion>2.0.0</MicrosoftExtensionsFileSystemGlobbingVersion>
<MicrosoftNETCorePlatformsVersion>2.1.0</MicrosoftNETCorePlatformsVersion>
<MicrosoftNetTestSdkVersion>15.7.2</MicrosoftNetTestSdkVersion>
<MoqVersion>4.8.3</MoqVersion>
<MonoOptionsVersion>5.3.0.1</MonoOptionsVersion>
<NewtonsoftJsonVersion>9.0.1</NewtonsoftJsonVersion>
<NuGetVersioningVersion>4.4.0</NuGetVersioningVersion>
<NuGetVersion>4.4.0</NuGetVersion>
<OctokitVersion>0.30.0</OctokitVersion>
<DotNetSleetLibVersion>2.2.73</DotNetSleetLibVersion>
<SwashbuckleAspNetCoreSwaggerVersion>3.0.0</SwashbuckleAspNetCoreSwaggerVersion>
<SystemCollectionsImmutableVersion>1.3.1</SystemCollectionsImmutableVersion>
<SystemIOCompressionVersion>4.3.0</SystemIOCompressionVersion>
<SystemIOPackagingVersion>4.5.0</SystemIOPackagingVersion>
<SystemIOFileSystemPrimitivesVersion>4.3.0</SystemIOFileSystemPrimitivesVersion>
<SystemMemoryVersion>4.5.1</SystemMemoryVersion>
<SystemReflectionMetadataVersion>1.4.2</SystemReflectionMetadataVersion>
<SystemValueTupleVersion>4.4.0</SystemValueTupleVersion>
<WindowsAzureStorageVersion>8.5.0</WindowsAzureStorageVersion>
<XUnitVersion>2.4.1-pre.build.4059</XUnitVersion>
<XUnitVSRunnerVersion>2.4.1-pre.build.4059</XUnitVSRunnerVersion>
<MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.18569.4</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetMaestroTasksVersion>1.0.0-beta.18569.4</MicrosoftDotNetMaestroTasksVersion>
<MicrosoftDotNetSignToolVersion>1.0.0-beta.18569.4</MicrosoftDotNetSignToolVersion>
<!-- 3rd Part Packages Public Keys -->
<DynamicProxyGenAsm2Key>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</DynamicProxyGenAsm2Key>
</PropertyGroup>
<PropertyGroup>
<MicrosoftAzureDocumentDBVersion>1.22.0</MicrosoftAzureDocumentDBVersion>
<MicrosoftAzureCosmosDBTableVersion>1.1.2</MicrosoftAzureCosmosDBTableVersion>
</PropertyGroup>
<PropertyGroup>
<MicrosoftAspNetCoreAllVersion>2.0.0</MicrosoftAspNetCoreAllVersion>
<MicrosoftDotNetGitHubIssueLabelerAssetsVersion>1.2.0</MicrosoftDotNetGitHubIssueLabelerAssetsVersion>
<MicrosoftMLVersion>0.4.0</MicrosoftMLVersion>
<MicrosoftVisualStudioWebCodeGenerationDesignVersion>2.0.4</MicrosoftVisualStudioWebCodeGenerationDesignVersion>
<MicrosoftDiaSymReaderConverterVersion>1.1.0-beta1-62810-01</MicrosoftDiaSymReaderConverterVersion>
<MicrosoftDiaSymReaderNativeVersion>1.7.0</MicrosoftDiaSymReaderNativeVersion>
</PropertyGroup>
<PropertyGroup>
<RestoreSources>
$(RestoreSources);
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
https://dotnet.myget.org/F/symreader-converter/api/v3/index.json;
https:%2F%2Fdotnet.myget.org/F/symreader/api/v3/index.json
</RestoreSources>
</PropertyGroup>
</Project>
3 changes: 3 additions & 0 deletions eng/common/CIBuild.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
exit /b %ErrorLevel%
3 changes: 3 additions & 0 deletions eng/common/PublishBuildAssets.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -msbuildEngine dotnet -restore -execute /p:PublishBuildAssets=true /p:SdkTaskProjects=PublishBuildAssets.proj %*"
exit /b %ErrorLevel%
108 changes: 108 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
[string] $configuration = "Debug",
[string] $projects = "",
[string] $verbosity = "minimal",
[string] $msbuildEngine = $null,
[bool] $warnaserror = $true,
[bool] $nodereuse = $true,
[switch] $execute,
[switch] $restore,
[switch] $deployDeps,
[switch] $build,
[switch] $rebuild,
[switch] $deploy,
[switch] $test,
[switch] $integrationTest,
[switch] $performanceTest,
[switch] $sign,
[switch] $pack,
[switch] $publish,
[switch] $publishBuildAssets,
[switch] $ci,
[switch] $prepareMachine,
[switch] $help,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)

. $PSScriptRoot\tools.ps1

function Print-Usage() {
Write-Host "Common settings:"
Write-Host " -configuration <value> Build configuration Debug, Release"
Write-Host " -verbosity <value> Msbuild verbosity (q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic])"
Write-Host " -help Print help and exit"
Write-Host ""

Write-Host "Actions:"
Write-Host " -restore Restore dependencies"
Write-Host " -build Build solution"
Write-Host " -rebuild Rebuild solution"
Write-Host " -deploy Deploy built VSIXes"
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
Write-Host " -test Run all unit tests in the solution"
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host " -integrationTest Run all integration tests in the solution"
Write-Host " -performanceTest Run all performance tests in the solution"
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host " -publishBuildAssets Push assets to BAR"
Write-Host ""

Write-Host "Advanced settings:"
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
Write-Host " -ci Set when running on CI server"
Write-Host " -prepareMachine Prepare machine for CI run"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host ""
Write-Host "Command line arguments not listed above are passed thru to msbuild."
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}

if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage
exit 0
}

try {
if ($projects -eq "") {
$projects = Join-Path $RepoRoot "*.sln"
}

InitializeTools

$BuildLog = Join-Path $LogDir "Build.binlog"

MSBuild $ToolsetBuildProj `
/bl:$BuildLog `
/p:Configuration=$configuration `
/p:Projects=$projects `
/p:RepoRoot=$RepoRoot `
/p:Restore=$restore `
/p:DeployDeps=$deployDeps `
/p:Build=$build `
/p:Rebuild=$rebuild `
/p:Deploy=$deploy `
/p:Test=$test `
/p:Pack=$pack `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
/p:Publish=$publish `
/p:Execute=$execute `
/p:ContinuousIntegrationBuild=$ci `
@properties

if ($lastExitCode -ne 0) {
Write-Host "Build Failed (exit code '$lastExitCode'). See log: $BuildLog" -ForegroundColor Red
ExitWithExitCode $lastExitCode
}

ExitWithExitCode $lastExitCode
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
}
Loading

0 comments on commit bef565a

Please sign in to comment.