Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@
"defaultValue": false
},
"RuntimeOS": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is meant to represent what we're running on.

"description": "The RuntimeOS used for building and restoring native OS dependent assets (i.e. RID specific binaries)",
"description": "The RuntimeOS of the build system.",
"valueType": "property",
"values": ["win7", "osx.10.10", "ubuntu.14.04", "ubuntu.16.04", "etc-other-rid-based-os-names"],
"defaultValue": ""
},
"PackageRID": {
"description": "The RID of the target package.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the target package in this case? I assume you are implying that it is the RID of what you are building, however I see you a also using it in restoring dependencies.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the target RID you are building for.

"valueType": "property",
"values": ["win7-x64", "ubuntu.14.04-x64"],
"defaultValue": ""
},
"PortableBuild": {
"description": "Indicates if this is a portable build.",
"valueType": "property",
Expand Down
23 changes: 23 additions & 0 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,29 @@
</PropertyGroup>

<Import Project="$(BuildConfigurationImportFile)" Condition="Exists('$(BuildConfigurationImportFile)')" />
<PropertyGroup>
<_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
<_portableOS>linux</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'win'">win</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'osx'">osx</_portableOS>

<_runtimeOS>$(RuntimeOS)</_runtimeOS>
<_runtimeOS Condition="'$(_runtimeOS)' == 'tizen.4.0.0'">ubuntu.14.04</_runtimeOS>
<_runtimeOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)</_runtimeOS>
<ToolRuntimeRID>$(_runtimeOS)-x64</ToolRuntimeRID>

<!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for -->
<_portableOS Condition="'$(OSGroup)' == 'Unix' AND '$(_runtimeOSFamily)' != 'osx'">linux</_portableOS>
<_portableOS Condition="'$(OSGroup)' == 'Windows_NT'">win</_portableOS>

<_packageRID/>
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID>
<_packageRID Condition="'$(TargetGroup)' == 'uap'">win10-$(ArchGroup)</_packageRID>
<_packageRID Condition="'$(TargetGroup)' == 'uapaot'">win10-$(ArchGroup)-aot</_packageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(_packageRID)</PackageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(RuntimeOS)-$(ArchGroup)</PackageRID>
</PropertyGroup>

<!-- Import packaging props -->
<Import Project="$(MSBuildThisFileDirectory)Packaging.props"/>
Expand Down
1 change: 1 addition & 0 deletions external/ILLink/ILLink.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<NuGetTargetMonikerShort>netcoreapp1.1</NuGetTargetMonikerShort>
<OutputPath>$(ToolsDir)ILLink</OutputPath>
<EnableBinPlacing>false</EnableBinPlacing>
<NugetRuntimeIdentifier>$(ToolRuntimeRID)</NugetRuntimeIdentifier>
<RidSpecificAssets>true</RidSpecificAssets>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<NuGetTargetMoniker>.NETCoreApp,Version=v1.1</NuGetTargetMoniker>
<NuGetTargetMonikerShort>netcoreapp1.1</NuGetTargetMonikerShort>
<OutputPath>$(RefRootPath)SharedFrameworkValidation.LKG</OutputPath>
<NugetRuntimeIdentifier>$(_PublishRID)</NugetRuntimeIdentifier>
<NugetRuntimeIdentifier>$(_PackageRID)</NugetRuntimeIdentifier>
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
</PropertyGroup>

Expand Down
7 changes: 1 addition & 6 deletions external/dir.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />
<PropertyGroup>
<_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
<IntermediateOutputPath>$(IntermediateOutputPath)$(OSGroup)-$(ArchGroup)/</IntermediateOutputPath>
<RuntimeOS Condition="'$(PortableBuild)' == 'true'">linux</RuntimeOS>
<RuntimeOS Condition="'$(PortableBuild)' == 'true' and '$(_runtimeOSFamily)' == 'win'">win</RuntimeOS>
<RuntimeOS Condition="'$(PortableBuild)' == 'true' and '$(_runtimeOSFamily)' == 'osx'">osx</RuntimeOS>
<NugetRuntimeIdentifier>$(RuntimeOS)-$(ArchGroup)</NugetRuntimeIdentifier>
<NugetRuntimeIdentifier>None</NugetRuntimeIdentifier>
<ContainsPackageReferences>true</ContainsPackageReferences>
<!-- We need configuration-specific assets files. -->
<RestoreOutputPath>$(IntermediateOutputPath)</RestoreOutputPath>
Expand Down
1 change: 0 additions & 1 deletion external/docs/docs.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />

<PropertyGroup>
<NuGetRuntimeIdentifier>none</NuGetRuntimeIdentifier>
<OutputPath>$(XmlDocDir)</OutputPath>
<EnableBinPlacing>false</EnableBinPlacing>
</PropertyGroup>
Expand Down
5 changes: 1 addition & 4 deletions external/ilasm/ilasm.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +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>
<!-- Always restore the x64 assets. These are build-only assets, so they should match the environment of the build. -->
<NugetRuntimeIdentifier>$(RuntimeOS)-x64</NugetRuntimeIdentifier>
<!-- Tizen does not provide the x64 runtime so replaces it with the ubuntu.14.04-x64 -->
<NugetRuntimeIdentifier Condition="'$(RuntimeOS)' == 'tizen.4.0.0'">ubuntu.14.04-x64</NugetRuntimeIdentifier>
<NugetRuntimeIdentifier>$(ToolRuntimeRID)</NugetRuntimeIdentifier>
<OutputPath>$(ToolsDir)ilasm</OutputPath>
<EnableBinPlacing>false</EnableBinPlacing>
<RidSpecificAssets>true</RidSpecificAssets>
Expand Down
1 change: 0 additions & 1 deletion external/netfx-conflicts/netfx-conflicts.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<NuGetTargetMoniker>.NETStandard,Version=v1.0</NuGetTargetMoniker>
<PackageTargetFallback>netstandard1.1;netstandard1.2;netstandard1.3</PackageTargetFallback>
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
<NugetRuntimeIdentifier>None</NugetRuntimeIdentifier>
<EnableBinPlacing>false</EnableBinPlacing>
</PropertyGroup>

Expand Down
1 change: 0 additions & 1 deletion external/netfx/netfx.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<PropertyGroup>
<BinPlaceRef>true</BinPlaceRef>
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
<NugetRuntimeIdentifier>None</NugetRuntimeIdentifier>
<RefOutputPath>$(RefPath)</RefOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(NuGetTargetMoniker)' == '.NETFramework,Version=v4.6.3'">
Expand Down
1 change: 0 additions & 1 deletion external/netstandard/netstandard.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<IsNETStandard1x Condition="$(NETStandardVersion.StartsWith('1.'))">true</IsNETStandard1x>
<BinPlaceRef>true</BinPlaceRef>
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
<NugetRuntimeIdentifier>None</NugetRuntimeIdentifier>
<_NETStandardTFMFolder Condition="'$(NuGetTargetMoniker)' == '.NETStandard,Version=v2.0'">netstandard2.0</_NETStandardTFMFolder>
</PropertyGroup>

Expand Down
1 change: 0 additions & 1 deletion external/portable/portable.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<PropertyGroup>
<BinPlaceRef>true</BinPlaceRef>
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
<NugetRuntimeIdentifier>None</NugetRuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="$(TargetingPackNugetPackageId)">
Expand Down
6 changes: 1 addition & 5 deletions external/runtime/runtime.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +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>
<!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for -->
<NugetRuntimeIdentifier Condition="'$(OSGroup)' == 'Windows_NT' AND '$(RunningOnUnix)' == 'true'">win-x64</NugetRuntimeIdentifier>
<NugetRuntimeIdentifier Condition="'$(OSGroup)' == 'Unix' AND '$(RunningOnUnix)' != 'true'">linux-x64</NugetRuntimeIdentifier>
<NugetRuntimeIdentifier Condition="'$(TargetGroup)' == 'uap'">win10-$(ArchGroup)</NugetRuntimeIdentifier>
<NugetRuntimeIdentifier Condition="'$(TargetGroup)' == 'uapaot'">win10-$(ArchGroup)-aot</NugetRuntimeIdentifier>
<NugetRuntimeIdentifier>$(PackageRID)</NugetRuntimeIdentifier>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand why we are using PackageRID here? It should be based on the OS you are running on as these assets are primarily about running the tests on the build you are using.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this runtime get included in the built package.
If I am building for 'banana' linux, I want to get&use the 'banana' runtime?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the runtime doesn't get used for anything beyond running tests in this repo. It doesn't get included in any packages that we produce in corefx.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I thought Microsoft.NETCore.App is built by corefx? This package contains the runtime?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That package is assembled in the core-setup repo, which consumes the runtime packages and the private corefx package (Microsoft.Private.CoreFx.NETCoreApp) but there are no packages that build in corefx that contain the runtime.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtime.depproj pre-PR looks like it doesn't match the host but the target.
e.g.

<NugetRuntimeIdentifier Condition="'$(OSGroup)' == 'Windows_NT' AND '$(RunningOnUnix)' == 'true'">win-x64</NugetRuntimeIdentifier>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that is a specific scenario where someone is trying to build for Windows while running on Unix.

I guess I did overstate when I mentioned that this is only used for testing. There are some scenarios were we use the assets for building the product in the case of a ReferenceFromRuntime reference (https://github.com/dotnet/corefx/blob/master/referenceFromRuntime.targets#L3) for projects that directly compile against System.Private.CoreLib. Unfortunately there are some slightly different APIs across the different OS's.

So the most common scenario is folks that want to build and run on the device the are on but in some cases folks will want to build for another runtime but not run locally but instead send them to another machine to run. So that is more of a target/PackageRID as opposed to Host/ToolRuntimeRID.

So with that said I think using PackageRID here is appropriate.

<RidSpecificAssets>true</RidSpecificAssets>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetGroup)' == 'uapaot'">
Expand Down
1 change: 0 additions & 1 deletion external/winrt/winrt.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<TargetExt>.winmd</TargetExt>
<BinPlaceRef>true</BinPlaceRef>
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
<NugetRuntimeIdentifier>None</NugetRuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TargetingPack.Private.WinRT">
Expand Down
9 changes: 0 additions & 9 deletions pkg/Microsoft.Private.CoreFx.NETCoreApp/netcoreapp.rids.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
<PackageRID>linux-$(ArchGroup)</PackageRID>
<PackageRID Condition="'$(_runtimeOSFamily)' == 'osx'">osx-$(ArchGroup)</PackageRID>
<PackageRID Condition="'$(_runtimeOSFamily)' == 'win'">win-$(ArchGroup)</PackageRID>
</PropertyGroup>
<PropertyGroup Condition="'$(PortableBuild)' != 'true'">
<PackageRID>$(RuntimeOS)-$(ArchGroup)</PackageRID>
</PropertyGroup>

<ItemGroup>
<OfficialBuildRID Include="linux-arm">
<Platform>arm</Platform>
Expand Down
18 changes: 0 additions & 18 deletions pkg/Microsoft.Private.CoreFx.UAP/uap.rids.props
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_aotSuffix Condition="'$(TargetGroup)' == 'uapaot'">-aot</_aotSuffix>
</PropertyGroup>

<Choose>
<When Condition="'$(PackageRID)' != ''" />
<When Condition="'$(_runtimeOSFamily)' == 'win'">
<PropertyGroup>
<PackageRID>win10-$(ArchGroup)$(_aotSuffix)</PackageRID>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<PackageRID>$(RuntimeOS)-$(ArchGroup)</PackageRID>
</PropertyGroup>
</Otherwise>
</Choose>

<ItemGroup>
<OfficialBuildRID Include="win10-x86">
<Platform>x86</Platform>
Expand Down
11 changes: 2 additions & 9 deletions pkg/dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />

<PropertyGroup>
<_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
</PropertyGroup>

<!-- Packages opt-in to automatic RID-specific builds by placing a *.RID.props next to their project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what's causing your build failures. You've redefined this contract. Please update the comment and decide what the new convention will be. Perhaps its the existence of the props file /cc @joperezr @chcosta

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what mean.
These properties are used to calculate PackageRID. This all moved up one level.

My guess (which may be off) is that moving PackageRID to the top is causing the NETFX build failures.
Perhaps it has to do with this in pkg/dir.pros:

  <ItemGroup>
    <BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
    <BuildRID Include="$(PackageRID)">
      <Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
      <Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
    </BuildRID>
  </ItemGroup>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read the comment. Prior to your change PackageRID was treated optional and meant to signify opt-in to RID-specific packages. Now you're setting PackageRID for everything so it can no longer be opt-in.

I suggest you change this:

  <!-- Packages opt-in to automatic RID-specific builds by placing a *.RID.props next to their project
       that defines the following:
       PackageRID property: the RID which we should be building for
       OfficialBuildRID item: all RIDs targeted by the package -->
  <Import Project="$(MSBuildProjectDirectory)\*.rids.props" />

  <!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
       We'll add a RID for the current platform even if it isn't in the officially supported set -->
  <ItemGroup>
    <BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
    <BuildRID Include="$(PackageRID)">
      <Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
      <Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
    </BuildRID>
  </ItemGroup>

To this:

  <!-- Packages opt-in to automatic RID-specific builds by placing a *.RID.props next to their project
       that defines the OfficialBuildRID item: all RIDs targeted by the package -->
  <Import Project="$(MSBuildProjectDirectory)\*.rids.props" />

  <!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
       We'll add a RID for the current platform even if it isn't in the officially supported set -->
  <ItemGroup Condition="'@(OfficialBuildRID)' != ''">
    <BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
    <BuildRID Include="$(PackageRID)">
      <Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
      <Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
    </BuildRID>
  </ItemGroup>

that defines the following:
PackageRID property: the RID which we should be building for
OfficialBuildRID item: all RIDs targeted by the package -->
that defines the OfficialBuildRID item: all RIDs targeted by the package -->
<Import Project="$(MSBuildProjectDirectory)\*.rids.props" />

<!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
We'll add a RID for the current platform even if it isn't in the officially supported set -->
<ItemGroup>
<ItemGroup Condition="'@(OfficialBuildRID)' != ''">
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
<BuildRID Include="$(PackageRID)">
<Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(_RuntimeFrameworkVersion)</RuntimeFrameworkVersion>
<CoreFxPackageVersion>4.4.0-$(CoreFxExpectedPrerelease)</CoreFxPackageVersion>
<RuntimeIdentifier>$(_PublishRID)</RuntimeIdentifier>
<RuntimeIdentifier>$(_PackageRID)</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup>

Expand Down
7 changes: 3 additions & 4 deletions src/SharedFrameworkValidation/SharedFrameworkValidation.proj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<LKGSharedFrameworkExtractPath>$(RefRootPath)sharedFrameworkZip.LKG/shared/Microsoft.NETCore.App/$(_LKGSharedFrameworkVersion)</LKGSharedFrameworkExtractPath>
<_RunTestsScriptName Condition="'$(RunningOnUnix)' != 'true'">CloneAndRunTests.cmd</_RunTestsScriptName>
<_RunTestsScriptName Condition="'$(RunningOnUnix)' == 'true'">CloneAndRunTests.sh</_RunTestsScriptName>
<_PublishRID>$(RuntimeOS)-$(ArchGroup)</_PublishRID>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I would change is the definition of _PublishRID here to use TargetRID instead, but all of the other changes on this file and the RestoreSDKProject should be undone.

</PropertyGroup>

<Target Name="CreateScriptToDownloadSharedFrameworkZip">
Expand Down Expand Up @@ -57,16 +56,16 @@

<Target Name="BuildPackagesProject">
<PropertyGroup>
<_RestorePackagesCommand>"$(DotnetToolCommand)" restore $(MSBuildThisFileDirectory)/RestoreSDKProject/RestoreSDKProject.csproj /p:_PublishRID=$(_PublishRID) /p:_RuntimeFrameworkVersion=$(MicrosoftNETCoreAppPackageVersion) /p:CoreFxExpectedPrerelease=$(CoreFxExpectedPrerelease)</_RestorePackagesCommand>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to pass this in since the project we are building doesn't import dir.props and doesn't know about the regular properties like TargetRID

<_PublishPackagesProjectCommand>"$(DotnetToolCommand)" publish $(MSBuildThisFileDirectory)/RestoreSDKProject/RestoreSDKProject.csproj /p:_PublishRID=$(_PublishRID) /p:_MetaPackageDestinationFolder=$(SharedFrameworkValidationRefPath) -f netcoreapp2.0 -r $(_PublishRID) -o $(SharedFrameworkValidationRuntimePath)</_PublishPackagesProjectCommand>
<_RestorePackagesCommand>"$(DotnetToolCommand)" restore $(MSBuildThisFileDirectory)/RestoreSDKProject/RestoreSDKProject.csproj /p:_PackageRID=$(PackageRID) /p:_RuntimeFrameworkVersion=$(MicrosoftNETCoreAppPackageVersion) /p:CoreFxExpectedPrerelease=$(CoreFxExpectedPrerelease)</_RestorePackagesCommand>
<_PublishPackagesProjectCommand>"$(DotnetToolCommand)" publish $(MSBuildThisFileDirectory)/RestoreSDKProject/RestoreSDKProject.csproj /p:_PackageRID=$(PackageRID) /p:_MetaPackageDestinationFolder=$(SharedFrameworkValidationRefPath) -f netcoreapp2.0 -o $(SharedFrameworkValidationRuntimePath) -r $(PackageRID)</_PublishPackagesProjectCommand>
</PropertyGroup>
<Exec Command="$(_RestorePackagesCommand)" StandardOutputImportance="Low" />
<Exec Command="$(_PublishPackagesProjectCommand)" StandardOutputImportance="Low" />
</Target>

<Target Name="BuildDependenciesProject">
<MSBuild Projects="../../external/SharedFrameworkValidation/harvestPackages.SharedFramework.depproj"
Properties="_PublishRID=$(_PublishRID)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to re-add this back because of my previous comment.

Properties="_PackageRID=$(PackageRID)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% convinced that the property rename is required, but I'm ok with the changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The rename is to make more clear what RIDs are for the build system and which are for the package.

ContinueOnError="ErrorAndStop" />
</Target>

Expand Down