diff options
-rw-r--r-- | binplace.targets | 22 | ||||
-rw-r--r-- | external/NETNative/NETNative.depproj | 1 | ||||
-rw-r--r-- | external/coreclr/coreclr.depproj | 3 | ||||
-rw-r--r-- | external/dir.props | 4 | ||||
-rw-r--r-- | external/netfx/netfx.depproj | 10 | ||||
-rw-r--r-- | external/netstandard/netstandard.depproj | 42 | ||||
-rw-r--r-- | external/portable/portable.depproj | 8 | ||||
-rw-r--r-- | external/test-runtime/XUnit.Runtime.depproj | 1 |
8 files changed, 45 insertions, 46 deletions
diff --git a/binplace.targets b/binplace.targets index 6621c721c8..6f3d155784 100644 --- a/binplace.targets +++ b/binplace.targets @@ -11,7 +11,7 @@ <BinPlaceStuffDependsOn Condition="'$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true'">$(BinPlaceStuffDependsOn);BinPlaceRuntimeAssembly</BinPlaceStuffDependsOn> </PropertyGroup> - <ItemGroup> + <ItemGroup Condition="'@(BinplaceConfiguration)' == ''"> <BinplaceConfiguration Include="$(BuildConfiguration)"> <RefPath>$(BuildConfigurationRefPath)</RefPath> <RuntimePath>$(RuntimePath)</RuntimePath> @@ -31,22 +31,28 @@ <Message Importance="low" Text="IsRuntimeAndReferenceAssembly: $(IsRuntimeAndReferenceAssembly)" /> </Target> - <Target Name="BinPlaceReferenceAssembly" DependsOnTargets="GetBinplaceDirs"> + <Target Name="BinPlaceReferenceAssembly" DependsOnTargets="GetBinplaceDirs;GetBinplaceItems"> <Message Importance="low" Text="TargetingPackDir: @(TargetingPackDir)" /> - <Copy Condition="'@(TargetingPackDir)' != ''" SourceFiles="$(TargetPath)" DestinationFolder="%(TargetingPackDir.Identity)" > + <Copy Condition="'@(TargetingPackDir)' != ''" SourceFiles="@(BinplaceItem)" DestinationFolder="%(TargetingPackDir.Identity)" > <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> </Copy> </Target> - <Target Name="BinPlaceRuntimeAssembly" DependsOnTargets="GetBinplaceDirs"> - <Copy Condition="'@(RuntimeDir)' != ''" SourceFiles="$(TargetPath)" DestinationFolder="%(RuntimeDir.Identity)"> - <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> - </Copy> - <Copy Condition="'@(RuntimeDir)' != '' And Exists($(TargetPath.Replace('.dll', '.pdb')))" SourceFiles="$(TargetPath.Replace('.dll', '.pdb'))" DestinationFolder="%(RuntimeDir.Identity)"> + <Target Name="BinPlaceRuntimeAssembly" DependsOnTargets="GetBinplaceDirs;GetBinplaceItems"> + <Copy Condition="'@(RuntimeDir)' != ''" SourceFiles="@(BinplaceItem)" DestinationFolder="%(RuntimeDir.Identity)"> <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> </Copy> </Target> + <Target Name="GetBinplaceItems" DependsOnTargets="GetCopyToOutputDirectoryItems"> + <ItemGroup> + <BinplaceItem Condition="Exists('$(TargetPath)')" Include="$(TargetPath)" /> + <BinplaceItem Condition="Exists('$(TargetDir)$(TargetName).pdb')" Include="$(TargetDir)$(TargetName).pdb" /> + <BinplaceItem Condition="'$(BinplaceReferenceCopyLocalPaths)' != 'false'" Include="@(ReferenceCopyLocalPaths)" /> + <BinplaceItem Condition="'$(BinplaceCopyToOutputDirectoryItems)' != 'false'" Include="@(AllItemsFullPathWithTargetPath)" /> + </ItemGroup> + </Target> + <Target Name="GetBinplaceDirs" DependsOnTargets="GetBuildConfigurations"> <!-- find which, if any, build configuration of this project is best for each binplace configuration --> diff --git a/external/NETNative/NETNative.depproj b/external/NETNative/NETNative.depproj index 1b887d3269..513888461b 100644 --- a/external/NETNative/NETNative.depproj +++ b/external/NETNative/NETNative.depproj @@ -2,7 +2,6 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> - <OutputPath>$(RuntimePath)</OutputPath> <DisableReferenceCopyLocal>true</DisableReferenceCopyLocal> <NuGetDeploySourceItem>Reference</NuGetDeploySourceItem> </PropertyGroup> diff --git a/external/coreclr/coreclr.depproj b/external/coreclr/coreclr.depproj index 1c7e400ffe..47aefec071 100644 --- a/external/coreclr/coreclr.depproj +++ b/external/coreclr/coreclr.depproj @@ -2,8 +2,7 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> - <OutputPath>$(RuntimePath)</OutputPath> - <!-- WORKAROUND: Force external packages to be restored for x64 until arm packages are fully broughtup--> + <!-- WORKAROUND: Force external packages to be restored for x64 until arm packages are fully broughtup--> <NugetRuntimeIdentifier Condition="'$(ArchGroup)' == 'arm'">$(RuntimeOS)-x64</NugetRuntimeIdentifier> </PropertyGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> diff --git a/external/dir.props b/external/dir.props index 800b9127e0..71a38f6da7 100644 --- a/external/dir.props +++ b/external/dir.props @@ -1,10 +1,6 @@ <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="..\dir.props" /> <PropertyGroup> - <!-- HACK to work around binplacing issue right now for depproj's --> - <IsRuntimeAssembly>false</IsRuntimeAssembly> - </PropertyGroup> - <PropertyGroup> <IntermediateOutputPath>$(IntermediateOutputPath)$(ArchGroup)/</IntermediateOutputPath> <NugetRuntimeIdentifier>$(RuntimeOS)-$(ArchGroup)</NugetRuntimeIdentifier> </PropertyGroup> diff --git a/external/netfx/netfx.depproj b/external/netfx/netfx.depproj index 30e24c979a..e57bdcf5d3 100644 --- a/external/netfx/netfx.depproj +++ b/external/netfx/netfx.depproj @@ -2,9 +2,9 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> + <IsReferenceAssembly>true</IsReferenceAssembly> <NuGetDeploySourceItem>Reference</NuGetDeploySourceItem> <NugetRuntimeIdentifier>None</NugetRuntimeIdentifier> - <OutputPath>$(RefRootPath)/$(TargetGroup)</OutputPath> </PropertyGroup> <PropertyGroup Condition="'$(NuGetTargetMoniker)' == '.NETFramework,Version=v4.6.3'"> <!-- Missing 4.6.3 targeting pack, use 462 for now --> @@ -14,9 +14,15 @@ <!-- For things not .NETFramework we need the net461 targeting pack to generate facades --> <NuGetTargetMoniker>.NETFramework,Version=v4.6.1</NuGetTargetMoniker> <TargetingPackNugetPackageId>Microsoft.TargetingPack.NETFramework.v4.6.1</TargetingPackNugetPackageId> - <OutputPath>$(NetFxRefPath)</OutputPath> <ForShims>true</ForShims> </PropertyGroup> + <ItemGroup> + <BinplaceConfiguration Include="$(Configuration)"> + <RefPath Condition="'$(ForShims)' != 'true'">$(RefPath)</RefPath> + <RefPath Condition="'$(ForShims)' == 'true'">$(NetFxRefPath)</RefPath> + </BinplaceConfiguration> + </ItemGroup> + <!-- Filter the targeting pack to just these assemblies which we need netcoreapp shims for --> <ItemGroup> <TargetingPackReference Include="mscorlib" /> diff --git a/external/netstandard/netstandard.depproj b/external/netstandard/netstandard.depproj index 52ccda0f07..c389c944bf 100644 --- a/external/netstandard/netstandard.depproj +++ b/external/netstandard/netstandard.depproj @@ -2,17 +2,26 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> + <IsNetFx Condition="$(NuGetTargetMoniker.StartsWith('.NETFramework,'))">true</IsNetFx> + <IsNetFxVertical Condition="'$(_bc_TargetGroup)' == 'netfx' OR $(_bc_TargetGroup.StartsWith('net4'))">true</IsNetFxVertical> + <IsNETStandard1x Condition="$(NuGetTargetMoniker.StartsWith('.NETStandard,Version=v1.'))">true</IsNETStandard1x> + <IsReferenceAssembly>true</IsReferenceAssembly> + <!-- when building for any NetFx vertical, also place facades in runtime folder --> + <IsRuntimeAndReferenceAssembly Condition="'$(IsNetFx)' == 'true' AND '$(IsNetFxVertical)' == 'true'">true</IsRuntimeAndReferenceAssembly> <NuGetDeploySourceItem>Reference</NuGetDeploySourceItem> <NugetRuntimeIdentifier>None</NugetRuntimeIdentifier> - <OutputPath>$(RefRootPath)/$(TargetGroup)</OutputPath> - <ProjectJsonTemplate Condition="$(NuGetTargetMoniker.Contains('Version=v1.'))">$(MSBuildProjectDirectory)\netstandard1.x\project.json.template</ProjectJsonTemplate> + <ProjectJsonTemplate Condition="'$(IsNETStandard1x)' == 'true'">$(MSBuildProjectDirectory)\netstandard1.x\project.json.template</ProjectJsonTemplate> <_NETStandardTFMFolder Condition="'$(NuGetTargetMoniker)' == '.NETStandard,Version=v2.0'">netstandard2.0</_NETStandardTFMFolder> - <_NETStandardTFMFolder Condition="$(NuGetTargetMoniker.StartsWith('.NETFramework'))">net461</_NETStandardTFMFolder> + <_NETStandardTFMFolder Condition="'$(IsNetFx)' == 'true'">net461</_NETStandardTFMFolder> </PropertyGroup> - + <ItemGroup> - <!-- on desktop facades are used at runtime as well --> - <AdditionalOutputDirectory Condition="$(NuGetTargetMoniker.StartsWith('.NETFramework'))" Include="$(RuntimePath)" /> + <!-- for all configurations this project provides refs for that configuration --> + <BinplaceConfiguration Include="$(Configuration)"> + <RefPath>$(RefPath)</RefPath> + <!-- only for netfx verticals will this project provide runtime assets --> + <RuntimePath>$(RuntimePath)</RuntimePath> + </BinplaceConfiguration> </ItemGroup> <Target Name="AddNETStandardRefs" AfterTargets="ResolveReferences" @@ -31,26 +40,5 @@ </ItemGroup> </Target> - <Target Name="CopyToAdditionalOutputDirectories" - Inputs="%(AdditionalOutputDirectory.Identity)" - Outputs="unused" - AfterTargets="CopyFilesToOutputDirectory"> - <PropertyGroup> - <_additionalOutDir>%(AdditionalOutputDirectory.Identity)</_additionalOutDir> - </PropertyGroup> - <Copy - SourceFiles = "@(_SourceItemsToCopyToOutputDirectory)" - DestinationFiles = "@(_SourceItemsToCopyToOutputDirectory->'$(_additionalOutDir)%(TargetPath)')" - OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" - Retries="$(CopyRetryCount)" - RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" - UseHardlinksIfPossible="$(CreateHardLinksForAdditionalFilesIfPossible)" - > - - <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/> - - </Copy> - </Target> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> </Project> diff --git a/external/portable/portable.depproj b/external/portable/portable.depproj index e079484cea..8d96954c9c 100644 --- a/external/portable/portable.depproj +++ b/external/portable/portable.depproj @@ -2,10 +2,16 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> + <IsReferenceAssembly>true</IsReferenceAssembly> <NuGetDeploySourceItem>Reference</NuGetDeploySourceItem> <NugetRuntimeIdentifier>None</NugetRuntimeIdentifier> - <OutputPath>$(RefRootPath)/$(TargetGroup)</OutputPath> </PropertyGroup> + <ItemGroup> + <!-- for all configurations this project provides refs for that configuration --> + <BinplaceConfiguration Include="$(Configuration)"> + <RefPath>$(RefPath)</RefPath> + </BinplaceConfiguration> + </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> <Target Name="FilterTargetingPackResolvedNugetPackages" /> </Project>
\ No newline at end of file diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index 5db9b20baf..309346f518 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -2,7 +2,6 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> - <IsRuntimeAssembly>false</IsRuntimeAssembly> <!-- Given that xunit packages bring with them part of the framework, we need to specify a runtime in order to get the assets This RID value doesn't really matter, since the assets we are copying are not RID specific, so defaulting to Windows here --> |