From 68a5ea0696db6f39124ff93e1573e9ca97d2bee1 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Mon, 1 May 2017 11:02:14 -0500 Subject: [PATCH] Common.targets support for reference assemblies Provides an item, `ReferencePathWithInterfaceOnlyAssemblies`, that consists of the reference (interface-only) versions of assemblies where available, allowing a consuming task to be incrementally up-to-date after implementation-only changes have been made to a reference. When `%(ReferenceAssembly)` metadata is unavailable for a given reference, the new item contains the implementation assembly directly. Additionally creates a new output item for the current project's reference assembly by default when `$(Deterministic)` is `true`. If this is created, it is copied to the output directory using the new `CopyRefAssembly` task, which copies only if the ref assembly is different from the current file. If present, the ref asm is passed to the project's consumes in metadata. See #1986, dotnet/roslyn#2184. --- .../Microsoft.Common.CurrentVersion.targets | 33 ++++++++++++++++++- src/XMakeTasks/Microsoft.Common.tasks | 1 + 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/XMakeTasks/Microsoft.Common.CurrentVersion.targets b/src/XMakeTasks/Microsoft.Common.CurrentVersion.targets index 8aa426d207a..488151950e3 100644 --- a/src/XMakeTasks/Microsoft.Common.CurrentVersion.targets +++ b/src/XMakeTasks/Microsoft.Common.CurrentVersion.targets @@ -281,6 +281,8 @@ Copyright (C) Microsoft Corporation. All rights reserved. $(TargetDir)$(TargetFileName) + $([System.IO.Path]::Combine(`$([System.IO.Path]::GetDirectoryName($([System.IO.Path]::GetFullPath(`$(TargetPath)`))))`, 'ref', `$(TargetFileName)`)) + $(MSBuildProjectDirectory)\ @@ -350,6 +352,13 @@ Copyright (C) Microsoft Corporation. All rights reserved. + + + + + + + <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).compile.pdb" Condition="'$(OutputType)' == 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/> <_DebugSymbolsIntermediatePath Include="$(IntermediateOutputPath)$(TargetName).pdb" Condition="'$(OutputType)' != 'winmdobj' and '@(_DebugSymbolsIntermediatePath)' == ''"/> @@ -771,7 +780,7 @@ Copyright (C) Microsoft Corporation. All rights reserved. Name="Build" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" - Returns="$(TargetPath)" /> + Returns="@(TargetPathWithTargetPlatformMoniker)" /> + + + + + + diff --git a/src/XMakeTasks/Microsoft.Common.tasks b/src/XMakeTasks/Microsoft.Common.tasks index d284df7336a..4c7fbee8847 100644 --- a/src/XMakeTasks/Microsoft.Common.tasks +++ b/src/XMakeTasks/Microsoft.Common.tasks @@ -172,5 +172,6 @@ +