|
1 | 1 | <Project>
|
2 | 2 | <PropertyGroup>
|
3 |
| - <!-- |
| 3 | + <!-- |
4 | 4 | This should be defined before Microsoft.WinFX.targets in imported.
|
5 |
| - It's OK if there is no DLL realized at this location - we just need to have the property define. |
6 |
| - |
7 |
| - It is also OK for a DLL to NOT exist at the time <UsingTask> is encountered against this assembly path. |
| 5 | + It's OK if there is no DLL realized at this location - we just need to have the property define. |
| 6 | +
|
| 7 | + It is also OK for a DLL to NOT exist at the time <UsingTask> is encountered against this assembly path. |
8 | 8 | We must ensure that an actual DLL exists at this location prior to the very first execution of a Task from within this assembly.
|
9 | 9 | -->
|
10 | 10 | <_PresentationBuildTasksAssembly Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)')">$(PbtDir)PresentationBuildTasks.dll</_PresentationBuildTasksAssembly>
|
11 | 11 |
|
12 |
| - <!-- |
| 12 | + <!-- |
13 | 13 | When PresentationBuildTasks project is not present locally (presumably because in our split-repo build model, it has been moved off of the repo
|
14 | 14 | being built (typically, dotnet-wpf-int) over to GitHub (dotnet/wpf), we will leverage WindowsDesktop Sdk package directly as a 'transport package'
|
15 |
| - for providing PresentationBuildTasks.dll and related props+targets. These targets require UseWpf=true to be set. |
16 |
| - |
| 15 | + for providing PresentationBuildTasks.dll and related props+targets. These targets require UseWpf=true to be set. |
| 16 | +
|
17 | 17 | Also see additional note in Pbt.props
|
18 | 18 | -->
|
19 | 19 | <UseWpf Condition="'$(InternalMarkupCompilation)'=='true' And !Exists('$(LocalMicrosoftWinFXTargets)')"></UseWpf>
|
20 |
| - |
21 |
| - <!-- |
22 |
| - When markup compilation is involved, WPF generates .g.cs files via the GenerateTemporaryTargetAssembly task. |
| 20 | + |
| 21 | + <!-- |
| 22 | + When markup compilation is involved, WPF generates .g.cs files via the GenerateTemporaryTargetAssembly task. |
23 | 23 | These do not always have the correct full-paths to their respective .xaml files annotated in them in the #line directives.
|
24 |
| - This can cause compile errors if these files are included in Source Link. |
| 24 | + This can cause compile errors if these files are included in Source Link. |
25 | 25 | https://github.com/dotnet/wpf/issues/1718
|
26 |
| - --> |
| 26 | + --> |
27 | 27 | <EmbedUntrackedSources Condition="'$(InternalMarkupCompilation)'=='true'">false</EmbedUntrackedSources>
|
28 | 28 | </PropertyGroup>
|
29 |
| - <!-- |
30 |
| - Internal PBT compilation requires that we use <NetCoreReference> |
| 29 | + <!-- |
| 30 | + Internal PBT compilation requires that we use <NetCoreReference> |
31 | 31 | This is so that the copy of ref\WindowsBase.dll inherited from Microsoft.NetCore.App
|
32 |
| - does not make its way through to markup-compilation. |
33 |
| - |
| 32 | + does not make its way through to markup-compilation. |
| 33 | +
|
34 | 34 | In addition to this, our codebase requires that all references to Microsoft.NetCore.App
|
35 | 35 | be explicitly enumerated through the use of <NetCoreReference> to avoid inadvertent additions
|
36 | 36 | to assembly references during code-changes.
|
|
41 | 41 | <NetCoreReference Include="System.ComponentModel.TypeConverter" />
|
42 | 42 | <NetCoreReference Include="System.Runtime" />
|
43 | 43 | </ItemGroup>
|
44 |
| - |
| 44 | + |
45 | 45 | <PropertyGroup Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)')">
|
46 | 46 | <PrepareResourceNamesDependsOn>
|
47 | 47 | $(PrepareResourceNamesDependsOn);
|
|
54 | 54 | </MarkupCompilePass1DependsOn>
|
55 | 55 | </PropertyGroup>
|
56 | 56 |
|
57 |
| - <!-- |
58 |
| - This target ensures that |
59 |
| - (a) PresentationBuildTasks.dll is built locally |
| 57 | + <!-- |
| 58 | + This target ensures that |
| 59 | + (a) PresentationBuildTasks.dll is built locally |
60 | 60 | (b) The TFM of the assembly matches the build toolset currently being used (netcore vs netframework)
|
61 | 61 | (c) The assembly is placed at $(_PresentationBuildTasksAssembly)
|
62 | 62 | (d) This is all done prior to the first ever use of a task from within this assembly by Microsoft.WinFX.targets
|
|
67 | 67 | BeforeTargets="ResolveProjectReferences">
|
68 | 68 | <MakeDir Condition="!Exists('$(PbtDir)')"
|
69 | 69 | Directories="$(PbtDir)" />
|
70 |
| - |
| 70 | + |
71 | 71 | <MSBuild Projects="$(WpfSourceDir)PresentationBuildTasks\PresentationBuildTasks.csproj"
|
72 | 72 | Condition="!Exists('$(_PresentationBuildTasksAssembly)') And Exists('$(LocalMicrosoftWinFXTargets)')"
|
73 | 73 | Properties="CopyTransitiveReferences=true;PublishDir=$(PbtDir);TargetFramework=$(PbtTfm);Platform=AnyCPU"
|
74 | 74 | Targets="Clean;Build;Publish" />
|
75 | 75 | </Target>
|
76 | 76 |
|
77 |
| - <Target Name="PreventResourcesSourceGenerationForPbtGeneratedResource" |
| 77 | + <Target Name="PreventResourcesSourceGenerationForPbtGeneratedResource" |
78 | 78 | AfterTargets="MainResourcesGeneration"
|
79 | 79 | Condition="'$(InternalMarkupCompilation)'=='true'">
|
80 |
| - <!-- |
| 80 | + <!-- |
81 | 81 | Add the following metadata to $(IntermediateOutputPath)$(_ResourceNameInMainAssembly) within @(EmbeddedResource)
|
82 | 82 | <XlfInput>false</XlfInput>
|
83 | 83 | <GenerateSource>false</GenerateSource
|
84 |
| - |
| 84 | +
|
85 | 85 | This ensures that PBT generated resources are not inadvertently picked up by Xlf source generator.
|
86 | 86 | -->
|
87 | 87 | <ItemGroup Condition="'$(_ResourceNameInMainAssembly)'!=''">
|
|
92 | 92 | </ItemGroup>
|
93 | 93 | </Target>
|
94 | 94 |
|
95 |
| - <!-- |
| 95 | + <!-- |
96 | 96 | If local PresentationBuildTasks project is present, then import WinFX.targets from local sources;
|
97 | 97 | otherwise import Microsoft.NET.Sdk.WindowsDesktop.targets from Microsoft.NET.Sdk.WindowsDesktop
|
98 | 98 | -->
|
99 |
| - <Import Project="$(WpfSourceDir)PresentationBuildTasks\Microsoft.WinFX.targets" |
| 99 | + <Import Project="$(WpfSourceDir)PresentationBuildTasks\Microsoft.WinFX.targets" |
100 | 100 | Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)') "/>
|
101 | 101 |
|
102 |
| - <!-- |
103 |
| - _WindowsDesktopSdkTargetFrameworkVersionFloor, _UndefinedTargetFrameworkVersion and _TargetFrameworkVersionValue are |
104 |
| - defined in Microsoft.NET.WindowDesktop.props. |
105 |
| - |
106 |
| - These need to be defined before Microsoft.NET.Sdk.WindowsDesktop.targets is imported. |
| 102 | + <!-- |
| 103 | + _WindowsDesktopSdkTargetFrameworkVersionFloor, _UndefinedTargetFrameworkVersion and _TargetFrameworkVersionValue are |
| 104 | + defined in Microsoft.NET.WindowDesktop.props. |
| 105 | +
|
| 106 | + These need to be defined before Microsoft.NET.Sdk.WindowsDesktop.targets is imported. |
107 | 107 | -->
|
108 | 108 | <PropertyGroup Condition="'$(InternalMarkupCompilation)'=='true' And !Exists('$(LocalMicrosoftWinFXTargets)') ">
|
109 | 109 | <_WindowsDesktopSdkTargetFrameworkVersionFloor Condition="'$(_WindowsDesktopSdkTargetFrameworkVersionFloor)' == ''">3.0</_WindowsDesktopSdkTargetFrameworkVersionFloor>
|
110 |
| - |
| 110 | + |
111 | 111 | <!-- Represents an undefined TFV value. -->
|
112 | 112 | <_UndefinedTargetFrameworkVersion>0.0</_UndefinedTargetFrameworkVersion>
|
113 | 113 |
|
114 | 114 | <!-- Initial/Default value set to 'undefined'. Updated in Microsoft.NET.WindowsDesktop.targets -->
|
115 | 115 | <_TargetFrameworkVersionValue>$(_UndefinedTargetFrameworkVersion)</_TargetFrameworkVersionValue>
|
116 |
| - |
| 116 | + |
117 | 117 | </PropertyGroup>
|
118 | 118 | <Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
|
119 | 119 | Project="../targets/Microsoft.NET.Sdk.WindowsDesktop.targets"
|
|
0 commit comments