Skip to content

Commit 0a3e920

Browse files
authored
Update 'WinFx' -> 'WinFX' casing (dotnet#2975)
* Rename 'Microsoft.WinFx.targets' to 'Microsoft.WinFX.targets' 'WinFX' is the correct casing as observed in the .NET CLR 2 frameworks * Fix 'WinFx' -> 'WinFX' everywhere else In project files, scripts, comments, etc... But not in sources (like GetWinFxCallback) * NewLine fixes for only previously changed files Conforming to the repository's EditorConfig file IN this Patch tree * Update & Format EditorConfig Add 'trim_trailing_whitespace' to EditorConfig * Remove all trailing whitespaces for only previously changed files (in this Patch tree) Conforming to the repository's EditorConfig file
1 parent 734be70 commit 0a3e920

File tree

15 files changed

+160
-164
lines changed

15 files changed

+160
-164
lines changed

Diff for: .editorconfig

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# editorconfig.org
22

3-
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
3+
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
44
# top-most EditorConfig file
55
root = true
66

77
# Default settings:
88
# A newline ending every file
99
# Use 4 spaces as indentation
1010
[*]
11+
trim_trailing_whitespace = true
1112
insert_final_newline = true
1213
indent_style = space
1314
indent_size = 4
@@ -67,7 +68,7 @@ dotnet_naming_symbols.static_fields.applicable_kinds = field
6768
dotnet_naming_symbols.static_fields.required_modifiers = static
6869

6970
dotnet_naming_style.static_prefix_style.required_prefix = s_
70-
dotnet_naming_style.static_prefix_style.capitalization = camel_case
71+
dotnet_naming_style.static_prefix_style.capitalization = camel_case
7172

7273
# internal and private fields should be _camelCase
7374
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
@@ -78,7 +79,7 @@ dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
7879
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
7980

8081
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
81-
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
82+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
8283

8384
# Code style defaults
8485
dotnet_sort_system_directives_first = true

Diff for: eng/WpfArcadeSdk/tools/Pbt.props

+21-21
Original file line numberDiff line numberDiff line change
@@ -13,51 +13,51 @@
1313
<PbtDir>$(ArtifactsTmpDir)PresentationBuildTasks\$(PbtTfm)\</PbtDir>
1414
</PropertyGroup>
1515

16-
<!--
17-
Local markup compilation uses $(InternalMarkupCompilation) instead of $(UseWpf). Suppress the
18-
corresponding SDK warning.
16+
<!--
17+
Local markup compilation uses $(InternalMarkupCompilation) instead of $(UseWpf). Suppress the
18+
corresponding SDK warning.
1919
-->
2020
<PropertyGroup>
2121
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);NETSDK1106</MSBuildWarningsAsMessages>
2222
</PropertyGroup>
2323

24-
<!--
24+
<!--
2525
We will use Microsoft.NET.Sdk.WindowsDesktop targets directly when local PresentationBuildTasks is not available
26-
We do not need to import Microsoft.NET.Sdk.WindowsDesktop.props from the Sdk - this only provides us with
27-
WPF references and Page, ApplicationDefinition globbing functionality - neither of which is used by our projects.
28-
26+
We do not need to import Microsoft.NET.Sdk.WindowsDesktop.props from the Sdk - this only provides us with
27+
WPF references and Page, ApplicationDefinition globbing functionality - neither of which is used by our projects.
28+
2929
If we had needed to use this props file, we'd have imported it like this:
30-
30+
3131
<PropertyGroup Condition="!Exists('$(LocalMicrosoftWinFXTargets)') And '$(InternalMarkupCompilation)'=='true'">
3232
<UseWpf>true</UseWpf>
3333
</PropertyGroup>
3434
<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
3535
Project="../targets/Microsoft.NET.Sdk.WindowsDesktop.props"
3636
Condition="!Exists('$(LocalMicrosoftWinFXTargets)') And '$(InternalMarkupCompilation)'=='true'"/>
37-
38-
We need Microsoft.WinFX.props though, so that's imported here specifically.
39-
40-
The use of Microsoft.NET.Sdk.WindowsDesktop doesn't break the source-build promise.
37+
38+
We need Microsoft.WinFX.props though, so that's imported here specifically.
39+
40+
The use of Microsoft.NET.Sdk.WindowsDesktop doesn't break the source-build promise.
4141
- Microsoft.NET.Sdk.WindowsDesktop is built from sources
42-
- It is used for compilation of assemblies in dotnet-wpf-int (the internal WPF repo), and serves as a
42+
- It is used for compilation of assemblies in dotnet-wpf-int (the internal WPF repo), and serves as a
4343
'transport package' for PresentationBuildTasks.dll and related props+targets file.
44-
- When the corresponding projects move from dotnet-wpf-int to dotnet/wpf in the future, their build will
44+
- When the corresponding projects move from dotnet-wpf-int to dotnet/wpf in the future, their build will
4545
fall back to use local PBT project outputs for their compilation (instead of using WindowsDesktop Sdk package
46-
as a convenient 'transport package').
46+
as a convenient 'transport package').
4747
-->
48-
49-
<!--
48+
49+
<!--
5050
If local PresentationBuildTasks project is present, then import WinFX.props from local sources;
5151
otherwise import Microsoft.NET.Sdk.WindowsDesktop.props from Microsoft.NET.Sdk.WindowsDesktop
52-
52+
5353
We can not really test for $(InternalMarkupCompilation)==true here. It is usually defined
54-
in the csproj - which is included after props (but before targets).
54+
in the csproj - which is included after props (but before targets).
5555
-->
5656
<Import Project="$(WpfSourceDir)PresentationBuildTasks\Microsoft.WinFX.props"
5757
Condition="Exists('$(LocalMicrosoftWinFXProps)') "/>
58-
58+
5959
<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
6060
Project="../targets/Microsoft.WinFX.props"
61-
Condition="!Exists('$(LocalMicrosoftWinFXProps)') And
61+
Condition="!Exists('$(LocalMicrosoftWinFXProps)') And
6262
Exists('../targets/Microsoft.WinFX.props')"/>
6363
</Project>

Diff for: eng/WpfArcadeSdk/tools/Pbt.targets

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
<Project>
22
<PropertyGroup>
3-
<!--
3+
<!--
44
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.
88
We must ensure that an actual DLL exists at this location prior to the very first execution of a Task from within this assembly.
99
-->
1010
<_PresentationBuildTasksAssembly Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)')">$(PbtDir)PresentationBuildTasks.dll</_PresentationBuildTasksAssembly>
1111

12-
<!--
12+
<!--
1313
When PresentationBuildTasks project is not present locally (presumably because in our split-repo build model, it has been moved off of the repo
1414
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+
1717
Also see additional note in Pbt.props
1818
-->
1919
<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.
2323
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.
2525
https://github.com/dotnet/wpf/issues/1718
26-
-->
26+
-->
2727
<EmbedUntrackedSources Condition="'$(InternalMarkupCompilation)'=='true'">false</EmbedUntrackedSources>
2828
</PropertyGroup>
29-
<!--
30-
Internal PBT compilation requires that we use <NetCoreReference>
29+
<!--
30+
Internal PBT compilation requires that we use <NetCoreReference>
3131
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+
3434
In addition to this, our codebase requires that all references to Microsoft.NetCore.App
3535
be explicitly enumerated through the use of <NetCoreReference> to avoid inadvertent additions
3636
to assembly references during code-changes.
@@ -41,7 +41,7 @@
4141
<NetCoreReference Include="System.ComponentModel.TypeConverter" />
4242
<NetCoreReference Include="System.Runtime" />
4343
</ItemGroup>
44-
44+
4545
<PropertyGroup Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)')">
4646
<PrepareResourceNamesDependsOn>
4747
$(PrepareResourceNamesDependsOn);
@@ -54,9 +54,9 @@
5454
</MarkupCompilePass1DependsOn>
5555
</PropertyGroup>
5656

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
6060
(b) The TFM of the assembly matches the build toolset currently being used (netcore vs netframework)
6161
(c) The assembly is placed at $(_PresentationBuildTasksAssembly)
6262
(d) This is all done prior to the first ever use of a task from within this assembly by Microsoft.WinFX.targets
@@ -67,21 +67,21 @@
6767
BeforeTargets="ResolveProjectReferences">
6868
<MakeDir Condition="!Exists('$(PbtDir)')"
6969
Directories="$(PbtDir)" />
70-
70+
7171
<MSBuild Projects="$(WpfSourceDir)PresentationBuildTasks\PresentationBuildTasks.csproj"
7272
Condition="!Exists('$(_PresentationBuildTasksAssembly)') And Exists('$(LocalMicrosoftWinFXTargets)')"
7373
Properties="CopyTransitiveReferences=true;PublishDir=$(PbtDir);TargetFramework=$(PbtTfm);Platform=AnyCPU"
7474
Targets="Clean;Build;Publish" />
7575
</Target>
7676

77-
<Target Name="PreventResourcesSourceGenerationForPbtGeneratedResource"
77+
<Target Name="PreventResourcesSourceGenerationForPbtGeneratedResource"
7878
AfterTargets="MainResourcesGeneration"
7979
Condition="'$(InternalMarkupCompilation)'=='true'">
80-
<!--
80+
<!--
8181
Add the following metadata to $(IntermediateOutputPath)$(_ResourceNameInMainAssembly) within @(EmbeddedResource)
8282
<XlfInput>false</XlfInput>
8383
<GenerateSource>false</GenerateSource
84-
84+
8585
This ensures that PBT generated resources are not inadvertently picked up by Xlf source generator.
8686
-->
8787
<ItemGroup Condition="'$(_ResourceNameInMainAssembly)'!=''">
@@ -92,28 +92,28 @@
9292
</ItemGroup>
9393
</Target>
9494

95-
<!--
95+
<!--
9696
If local PresentationBuildTasks project is present, then import WinFX.targets from local sources;
9797
otherwise import Microsoft.NET.Sdk.WindowsDesktop.targets from Microsoft.NET.Sdk.WindowsDesktop
9898
-->
99-
<Import Project="$(WpfSourceDir)PresentationBuildTasks\Microsoft.WinFX.targets"
99+
<Import Project="$(WpfSourceDir)PresentationBuildTasks\Microsoft.WinFX.targets"
100100
Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)') "/>
101101

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.
107107
-->
108108
<PropertyGroup Condition="'$(InternalMarkupCompilation)'=='true' And !Exists('$(LocalMicrosoftWinFXTargets)') ">
109109
<_WindowsDesktopSdkTargetFrameworkVersionFloor Condition="'$(_WindowsDesktopSdkTargetFrameworkVersionFloor)' == ''">3.0</_WindowsDesktopSdkTargetFrameworkVersionFloor>
110-
110+
111111
<!-- Represents an undefined TFV value. -->
112112
<_UndefinedTargetFrameworkVersion>0.0</_UndefinedTargetFrameworkVersion>
113113

114114
<!-- Initial/Default value set to 'undefined'. Updated in Microsoft.NET.WindowsDesktop.targets -->
115115
<_TargetFrameworkVersionValue>$(_UndefinedTargetFrameworkVersion)</_TargetFrameworkVersionValue>
116-
116+
117117
</PropertyGroup>
118118
<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
119119
Project="../targets/Microsoft.NET.Sdk.WindowsDesktop.targets"
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
<Project>
2+
23
</Project>

Diff for: src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/PresentationBuildTasks.csproj

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
<EnableDefaultItems>false</EnableDefaultItems>
55
<EnablePInvokeAnalyzer>true</EnablePInvokeAnalyzer>
66

7-
<!--
7+
<!--
88
Clear AssemblyVersion => it will ensure that the AssemblyVersion is > 4.0.0.0.
9-
In turn, this will ensure that the net4x PresentationBuildTasks.dll
9+
In turn, this will ensure that the net4x PresentationBuildTasks.dll
1010
is always loaded directly instead of being matched against the GAC copy of the
11-
PresentationBuildTasks 4.0.0.0 that comes form the .NET Framework.
11+
PresentationBuildTasks 4.0.0.0 that comes form the .NET Framework.
1212
-->
1313
<AssemblyVersion />
1414

1515
<!--
16-
Suppressed Compiler Warnings:
16+
Suppressed Compiler Warnings:
1717
18-
CS1058: A previous catch clause already catches all exceptions. All exceptions
19-
thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException
18+
CS1058: A previous catch clause already catches all exceptions. All exceptions
19+
thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException
2020
-->
2121
<NoWarn>$(NoWarn);1058</NoWarn>
2222

@@ -39,9 +39,9 @@
3939
</PropertyGroup>
4040

4141

42-
<!--
43-
Incorporate Microsoft.WinFX.targets in nuget packages under
44-
content\targets\
42+
<!--
43+
Incorporate Microsoft.WinFX.targets in nuget packages under
44+
content\targets\
4545
-->
4646
<ItemGroup>
4747
<PackagingContent Include="$(MSBuildThisFileDirectory)Microsoft.WinFX.props" SubFolder="root\targets" />
@@ -76,8 +76,8 @@
7676
<Compile Include="System\AppContextDefaultValues.cs" />
7777
<Compile Include="MS\Internal\BuildTasksAppContextSwitches.cs" />
7878
</ItemGroup>
79-
80-
79+
80+
8181
<ItemGroup>
8282
<Compile Include="SR.cs" />
8383
<Compile Include="$(WpfCommonDir)src\System\SR.cs" >
@@ -313,7 +313,7 @@
313313
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCorePackageVersion)" />
314314
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="$(SystemReflectionMetadataLoadContextVersion)" />
315315

316-
<!--
316+
<!--
317317
Provide specific/old versions for PresentationBuildTasks which needs to run inside MSBuild
318318
-->
319319
<PackageReference Include="System.CodeDom" Version="$(SystemCodeDomPackageVersionForPresentationBuildTasks)" />

0 commit comments

Comments
 (0)