Skip to content

Commit

Permalink
Integrate changes needed to use Microsoft.Dotnet.Arcade.Wpf.Sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsan-madhavan committed Feb 18, 2019
1 parent 9cd4b3a commit 083719d
Show file tree
Hide file tree
Showing 26 changed files with 321 additions and 97 deletions.
19 changes: 6 additions & 13 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>

<PublishWindowsPdb>true</PublishWindowsPdb>
</PropertyGroup>

<Import Project="$(MsBuildThisFileDirectory)SystemResources.props"/>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Project>
<Import Project="$(MSBuildThisFileDirectory)eng\WpfArcadeSdk\Sdk\Sdk.props"
Condition="Exists('$(MSBuildThisFileDirectory)eng\WpfArcadeSdk\Sdk\Sdk.props') and '$(TestWpfArcadeSdk)' != 'true'"/>

<PropertyGroup>
<DebugType>full</DebugType>
</PropertyGroup>
<Import Sdk="Microsoft.DotNet.Arcade.Wpf.Sdk"
Project="Sdk.props"
Condition="!Exists('$(MSBuildThisFileDirectory)eng\WpfArcadeSdk\Sdk\Sdk.props') Or '$(TestWpfArcadeSdk)' == 'true'"/>
</Project>
10 changes: 6 additions & 4 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="$(MSBuildThisFileDirectory)Packaging.targets" />
<Import Project="$(MSBuildThisFileDirectory)Publishing.targets" />
<Import Project="$(MSBuildThisFileDirectory)eng\WpfArcadeSdk\Sdk\Sdk.targets"
Condition="Exists('$(MSBuildThisFileDirectory)eng\WpfArcadeSdk\Sdk\Sdk.targets') and '$(TestWpfArcadeSdk)' != 'true'"/>

<Import Sdk="Microsoft.DotNet.Arcade.Wpf.Sdk"
Project="Sdk.targets"
Condition="!Exists('$(MSBuildThisFileDirectory)eng\WpfArcadeSdk\Sdk\Sdk.targets') Or '$(TestWpfArcadeSdk)' == 'true'"/>
</Project>
43 changes: 40 additions & 3 deletions Microsoft.Dotnet.Wpf.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2048
# Visual Studio Version 16
VisualStudioVersion = 16.0.28407.52
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Xaml", "src\Microsoft.DotNet.Wpf\src\System.Xaml\System.Xaml.csproj", "{9AC36357-34B7-40A1-95CA-FE9F46D089A7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "packaging", "packaging", "{0159B0F1-0626-4BED-8D1B-CBFF4F12C369}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.DotNet.Wpf.GitHub", "Microsoft.DotNet.Wpf.GitHub", "{BF20132A-191F-4D34-9A1B-831772A6DFCF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Wpf.GitHub", "packaging\Microsoft.DotNet.Wpf.GitHub\Microsoft.DotNet.Wpf.GitHub.csproj", "{C847934A-828C-4EBB-A004-B0E97C8313F4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Wpf.GitHub.ArchNeutral", "packaging\Microsoft.DotNet.Wpf.GitHub\Microsoft.DotNet.Wpf.GitHub.ArchNeutral.csproj", "{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,11 +35,40 @@ Global
{9AC36357-34B7-40A1-95CA-FE9F46D089A7}.Release|x64.Build.0 = Release|x64
{9AC36357-34B7-40A1-95CA-FE9F46D089A7}.Release|x86.ActiveCfg = Release|Any CPU
{9AC36357-34B7-40A1-95CA-FE9F46D089A7}.Release|x86.Build.0 = Release|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Debug|x64.ActiveCfg = Debug|x64
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Debug|x64.Build.0 = Debug|x64
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Debug|x86.ActiveCfg = Debug|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Debug|x86.Build.0 = Debug|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Release|Any CPU.Build.0 = Release|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Release|x64.ActiveCfg = Release|x64
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Release|x64.Build.0 = Release|x64
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Release|x86.ActiveCfg = Release|Any CPU
{C847934A-828C-4EBB-A004-B0E97C8313F4}.Release|x86.Build.0 = Release|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Debug|x64.ActiveCfg = Debug|x64
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Debug|x64.Build.0 = Debug|x64
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Debug|x86.ActiveCfg = Debug|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Debug|x86.Build.0 = Debug|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Release|Any CPU.Build.0 = Release|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Release|x64.ActiveCfg = Release|x64
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Release|x64.Build.0 = Release|x64
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Release|x86.ActiveCfg = Release|Any CPU
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BF20132A-191F-4D34-9A1B-831772A6DFCF} = {0159B0F1-0626-4BED-8D1B-CBFF4F12C369}
{C847934A-828C-4EBB-A004-B0E97C8313F4} = {BF20132A-191F-4D34-9A1B-831772A6DFCF}
{9A7E395B-E859-40E2-809D-EFB72CF3A2EE} = {BF20132A-191F-4D34-9A1B-831772A6DFCF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {671D19D1-5F0E-4453-9D18-3A28AC0E8DEF}
SolutionGuid = {D4D12991-F531-4FC3-849D-29946BCA818A}
EndGlobalSection
EndGlobal
8 changes: 8 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
<configuration>
<packageSources>
<clear />
<add key="myget-fxlab" value="https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
<add key="arcade" value="https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json" />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="myget-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="windowsdesktop" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" />
<!--
Add additional paths here
For e.g., if you want to test a locally build nuget package, you can add it like this:
-->
<!--<add key="local" value="c:\temp\packages" />-->
</packageSources>
</configuration>
26 changes: 0 additions & 26 deletions Packaging.targets

This file was deleted.

3 changes: 0 additions & 3 deletions Publishing.targets

This file was deleted.

4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a simple wrapper for eng/ci.yml to get around the limitation of
# This is a simple wrapper for eng/pipeline.yml to get around the limitation of
# user-defined variables not being available in yaml template expressions.

# Parameters ARE available in template expressions, and parameters can have default values,
Expand All @@ -25,6 +25,6 @@ jobs:
parameters:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# agent pool can't be read from a user-defined variable (Azure DevOps limitation)
agentPool: dotnet-internal-temp-vs2019
agentPool: dotnet-internal-vs2019-preview
# runAsPublic is used in expressions, which can't read from user-defined variables
runAsPublic: false
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

source="${BASH_SOURCE[0]}"

# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"

# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done

scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/eng/common/build.sh" --build --restore $@
94 changes: 94 additions & 0 deletions eng/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
#

parameters:
name: ''
# send telemetry
enableTelemetry: true
# install Microbuild plugin if not a public build
enableMicrobuild: true
# queue YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#queue
queue: {}
# variables YAML object - https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted-schema.md#phase
variables: {}
# run this build as a public build, even in the internal project
runAsPublic: false

# Common conditionals: There are a number of common conditionals that are useful. Generally these are used to decide what resources can be accessed,
# or what logic should be applied based on the context the build is being run in.
# - eq/ne(variables['Agent.Os'], 'Windows_NT') - Running/not running on a windows machine
# - eq/ne(variables['System.TeamProject'], 'public') - Running/not running on the dotnet public VSTS project
# - and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest') - Not running in public and not a pull request.
# - or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest') - Running in public or a pull request.

phases:
- template: /eng/common/templates/phases/base.yml
parameters:
enableTelemetry: ${{ parameters.enableTelemetry }}

enableMicrobuild: ${{ parameters.enableMicrobuild }}

name: ${{ parameters.name }}

queue: ${{ parameters.queue }}

runAsPublic: ${{ parameters.runAsPublic }}

variables:
${{ insert }}: ${{ parameters.variables }}
_HelixBuildConfig: $(_BuildConfig)
# Only enable publishing in non-public, non PR scenarios.
${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# This should be changed to an isolated blob feed per-build.
# Right now a manual build of a random branch would get published alongside the normal branch artifacts.
_PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
_PublishArgs: /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
_OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
# else
${{ if or(eq(parameters.runAsPublic, 'true'), eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
_PublishArgs: ''
_OfficialBuildIdArgs: ''
_SignArgs: ''

steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: AzureKeyVault@1
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnetfeed-storage-access-key-1,microsoft-symbol-server-pat,symweb-symbol-server-pat'

# Use utility script to run script command dependent on agent OS.
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_PublishArgs)
$(_SignArgs)
$(_OfficialBuildIdArgs)
/p:Platform=$(_Platform) /p:IsShipping=$(_IsShipping)
displayName: Windows Build / Publish
condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))

- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
ArtifactName: $(Agent.Os)_$(Agent.JobName)
continueOnError: true
condition: always()

- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
continueOnError: true
condition: always()
12 changes: 12 additions & 0 deletions eng/configure-toolset.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
#

# This repo uses C++/CLI /clr:pure (or /clr:netcore) switches during compilation, which are
# deprecated. Ensure that this warning is always suppressed during build.
if (($properties -eq $null) -or (-not ($properties -icontains '/nowarn:D9035'))) {
$properties = @('/nowarn:D9035') + $properties
}

# Always generate binary logs
$binaryLog = $true
5 changes: 5 additions & 0 deletions eng/restore-toolset.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
#

. $PsScriptRoot\common\init-tools-native.ps1 -InstallDirectory $PSScriptRoot\..\.tools\native -GlobalJsonFile $PSScriptRoot\..\global.json
7 changes: 6 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"version": "3.0.100-preview-010024"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19114.4"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19114.4",
"Microsoft.Build.NoTargets": "1.0.40",
"Microsoft.DotNet.Arcade.Wpf.Sdk": "4.8.0-prerelease.19118.1"
},
"native-tools": {
"strawberry-perl": "5.28.0.1"
}
}
35 changes: 35 additions & 0 deletions packaging/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project>
<PropertyGroup>
<IsPackagingProject>true</IsPackagingProject>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<TargetName>Dummy-$(PackageName)</TargetName>
<NoBuild>true</NoBuild>
<IncludeBuildOutput>false</IncludeBuildOutput>
<CreateArchNeutralPackage Condition="$(MSBuildProjectName.Contains('.ArchNeutral'))">true</CreateArchNeutralPackage>

<!--
Set $(IsPackable) = true, except when
$(CreateArchNeutralPackage) == true && $(Platform) != x86
The idea here is that for arch-neutral packages, only the x86 build phase will generate the nuget package
The platform/RID specific packages will be generated in their respective $(Platform) specific build phases
-->
<IsPackable>true</IsPackable>
<IsPackable Condition="('$(Platform)'!='AnyCPU' and '$(Platform)'!='Win32' and '$(Platform)'!='x86') and '$(CreateArchNeutralPackage)'=='true'">false</IsPackable>
</PropertyGroup>

<PropertyGroup>
<DefaultPackageLicenseExpression>MIT</DefaultPackageLicenseExpression>
<DefaultPackageLicenseFile>LICENSE.TXT</DefaultPackageLicenseFile>
</PropertyGroup>

<ItemGroup>
<PackagingContent Condition="Exists('$(RepoRoot)LICENSE.TXT')"
Include="$(RepoRoot)LICENSE.TXT"
SubFolder="root" />
<PackagingContent Condition="Exists('$(RepoRoot)THIRD-PARTY-NOTICES.TXT')"
Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT"
SubFolder="root" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions packaging/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />

<Target Name="UpdatePackageLicenseUrl" BeforeTargets="CreateNuspec">
<CreateProperty Value="$(ScmRepositoryUrl)/blob/master/LICENSE.TXT">
<Output PropertyName="PackageLicenseUrl" TaskParameter="Value"/>
</CreateProperty>
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<ProjectGuid>9a7e395b-e859-40e2-809d-efb72cf3a2ee</ProjectGuid>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>

<PropertyGroup>
<PackageName>$(MSBuildProjectName.Replace('.ArchNeutral',''))</PackageName>
<NuspecFile>$(ArtifactsPackagingDir)$(MSBuildProjectName).nuspec</NuspecFile>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<ProjectGuid>c847934a-828c-4ebb-a004-b0e97c8313f4</ProjectGuid>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>

<PropertyGroup>
<PackageName>$(MSBuildProjectName.Replace('.ArchNeutral',''))</PackageName>
<NuspecFile>$(ArtifactsPackagingDir)$(MSBuildProjectName).nuspec</NuspecFile>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
6 changes: 4 additions & 2 deletions src/Microsoft.DotNet.Wpf/Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<PropertyGroup>
<WpfSourceDir>$(MSBuildThisFileDirectory)src\</WpfSourceDir>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
Loading

0 comments on commit 083719d

Please sign in to comment.