Skip to content

Commit 16f4a08

Browse files
authored
Merge pull request #2581 from cwensley/curtis/remove-msbuildtaskhelper
Get rid of MSBuildTaskHelper and always use RoslynCodeTaskFactory
2 parents ce8dad9 + ecebd97 commit 16f4a08

10 files changed

+6
-62
lines changed

build/Common.Build.targets

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
<Import Project="$(MSBuildThisFileDirectory)MSBuildTaskHelper.props" Condition="'$(MSBuildTaskHelpersImported)'!='true'"/>
5-
<UsingTask TaskName="_GetCommonFiles" TaskFactory="$(MSBuildTaskFactoryType)" AssemblyFile="$(MSBuildTasksAssemblyFile)">
4+
<UsingTask TaskName="_GetCommonFiles" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
65
<ParameterGroup>
76
<Files ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
87
<Names ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
@@ -135,7 +134,7 @@
135134

136135
<UsingTask
137136
TaskName="GetMetadata"
138-
TaskFactory="$(MSBuildTaskFactoryType)" AssemblyFile="$(MSBuildTasksAssemblyFile)">
137+
TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
139138
<ParameterGroup>
140139
<ItemGroup ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
141140
<Output Output="true" />

build/Common.Mac.targets

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
<!-- Include this file if you want to reference Eto.Mac64.csproj directly vs. using the nuget package -->
55

6-
<Import Project="$(MSBuildThisFileDirectory)MSBuildTaskHelper.props" Condition="'$(MSBuildTaskHelpersImported)'!='true'"/>
76
<Import Project="$(MSBuildThisFileDirectory)..\src\Eto.Mac\build\Mac.props" />
87
<Import Project="$(MSBuildThisFileDirectory)..\src\Eto.Mac\build\Mac.targets" />
98

build/MSBuildTaskHelper.props

-39
This file was deleted.

build/Utilities.targets

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildThisFileDirectory)MSBuildTaskHelper.props" Condition="'$(MSBuildTaskHelpersImported)'!='true'"/>
43

5-
<UsingTask TaskName="FileUpdate" TaskFactory="$(MSBuildTaskFactoryType)" AssemblyFile="$(MSBuildTasksAssemblyFile)">
4+
<UsingTask TaskName="FileUpdate" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
65
<ParameterGroup>
76
<Files ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
87
<Pattern ParameterType="System.String" Required="true" />
@@ -111,7 +110,7 @@ public class FileUpdate : Task
111110
]]> </Code>
112111
</Task>
113112
</UsingTask>
114-
<UsingTask TaskName="IncrementVersion" TaskFactory="$(MSBuildTaskFactoryType)" AssemblyFile="$(MSBuildTasksAssemblyFile)">
113+
<UsingTask TaskName="IncrementVersion" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
115114
<ParameterGroup>
116115
<Version ParameterType="System.String" Required="true" />
117116
<Increment ParameterType="System.String" />

src/Eto.Mac/Eto.Mac64.csproj

-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ You do not need to use any of the classes of this assembly (unless customizing t
7777
<None Include="build\*" Exclude="build\Mac.*" Pack="True" PackagePath="build" />
7878
<None Include="build\Mac.targets" Pack="True" PackagePath="build\$(PackageId).targets" />
7979
<None Include="build\Mac.props" Pack="True" PackagePath="build\$(PackageId).props" />
80-
81-
<None Include="..\..\build\MSBuildTaskHelper.props" Pack="True" PackagePath="build" />
8280
</ItemGroup>
8381

8482
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">

src/Eto.Mac/Eto.XamMac2.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ You do not need to use any of the classes of this assembly (unless customizing t
6666
<None Include="build\*" Exclude="build\Mac.*" Pack="True" PackagePath="build" />
6767
<None Include="build\Mac.targets" Pack="True" PackagePath="build\Eto.Platform.XamMac2.targets" />
6868
<None Include="build\Mac.props" Pack="True" PackagePath="build\Eto.Platform.XamMac2.props" />
69-
<None Include="..\..\build\MSBuildTaskHelper.props" Pack="True" PackagePath="build" />
7069
</ItemGroup>
7170

7271
<Import Project="..\..\build\Xamarin.Mac.targets" Condition="!$(TargetFramework.Contains('-macos'))" />

src/Eto.Mac/Eto.macOS.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ You do not need to use any of the classes of this assembly (unless customizing t
6363
<None Include="build\*" Exclude="build\Mac.*" Pack="True" PackagePath="build" />
6464
<None Include="build\Mac.targets" Pack="True" PackagePath="build\Eto.Platform.macOS.targets" />
6565
<None Include="build\Mac.props" Pack="True" PackagePath="build\Eto.Platform.macOS.props" />
66-
<None Include="..\..\build\MSBuildTaskHelper.props" Pack="True" PackagePath="build" />
6766
</ItemGroup>
6867

6968
<Target Name="CheckSDKVersion" BeforeTargets="BeforeBuild">

src/Eto.Mac/build/Mac.props

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
<DebugType Condition="$(MacDebugEmbedded) == 'True'">embedded</DebugType>
2020
</PropertyGroup>
2121

22-
<Import Project="$(MSBuildThisFileDirectory)MSBuildTaskHelper.props" Condition="'$(MSBuildTaskHelpersImported)'!='true'"/>
23-
2422
<PropertyGroup Condition="$(IsMac) == 'True'">
2523
<MacBuildDmgDependsOnTargets>MacCreateDmg;MacBeautifyDmg</MacBuildDmgDependsOnTargets>
2624
<MacCodeSignDependsOnTargets>MacCodeSignApp;MacCodeSignDmg</MacCodeSignDependsOnTargets>

src/Eto.Mac/build/Mac.targets

+2-9
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,8 @@
7474
<RemoveDir Directories="$(OutputAppPath)"/>
7575
</Target>
7676

77-
<PropertyGroup Condition="'$(MSBuildTaskFactoryType)'=='CodeTaskFactory'">
78-
<_UpdatePListReference>System.Xml</_UpdatePListReference>
79-
</PropertyGroup>
80-
<PropertyGroup Condition="'$(MSBuildTaskFactoryType)'!='CodeTaskFactory'">
81-
<_UpdatePListReference>netstandard</_UpdatePListReference>
82-
</PropertyGroup>
83-
8477
<!-- Task to update the plist file with new values -->
85-
<UsingTask TaskName="UpdatePList" TaskFactory="$(MSBuildTaskFactoryType)" AssemblyFile="$(MSBuildTasksAssemblyFile)">
78+
<UsingTask TaskName="UpdatePList" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
8679
<ParameterGroup>
8780
<PListFile ParameterType="System.String" Required="true" />
8881
<TargetFileName ParameterType="System.String" Required="true" />
@@ -92,7 +85,7 @@
9285
<IconFile ParameterType="System.String" Output="true" />
9386
</ParameterGroup>
9487
<Task>
95-
<Reference Include="$(_UpdatePListReference)"/>
88+
<Reference Include="netstandard"/>
9689
<Code Type="Class" Language="cs"><![CDATA[
9790
using System;
9891
using System.IO;

test/Eto.Test.Mac/Eto.Test.Mac64.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
44

5-
<Import Project="..\..\build\MSBuildTaskHelper.props" Condition="'$(MSBuildTaskHelpersImported)'!='true'" />
65
<Import Project="..\..\src\Eto.Mac\build\Mac.props" Condition="'$(ExcludeRestorePackageImports)' != 'true'" />
76

87
<PropertyGroup>

0 commit comments

Comments
 (0)