dotnet-installer/build/HostInfo.targets
Justin Goshi 45a1e9e56c Allow host info passed in from the command line to override machine settings (#5904)
* Allow host info passed in from the command line to override machine settings

* Simplify the logic

* Address PR comments to keep a separate HostRid and HostOSName that are static

* Rename to BuildInfo.props

* Address PR comments

* Fix the previous merge

* Fix spacing

* Address PR comments
2017-03-08 09:10:53 -10:00

26 lines
868 B
XML

<Project ToolsVersion="15.0">
<Target Name="WriteHostInfoProps"
Condition=" !Exists('$(HostInfoProps)') "
DependsOnTargets="BuildDotnetCliBuildFramework">
<GetCurrentRuntimeInformation>
<Output TaskParameter="Rid" PropertyName="HostRid" />
<Output TaskParameter="OSName" PropertyName="HostOSName" />
</GetCurrentRuntimeInformation>
<PropertyGroup>
<HostInfoPropsContent>
&lt;Project ToolsVersion=&quot;15.0&quot;&gt;
&lt;PropertyGroup&gt;
&lt;HostRid&gt;$(HostRid)&lt;/HostRid&gt;
&lt;HostOSName&gt;$(HostOSName)&lt;/HostOSName&gt;
&lt;/PropertyGroup&gt;
&lt;/Project&gt;
</HostInfoPropsContent>
</PropertyGroup>
<WriteLinesToFile File="$(HostInfoProps)"
Lines="$(HostInfoPropsContent)"
Overwrite="true" />
</Target>
</Project>