|
1 | 1 | <Project> |
2 | 2 |
|
| 3 | + <PropertyGroup> |
| 4 | + <_ILLinkTasksSourceDir>$(ToolsProjectRoot)illink\src\ILLink.Tasks\</_ILLinkTasksSourceDir> |
| 5 | + <ILLinkAnalyzersPropsPath>$(ToolsProjectRoot)illink\src\ILLink.RoslynAnalyzer\build\Microsoft.NET.ILLink.Analyzers.props</ILLinkAnalyzersPropsPath> |
| 6 | + </PropertyGroup> |
| 7 | + |
| 8 | + <ItemGroup> |
| 9 | + <!-- SkipGetTargetFrameworkProperties builds ILLink.Tasks without any TargetFramework settings |
| 10 | + based on the referencing project, preventing errors when illink.targets is imported by a |
| 11 | + project with TargetFrameworks that are incompatible with those of ILLink.Tasks. --> |
| 12 | + <ProjectReference Include="$(_ILLinkTasksSourceDir)ILLink.Tasks.csproj" |
| 13 | + ReferenceOutputAssembly="false" |
| 14 | + PrivateAssets="all" |
| 15 | + SetConfiguration="Configuration=$(ToolsConfiguration)"> |
| 16 | + <!-- Keep TFMs in sync with ILLink.Tasks.csproj --> |
| 17 | + <SetTargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">TargetFramework=$(NetCoreAppToolCurrent)</SetTargetFramework> |
| 18 | + <SetTargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core'">TargetFramework=$(NetFrameworkToolCurrent)</SetTargetFramework> |
| 19 | + </ProjectReference> |
| 20 | + </ItemGroup> |
| 21 | + |
| 22 | + <Import Project="$(_ILLinkTasksSourceDir)build\Microsoft.NET.ILLink.Tasks.props" /> |
| 23 | + |
3 | 24 | <PropertyGroup> |
4 | 25 | <IsTrimmable Condition="'$(IsTrimmable)' == ''">true</IsTrimmable> |
5 | 26 | <!-- Don't use SDK's trimming functionality. |
|
10 | 31 | we might be able to use built-in functionality instead of a packagereference. |
11 | 32 | --> |
12 | 33 | <_RequiresILLinkPack>false</_RequiresILLinkPack> |
| 34 | + <ILLinkTasksAssembly>$(ToolsILLinkDir)$(NetCoreAppToolCurrent)/ILLink.Tasks.dll</ILLinkTasksAssembly> |
13 | 35 | <PrepareResourcesDependsOn>_EmbedILLinkXmls;$(PrepareResourcesDependsOn)</PrepareResourcesDependsOn> |
14 | 36 | <TargetsTriggeredByCompilation Condition="'$(DesignTimeBuild)' != 'true'">$(TargetsTriggeredByCompilation);ILLinkTrimAssembly</TargetsTriggeredByCompilation> |
15 | 37 |
|
|
43 | 65 | <GenerateResourcesSubstitutions Condition="'$(GenerateResourcesSubstitutions)' == '' and '$(StringResourcesPath)' != ''">true</GenerateResourcesSubstitutions> |
44 | 66 | </PropertyGroup> |
45 | 67 |
|
46 | | - <!-- Use ILLink.Tasks version matching the SDK used to build. See comment about _RequiresILLinkPack. --> |
47 | | - <PropertyGroup> |
48 | | - <SuppressILLinkExplicitPackageReferenceWarning>true</SuppressILLinkExplicitPackageReferenceWarning> |
49 | | - </PropertyGroup> |
50 | | - <ItemGroup> |
51 | | - <PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="$(BundledNETCoreAppPackageVersion)" PrivateAssets="all" /> |
52 | | - </ItemGroup> |
53 | | - |
54 | 68 | <ItemGroup> |
55 | 69 | <ILLinkSuppressionsXmls Include="$(ILLinkSuppressionsXmlFile)" |
56 | 70 | Condition="Exists('$(ILLinkSuppressionsXmlFile)')" /> |
|
0 commit comments