Skip to content

Commit

Permalink
Fix race in installer tasks build (dotnet#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Nov 19, 2019
1 parent 063b761 commit 2224f8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
</ItemGroup>

<MSBuild Projects="@(RepoTaskProjects)"
Properties="RepoRoot=$(RepoRoot)"
Targets="Restore;Build;CreateHostMachineInfoFile"/>
Targets="Restore;Build"/>

<WriteLinesToFile File="$(RepoTasksOutputFile)"
Lines="$(RepoTasksOutputFile)"
Expand All @@ -94,7 +93,7 @@
</PropertyGroup>

<ItemGroup>
<RepoTasksSrc Include="$(RepoTasksDir)**\*.cs" />
<RepoTasksSrc Include="$(RepoTasksDir)**\*.cs*" />
</ItemGroup>
</Target>

Expand Down
9 changes: 7 additions & 2 deletions tools-local/tasks/installer.tasks/installer.tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net46</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<!-- Duplicating the assembly path here as CoreClr current overrides the Configuration property. -->
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$(IntermediateOutputPath)netstandard2.0\installer.tasks.dll</InstallerTasksAssemblyPath>
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$(IntermediateOutputPath)net46\installer.tasks.dll</InstallerTasksAssemblyPath>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -37,8 +40,10 @@
<Reference Include="System.IO.Compression" />
</ItemGroup>

<UsingTask TaskName="GetTargetMachineInfo" AssemblyFile="$(InstallerTasksAssemblyPath)" />
<Target Name="CreateHostMachineInfoFile">
<UsingTask TaskName="GetTargetMachineInfo"
AssemblyFile="$(InstallerTasksAssemblyPath)" />
<Target Name="CreateHostMachineInfoFile"
AfterTargets="DispatchToInnerBuilds">
<GetTargetMachineInfo>
<Output PropertyName="HostMachineRid" TaskParameter="RuntimeIdentifier" />
</GetTargetMachineInfo>
Expand Down

0 comments on commit 2224f8b

Please sign in to comment.