Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 'WinFx' -> 'WinFX' casing #2975

Merged
merged 6 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# editorconfig.org

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

# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
[*]
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
Expand Down Expand Up @@ -67,7 +68,7 @@ dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static

dotnet_naming_style.static_prefix_style.required_prefix = s_
dotnet_naming_style.static_prefix_style.capitalization = camel_case
dotnet_naming_style.static_prefix_style.capitalization = camel_case

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

dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case

# Code style defaults
dotnet_sort_system_directives_first = true
Expand Down
42 changes: 21 additions & 21 deletions eng/WpfArcadeSdk/tools/Pbt.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,51 @@
<PbtDir>$(ArtifactsTmpDir)PresentationBuildTasks\$(PbtTfm)\</PbtDir>
</PropertyGroup>

<!--
Local markup compilation uses $(InternalMarkupCompilation) instead of $(UseWpf). Suppress the
corresponding SDK warning.
<!--
Local markup compilation uses $(InternalMarkupCompilation) instead of $(UseWpf). Suppress the
corresponding SDK warning.
-->
<PropertyGroup>
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);NETSDK1106</MSBuildWarningsAsMessages>
</PropertyGroup>

<!--
<!--
We will use Microsoft.NET.Sdk.WindowsDesktop targets directly when local PresentationBuildTasks is not available
We do not need to import Microsoft.NET.Sdk.WindowsDesktop.props from the Sdk - this only provides us with
WPF references and Page, ApplicationDefinition globbing functionality - neither of which is used by our projects.
We do not need to import Microsoft.NET.Sdk.WindowsDesktop.props from the Sdk - this only provides us with
WPF references and Page, ApplicationDefinition globbing functionality - neither of which is used by our projects.

If we had needed to use this props file, we'd have imported it like this:

<PropertyGroup Condition="!Exists('$(LocalMicrosoftWinFXTargets)') And '$(InternalMarkupCompilation)'=='true'">
<UseWpf>true</UseWpf>
</PropertyGroup>
<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
Project="../targets/Microsoft.NET.Sdk.WindowsDesktop.props"
Condition="!Exists('$(LocalMicrosoftWinFXTargets)') And '$(InternalMarkupCompilation)'=='true'"/>
We need Microsoft.WinFX.props though, so that's imported here specifically.
The use of Microsoft.NET.Sdk.WindowsDesktop doesn't break the source-build promise.

We need Microsoft.WinFX.props though, so that's imported here specifically.

The use of Microsoft.NET.Sdk.WindowsDesktop doesn't break the source-build promise.
- Microsoft.NET.Sdk.WindowsDesktop is built from sources
- It is used for compilation of assemblies in dotnet-wpf-int (the internal WPF repo), and serves as a
- It is used for compilation of assemblies in dotnet-wpf-int (the internal WPF repo), and serves as a
'transport package' for PresentationBuildTasks.dll and related props+targets file.
- When the corresponding projects move from dotnet-wpf-int to dotnet/wpf in the future, their build will
- When the corresponding projects move from dotnet-wpf-int to dotnet/wpf in the future, their build will
fall back to use local PBT project outputs for their compilation (instead of using WindowsDesktop Sdk package
as a convenient 'transport package').
as a convenient 'transport package').
-->
<!--

<!--
If local PresentationBuildTasks project is present, then import WinFX.props from local sources;
otherwise import Microsoft.NET.Sdk.WindowsDesktop.props from Microsoft.NET.Sdk.WindowsDesktop

We can not really test for $(InternalMarkupCompilation)==true here. It is usually defined
in the csproj - which is included after props (but before targets).
in the csproj - which is included after props (but before targets).
-->
<Import Project="$(WpfSourceDir)PresentationBuildTasks\Microsoft.WinFX.props"
Condition="Exists('$(LocalMicrosoftWinFXProps)') "/>

<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
Project="../targets/Microsoft.WinFX.props"
Condition="!Exists('$(LocalMicrosoftWinFXProps)') And
Condition="!Exists('$(LocalMicrosoftWinFXProps)') And
Exists('../targets/Microsoft.WinFX.props')"/>
</Project>
66 changes: 33 additions & 33 deletions eng/WpfArcadeSdk/tools/Pbt.targets
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<Project>
<PropertyGroup>
<!--
<!--
This should be defined before Microsoft.WinFX.targets in imported.
It's OK if there is no DLL realized at this location - we just need to have the property define.
It is also OK for a DLL to NOT exist at the time <UsingTask> is encountered against this assembly path.
It's OK if there is no DLL realized at this location - we just need to have the property define.

It is also OK for a DLL to NOT exist at the time <UsingTask> is encountered against this assembly path.
We must ensure that an actual DLL exists at this location prior to the very first execution of a Task from within this assembly.
-->
<_PresentationBuildTasksAssembly Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)')">$(PbtDir)PresentationBuildTasks.dll</_PresentationBuildTasksAssembly>

<!--
<!--
When PresentationBuildTasks project is not present locally (presumably because in our split-repo build model, it has been moved off of the repo
being built (typically, dotnet-wpf-int) over to GitHub (dotnet/wpf), we will leverage WindowsDesktop Sdk package directly as a 'transport package'
for providing PresentationBuildTasks.dll and related props+targets. These targets require UseWpf=true to be set.
for providing PresentationBuildTasks.dll and related props+targets. These targets require UseWpf=true to be set.

Also see additional note in Pbt.props
-->
<UseWpf Condition="'$(InternalMarkupCompilation)'=='true' And !Exists('$(LocalMicrosoftWinFXTargets)')"></UseWpf>
<!--
When markup compilation is involved, WPF generates .g.cs files via the GenerateTemporaryTargetAssembly task.

<!--
When markup compilation is involved, WPF generates .g.cs files via the GenerateTemporaryTargetAssembly task.
These do not always have the correct full-paths to their respective .xaml files annotated in them in the #line directives.
This can cause compile errors if these files are included in Source Link.
This can cause compile errors if these files are included in Source Link.
https://github.com/dotnet/wpf/issues/1718
-->
-->
<EmbedUntrackedSources Condition="'$(InternalMarkupCompilation)'=='true'">false</EmbedUntrackedSources>
</PropertyGroup>
<!--
Internal PBT compilation requires that we use <NetCoreReference>
<!--
Internal PBT compilation requires that we use <NetCoreReference>
This is so that the copy of ref\WindowsBase.dll inherited from Microsoft.NetCore.App
does not make its way through to markup-compilation.
does not make its way through to markup-compilation.

In addition to this, our codebase requires that all references to Microsoft.NetCore.App
be explicitly enumerated through the use of <NetCoreReference> to avoid inadvertent additions
to assembly references during code-changes.
Expand All @@ -41,7 +41,7 @@
<NetCoreReference Include="System.ComponentModel.TypeConverter" />
<NetCoreReference Include="System.Runtime" />
</ItemGroup>

<PropertyGroup Condition="'$(InternalMarkupCompilation)'=='true' And Exists('$(LocalMicrosoftWinFXTargets)')">
<PrepareResourceNamesDependsOn>
$(PrepareResourceNamesDependsOn);
Expand All @@ -54,9 +54,9 @@
</MarkupCompilePass1DependsOn>
</PropertyGroup>

<!--
This target ensures that
(a) PresentationBuildTasks.dll is built locally
<!--
This target ensures that
(a) PresentationBuildTasks.dll is built locally
(b) The TFM of the assembly matches the build toolset currently being used (netcore vs netframework)
(c) The assembly is placed at $(_PresentationBuildTasksAssembly)
(d) This is all done prior to the first ever use of a task from within this assembly by Microsoft.WinFX.targets
Expand All @@ -67,21 +67,21 @@
BeforeTargets="ResolveProjectReferences">
<MakeDir Condition="!Exists('$(PbtDir)')"
Directories="$(PbtDir)" />

<MSBuild Projects="$(WpfSourceDir)PresentationBuildTasks\PresentationBuildTasks.csproj"
Condition="!Exists('$(_PresentationBuildTasksAssembly)') And Exists('$(LocalMicrosoftWinFXTargets)')"
Properties="CopyTransitiveReferences=true;PublishDir=$(PbtDir);TargetFramework=$(PbtTfm);Platform=AnyCPU"
Targets="Clean;Build;Publish" />
</Target>

<Target Name="PreventResourcesSourceGenerationForPbtGeneratedResource"
<Target Name="PreventResourcesSourceGenerationForPbtGeneratedResource"
AfterTargets="MainResourcesGeneration"
Condition="'$(InternalMarkupCompilation)'=='true'">
<!--
<!--
Add the following metadata to $(IntermediateOutputPath)$(_ResourceNameInMainAssembly) within @(EmbeddedResource)
<XlfInput>false</XlfInput>
<GenerateSource>false</GenerateSource

This ensures that PBT generated resources are not inadvertently picked up by Xlf source generator.
-->
<ItemGroup Condition="'$(_ResourceNameInMainAssembly)'!=''">
Expand All @@ -92,28 +92,28 @@
</ItemGroup>
</Target>

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

<!--
_WindowsDesktopSdkTargetFrameworkVersionFloor, _UndefinedTargetFrameworkVersion and _TargetFrameworkVersionValue are
defined in Microsoft.NET.WindowDesktop.props.
These need to be defined before Microsoft.NET.Sdk.WindowsDesktop.targets is imported.
<!--
_WindowsDesktopSdkTargetFrameworkVersionFloor, _UndefinedTargetFrameworkVersion and _TargetFrameworkVersionValue are
defined in Microsoft.NET.WindowDesktop.props.

These need to be defined before Microsoft.NET.Sdk.WindowsDesktop.targets is imported.
-->
<PropertyGroup Condition="'$(InternalMarkupCompilation)'=='true' And !Exists('$(LocalMicrosoftWinFXTargets)') ">
<_WindowsDesktopSdkTargetFrameworkVersionFloor Condition="'$(_WindowsDesktopSdkTargetFrameworkVersionFloor)' == ''">3.0</_WindowsDesktopSdkTargetFrameworkVersionFloor>

<!-- Represents an undefined TFV value. -->
<_UndefinedTargetFrameworkVersion>0.0</_UndefinedTargetFrameworkVersion>

<!-- Initial/Default value set to 'undefined'. Updated in Microsoft.NET.WindowsDesktop.targets -->
<_TargetFrameworkVersionValue>$(_UndefinedTargetFrameworkVersion)</_TargetFrameworkVersionValue>

</PropertyGroup>
<Import Sdk="Microsoft.NET.Sdk.WindowsDesktop"
Project="../targets/Microsoft.NET.Sdk.WindowsDesktop.targets"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<Project>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
<EnableDefaultItems>false</EnableDefaultItems>
<EnablePInvokeAnalyzer>true</EnablePInvokeAnalyzer>

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

<!--
Suppressed Compiler Warnings:
Suppressed Compiler Warnings:

CS1058: A previous catch clause already catches all exceptions. All exceptions
thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException
CS1058: A previous catch clause already catches all exceptions. All exceptions
thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException
-->
<NoWarn>$(NoWarn);1058</NoWarn>

Expand All @@ -39,9 +39,9 @@
</PropertyGroup>


<!--
Incorporate Microsoft.WinFX.targets in nuget packages under
content\targets\
<!--
Incorporate Microsoft.WinFX.targets in nuget packages under
content\targets\
-->
<ItemGroup>
<PackagingContent Include="$(MSBuildThisFileDirectory)Microsoft.WinFX.props" SubFolder="root\targets" />
Expand Down Expand Up @@ -76,8 +76,8 @@
<Compile Include="System\AppContextDefaultValues.cs" />
<Compile Include="MS\Internal\BuildTasksAppContextSwitches.cs" />
</ItemGroup>


<ItemGroup>
<Compile Include="SR.cs" />
<Compile Include="$(WpfCommonDir)src\System\SR.cs" >
Expand Down Expand Up @@ -313,7 +313,7 @@
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCorePackageVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="$(SystemReflectionMetadataLoadContextVersion)" />

<!--
<!--
Provide specific/old versions for PresentationBuildTasks which needs to run inside MSBuild
-->
<PackageReference Include="System.CodeDom" Version="$(SystemCodeDomPackageVersionForPresentationBuildTasks)" />
Expand Down
Loading