dotnet-installer/build/Microsoft.DotNet.Cli.HostInfo.targets

30 lines
1.1 KiB
XML

<Project ToolsVersion="15.0">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
<Target Name="WriteHostInfoProps"
Condition=" !Exists('$(HostInfoProps)') ">
<GetCurrentRuntimeInformation>
<Output TaskParameter="Rid" PropertyName="Rid" />
<Output TaskParameter="Architecture" PropertyName="Architecture" />
<Output TaskParameter="OSName" PropertyName="OSName" />
</GetCurrentRuntimeInformation>
<PropertyGroup>
<HostInfoPropsContent>
&lt;Project ToolsVersion=&quot;15.0&quot;&gt;
&lt;PropertyGroup&gt;
&lt;HostRid&gt;$(Rid)&lt;/HostRid&gt;
&lt;HostArchitecture&gt;$(Architecture)&lt;/HostArchitecture&gt;
&lt;HostOSName&gt;$(OSName)&lt;/HostOSName&gt;
&lt;/PropertyGroup&gt;
&lt;/Project&gt;
</HostInfoPropsContent>
</PropertyGroup>
<MakeDir Directories="$(RepoRoot)/obj"/>
<WriteLinesToFile File="$(HostInfoProps)"
Lines="$(HostInfoPropsContent)" />
</Target>
</Project>