未验证 提交 3db60787 编写于 作者: V Vatsan Madhavan 提交者: GitHub

Merge pull request #2857 from wpfcontrib/update-cxx-tools

Incorporate C++/CLI tools that can build against updated runtime bits
# C++ Notes
- `$(RepoRoot)eng\WpfArcadeSdk\tools\` contains `Wpf.Cpp.Props`,`Wpf.Cpp.targets`, `Wpf.Cpp.PrivateTools.props` and `Wpf.Cpp.PrivateTools.targets`, which contain all the important C++ related properties
- We need to undefine the `TargetFramework` property when `ProjectReference`-ing a C++/CLI project from a C# project
- When a C++/CLI project is built directly from the solution, `TargetFramework=netcoreapp3.0` etc. property is NOT passed to it.
- When the same project is built via a C# project, it receives a global property `TargetFramework=netcoreapp3.0`.
- This results in msbuild treating those two instances as _sufficiently different_ and builds them independently.
- In turn, the same project is built twice (often simultaneously), and results in simultaneous writes to the PDB etc.
- This leads to build failures.
- The solution is to delete `TargetFramework` property when specifying `ProjectReference` to a C++/CLI project from a C# project, like this:
`<ProjectReference Include="$(WpfSourceDir)PresentationCore\CPP\PresentationCoreCpp.vcxproj">
<UndefineProperties>TargetFramework;TargetFrameworks</UndefineProperties>
</ProjectReference>`
### Deprecated Compiler Features
- /nowarn:D9035 is now being passed to build.ps1 in order to suppress the following C++ compiler warnings:
- cl : Command line error D9035: option 'clr:pure' has been deprecated and will be removed in a future release
- cl : Command line error D9035: option 'Zc:forScope-' has been deprecated and will be removed in a future release
### Local Markup Compilation
This repo builds PresentationBuildTasks.dll and the WindowsDesktop SDK itself, which are needed for markup-compilation.
Some of the projects in this repo require Markup Compilation themselves - for e.g., theme assemblies.
Here, we outline the scheme used by this repo to bootstrap markup compilation before a full-fledged WindowsDesktop SDK is available. All projects in this repo are base .NET Core SDK projects that utilize additional props/targets outlined below to enable markup compilation.
Local Markup Compilation is implemented in the following files:
- eng\WpfArcadeSdk\tools\Pbt.props
- eng\WpfArcadeSdk\tools\Pbt.targets
- eng\WpfArcadeSdk\tools\NoInternalTypeHelper.targets
See comments in these targets for further details. Some additional work is needed to make this work completely.
It can be enabled for a project by setting this:
```
<PropertyGroup>
<InternalMarkupCompilation>true</InternalMarkupCompilation>
</PropertyGroup>
```
Also, it's a good idea to use the following properties:
```
<PropertyGroup>
<NoInternalTypeHelper>true</NoInternalTypeHelper>
<GenerateDependencyFile>false<GenerateDependencyFile>
</PropertyGroup>
```
Please take a look at `src\Microsoft.DotNet.Wpf\src\PresentationUI\PresentationUI.csproj` to see how this is utilized.
In addition to these, care must be taken for the following:
- Use `<EmbeddedResource>` instead of `<Resource>`
- `PresentationBuildTask` will strip out `<Resource>` items during `_CompileTemporaryAssembly` phase. Using `EmbeddedResource` is equivalent (esp. in for `Xlf` based string resource generation with `Arcade.Sdk`) and will not be adversely affected by `PresentationBuildTasks` transformations.
- Always use `<NetCoreReference>` instead of implicitly acquiring the full set of `Microsoft.NetCore.App` references.
- `Microsoft.NetCore.App` contains a version `WindowsBase` that clashes with WPF's `WindowsBase` during markup compilation.
- To avoid this clash, we must always specify the references we need explicitly.
- Also, our code-base requires that all references be specified explicitly anyway to avoid inadvertent reference-creep to bug-fixes.
\ No newline at end of file
# C++ Private Tools
### What is msvcurt-c1xx in global.json?
In late Feb 2019, we discovered a bug in the C++/CLI compiler for .NET Core that requried the front-end (`c1xx.dll`) and the libraries (`msvcurt(d)_netcore.lib`) to be rebuilt.
A fix was available in mid Mar, 2019, but this change could not make it into Dev16.0, and Dev16.1 Preview1 build weren't coming out until later in Apr, 2019.
In collaboration with the C++ team, we decided to build our repo using private (but signed) copies of `c1xx.dll` and `msvcurt(d)_netcore.dll`.
We have uploaded these private DLL's to an Azure blob at this location using Arcade's [_Native Toolset Bootstrapping_](https://github.com/dotnet/arcade/blob/master/Documentation/NativeToolBootstrapping.md) process.
This results in the the packages being uploaded to locations like these:
```
- https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/msvcurt-c1xx/msvcurt-c1xx-0.0.0.3-win32-x86.zip
- https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/msvcurt-c1xx/msvcurt-c1xx-0.0.0.3-win64-x64.zip
```
PS: The version at the time this note was written is `0.0.0.3`. The version might be updated in the future and `global.json` would contain the correct version.
The version (`0.0.0.3`) is arbitrary, and simply refers to the the number of different versions we have uploaded as part of a trial-and-error approach to making our build work with these private compiler-bits.
In Azure Storage Explorer, the blobs can be found at this location:
```
- Dotnet Engineering Services
- Storage Accounts
- netcorenativeassets
- Blob Containers
- resource-packages
- external
- windows
- msvcurt-c1xx
- msvcurt-c1xx-0.0.0.3-win64-x64.zip
- msvcurt-c1xx-0.0.0.3-win32-x86.zip
```
Writing to this storage account requires special permissions and is only available to Microsoft Employees - please work with DncEng if you need to do this. Also refer to [Native Toolset Bootstrapping documentation](https://github.com/dotnet/arcade/blob/master/Documentation/NativeToolBootstrapping.md).
#### How does msvcurt-c1xx work?
- global.json + Arcade's toolset restore-phase will download the blobs and lay it out under `$(RepoRoot).tools\native\bin\msvcurt-c1xx\0.0.0.3\`
- This will happen before build starts.
- WPF's `Wpf.Cpp.props` + `Wpf.Cpp.targets` identifies the right copy of `c1xx.dll` and `msvcurt(d)_netcore.lib` and passes it to `cl.exe` and `link.exe` - thus overriding the copies that shipeed with Visual Studio.
- For testing, you can prepare appropriate zip-bundles as described in the _Native Toolset Bootstrapping_ documentation and place them under `$env:USERPROFILE\.netcoreeng\native\temp` folder.
- This is the _cache_ location used by the Arcade scripts for downloading the zip bundles from Azure Blob storage to local disk.
- When the build-scripts observe that the zip file is already present in this location, they will not attempt to download the zip file from the blob.
\ No newline at end of file
# Cycle Breakers
Certain assemblies in WPF contain cycles - they use types from other assemblies which, in turn, use types from them, effectively creating a cycle.
To allow assemblies to compile, we introduced cycle-breaking assemblies which re-define the problematic types (without an implementation and/or closure) and allow projects to referene them instead of referencing themselves, and break the cycle.
There are 2 types of cycle breaking assemblies:
* **Implementation cycle breakers**
An implementation cycle breaker assembly is referenced directly from a project that uses types from another "cycled" assembly in its implementation. An implemention cycle breaking assembly is likely to include types *and* their closures, because the closure may be used from the calling assembly.
* **API cycle breakers**
An API cycle breaking assembly is an assembly is likely referenced from a ref-assembly, or an implementation cycle breaking assembly. It is likely to not contain type closures, as much as possible, and generally minimal - way smaller in footprint than an implementation cycle breaker.
Examples of such assemblies are under *src\Microsoft.DotNet.Wpf\cycle-breakers*:
> Ex: PresentationFramework\PresentationFramework-PresentationUI-api-cycle.csproj
In the previous example, this assembly contains types from PresentationFramework and is exposing them to PresentationUI as an api-cycle-breaker. You will likely see minimal types here.
> Ex: PresentationFramework\PresentationFramework-ReachFramework-impl-cycle.csproj
In the previous example, this assembly contains types from PresentationFramework and is exposing them to the ReachFramework's implementation. This is what we call an implementation cycle-breaker and you will likely see types with full closures here.
\ No newline at end of file
# Projects and Assemblies
The following assemblies are being produced today:
```
+---net472
| | PresentationBuildTasks.dll
| | System.Collections.Immutable.dll
| | System.Memory.dll
| | System.Numerics.Vectors.dll
| | System.Reflection.Metadata.dll
| | System.Reflection.MetadataLoadContext.dll
| | System.Runtime.CompilerServices.Unsafe.dll
| |
| +---cs
| | PresentationBuildTasks.resources.dll
| |
| +---de
| | PresentationBuildTasks.resources.dll
| |
| +---es
| | PresentationBuildTasks.resources.dll
| |
| +---fr
| | PresentationBuildTasks.resources.dll
| |
| +---it
| | PresentationBuildTasks.resources.dll
| |
| +---ja
| | PresentationBuildTasks.resources.dll
| |
| +---ko
| | PresentationBuildTasks.resources.dll
| |
| +---pl
| | PresentationBuildTasks.resources.dll
| |
| +---pt-BR
| | PresentationBuildTasks.resources.dll
| |
| +---ru
| | PresentationBuildTasks.resources.dll
| |
| +---tr
| | PresentationBuildTasks.resources.dll
| |
| +---zh-Hans
| | PresentationBuildTasks.resources.dll
| |
| \---zh-Hant
| PresentationBuildTasks.resources.dll
|
\---netcoreapp2.1
| PresentationBuildTasks.dll
| System.Reflection.MetadataLoadContext.dll
|
+---cs
| PresentationBuildTasks.resources.dll
|
+---de
| PresentationBuildTasks.resources.dll
|
+---es
| PresentationBuildTasks.resources.dll
|
+---fr
| PresentationBuildTasks.resources.dll
|
+---it
| PresentationBuildTasks.resources.dll
|
+---ja
| PresentationBuildTasks.resources.dll
|
+---ko
| PresentationBuildTasks.resources.dll
|
+---pl
| PresentationBuildTasks.resources.dll
|
+---pt-BR
| PresentationBuildTasks.resources.dll
|
+---ru
| PresentationBuildTasks.resources.dll
|
+---tr
| PresentationBuildTasks.resources.dll
|
+---zh-Hans
| PresentationBuildTasks.resources.dll
|
\---zh-Hant
PresentationBuildTasks.resources.dll
\---netcoreapp5.0
| DirectWriteForwarder.dll
| DirectWriteForwarder.pdb
| PresentationCore.dll
| PresentationCore.pdb
| PresentationFramework-SystemCore.dll
| PresentationFramework-SystemCore.pdb
| PresentationFramework-SystemData.dll
| PresentationFramework-SystemData.pdb
| PresentationFramework-SystemDrawing.dll
| PresentationFramework-SystemDrawing.pdb
| PresentationFramework-SystemXml.dll
| PresentationFramework-SystemXml.pdb
| PresentationFramework-SystemXmlLinq.dll
| PresentationFramework-SystemXmlLinq.pdb
| PresentationFramework.Aero.dll
| PresentationFramework.Aero.pdb
| PresentationFramework.Aero2.dll
| PresentationFramework.Aero2.pdb
| PresentationFramework.AeroLite.dll
| PresentationFramework.AeroLite.pdb
| PresentationFramework.Classic.dll
| PresentationFramework.Classic.pdb
| PresentationFramework.dll
| PresentationFramework.Luna.dll
| PresentationFramework.Luna.pdb
| PresentationFramework.pdb
| PresentationFramework.Royale.dll
| PresentationFramework.Royale.pdb
| PresentationUI.dll
| PresentationUI.pdb
| ReachFramework.dll
| ReachFramework.pdb
| System.Printing.dll
| System.Printing.pdb
| System.Windows.Controls.Ribbon.dll
| System.Windows.Controls.Ribbon.pdb
| System.Windows.Input.Manipulations.dll
| System.Windows.Input.Manipulations.pdb
| System.Windows.Presentation.dll
| System.Windows.Presentation.pdb
| System.Xaml.dll
| System.Xaml.pdb
| UIAutomationClient.dll
| UIAutomationClient.pdb
| UIAutomationClientSideProviders.dll
| UIAutomationClientSideProviders.pdb
| UIAutomationProvider.dll
| UIAutomationProvider.pdb
| UIAutomationTypes.dll
| UIAutomationTypes.pdb
| WindowsBase.dll
| WindowsBase.pdb
| WindowsFormsIntegration.dll
| WindowsFormsIntegration.pdb
|
+---cs
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---de
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---es
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---fr
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---it
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---ja
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---ko
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---pl
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---pt-BR
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---ru
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---tr
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
+---zh-Hans
| PresentationCore.resources.dll
| PresentationFramework.resources.dll
| PresentationUI.resources.dll
| ReachFramework.resources.dll
| System.Printing.resources.dll
| System.Windows.Controls.Ribbon.resources.dll
| System.Windows.Input.Manipulations.resources.dll
| System.Xaml.resources.dll
| UIAutomationClient.resources.dll
| UIAutomationClientSideProviders.resources.dll
| UIAutomationProvider.resources.dll
| UIAutomationTypes.resources.dll
| WindowsBase.resources.dll
| WindowsFormsIntegration.resources.dll
|
\---zh-Hant
PresentationCore.resources.dll
PresentationFramework.resources.dll
PresentationUI.resources.dll
ReachFramework.resources.dll
System.Printing.resources.dll
System.Windows.Controls.Ribbon.resources.dll
System.Windows.Input.Manipulations.resources.dll
System.Xaml.resources.dll
UIAutomationClient.resources.dll
UIAutomationClientSideProviders.resources.dll
UIAutomationProvider.resources.dll
UIAutomationTypes.resources.dll
WindowsBase.resources.dll
WindowsFormsIntegration.resources.dll
\---win-x86
\---native
D3DCompiler_47_cor3.dll
PenImc_cor3.dll
PenImc_cor3.pdb
PresentationNative_cor3.dll
PresentationNative_cor3.pdb
vcruntime140d.dll
wpfgfx_cor3.dll
wpfgfx_cor3.pdb
\---win-x64
\---native
D3DCompiler_47_cor3.dll
PenImc_cor3.dll
PenImc_cor3.pdb
PresentationNative_cor3.dll
PresentationNative_cor3.pdb
vcruntime140d.dll
wpfgfx_cor3.dll
wpfgfx_cor3.pdb
```
The following projects exist in the repo. Those corresponding to the assemblies listed above are currently building.
```
cycle-breakers\PresentationFramework\PresentationFramework-PresentationUI-api-cycle.csproj
cycle-breakers\PresentationFramework\PresentationFramework-ReachFramework-impl-cycle.csproj
cycle-breakers\PresentationFramework\PresentationFramework-System.Printing-api-cycle.csproj
cycle-breakers\PresentationFramework\PresentationFramework-System.Printing-impl-cycle.csproj
cycle-breakers\PresentationUI\PresentationUI-PresentationFramework-impl-cycle.csproj
cycle-breakers\ReachFramework\ReachFramework-PresentationFramework-api-cycle.csproj
cycle-breakers\ReachFramework\ReachFramework-System.Printing-api-cycle.csproj
cycle-breakers\System.Printing\System.Printing-PresentationFramework-api-cycle.csproj
redist\D3DCompiler\D3DCompiler.vcxproj
redist\PresentationNative\PresentationNative.vcxproj
redist\VCRuntime\VCRuntime.vcxproj
src\DirectWriteForwarder\DirectWriteForwarder.vcxproj
src\Extensions\PresentationFramework-SystemCore\PresentationFramework-SystemCore.csproj
src\Extensions\PresentationFramework-SystemData\PresentationFramework-SystemData.csproj
src\Extensions\PresentationFramework-SystemDrawing\PresentationFramework-SystemDrawing.csproj
src\Extensions\PresentationFramework-SystemXml\PresentationFramework-SystemXml.csproj
src\Extensions\PresentationFramework-SystemXmlLinq\PresentationFramework-SystemXmlLinq.csproj
src\PenImc\dll\PenImc.vcxproj
src\PenImc\tablib\TabLib.vcxproj
src\PresentationBuildTasks\PresentationBuildTasks.csproj
src\PresentationCore\PresentationCore.csproj
src\PresentationCore\ref\PresentationCore-ref.csproj
src\PresentationFramework\PresentationFramework.csproj
src\PresentationFramework\ref\PresentationFramework-ref.csproj
src\PresentationUI\PresentationUI.csproj
src\PresentationUI\ref\PresentationUI-ref.csproj
src\ReachFramework\ReachFramework.csproj
src\ReachFramework\ref\ReachFramework-ref.csproj
src\Shared\OSVersionHelper\OSVersionHelper.vcxproj
src\Shared\Tracing\wpf-etw.proj
src\Shared\Tracing\mcwpf\mcwpf.csproj
src\System.Printing\System.Printing.vcxproj
src\System.Printing\ref\System.Printing-ref.csproj
src\System.Windows.Controls.Ribbon\System.Windows.Controls.Ribbon.csproj
src\System.Windows.Controls.Ribbon\ref\System.Windows.Controls.Ribbon-ref.csproj
src\System.Windows.Controls.Ribbon\Themes\Generator\ThemeGenerator.proj
src\System.Windows.Input.Manipulations\System.Windows.Input.Manipulations.csproj
src\System.Windows.Input.Manipulations\ref\System.Windows.Input.Manipulations-ref.csproj
src\System.Windows.Presentation\System.Windows.Presentation.csproj
src\System.Windows.Presentation\ref\System.Windows.Presentation-ref.csproj
src\System.Xaml\System.Xaml.csproj
src\System.Xaml\ref\System.Xaml-ref.csproj
src\Themes\Generator\ThemeGenerator.nativeproj
src\Themes\PresentationFramework.Aero\PresentationFramework.Aero.csproj
src\Themes\PresentationFramework.Aero\ref\PresentationFramework.Aero-ref.csproj
src\Themes\PresentationFramework.Aero2\PresentationFramework.Aero2.csproj
src\Themes\PresentationFramework.Aero2\ref\PresentationFramework.Aero2-ref.csproj
src\Themes\PresentationFramework.AeroLite\PresentationFramework.AeroLite.csproj
src\Themes\PresentationFramework.AeroLite\ref\PresentationFramework.AeroLite-ref.csproj
src\Themes\PresentationFramework.Classic\PresentationFramework.Classic.csproj
src\Themes\PresentationFramework.Classic\ref\PresentationFramework.Classic-ref.csproj
src\Themes\PresentationFramework.Luna\PresentationFramework.Luna.csproj
src\Themes\PresentationFramework.Luna\ref\PresentationFramework.Luna-ref.csproj
src\Themes\PresentationFramework.Royale\PresentationFramework.Royale.csproj
src\Themes\PresentationFramework.Royale\ref\PresentationFramework.Royale-ref.csproj
src\UIAutomation\UIAutomationClient\UIAutomationClient.csproj
src\UIAutomation\UIAutomationClient\ref\UIAutomationClient-ref.csproj
src\UIAutomation\UIAutomationClientSideProviders\UIAutomationClientSideProviders.csproj
src\UIAutomation\UIAutomationClientSideProviders\ref\UIAutomationClientSideProviders-ref.csproj
src\UIAutomation\UIAutomationProvider\UIAutomationProvider.csproj
src\UIAutomation\UIAutomationProvider\ref\UIAutomationProvider-ref.csproj
src\UIAutomation\UIAutomationTypes\UIAutomationTypes.csproj
src\UIAutomation\UIAutomationTypes\ref\UIAutomationTypes-ref.csproj
src\WindowsBase\WindowsBase.csproj
src\WindowsBase\ref\WindowsBase-ref.csproj
src\WindowsFormsIntegration\WindowsFormsIntegration.csproj
src\WindowsFormsIntegration\ref\WindowsFormsIntegration-ref.csproj
src\WpfGfx\codegen\mcg\mcg.proj
src\WpfGfx\common\DynamicCall\DynamicCall.vcxproj
src\WpfGfx\common\effects\effects.vcxproj
src\WpfGfx\common\scanop\scanop.vcxproj
src\WpfGfx\common\shared\shared.vcxproj
src\WpfGfx\core\api\api.vcxproj
src\WpfGfx\core\av\av.vcxproj
src\WpfGfx\core\common\common.vcxproj
src\WpfGfx\core\control\dll\milctrl.vcxproj
src\WpfGfx\core\control\util\util.vcxproj
src\WpfGfx\core\dll\wpfgfx.vcxproj
src\WpfGfx\core\fxjit\Collector\Collector.vcxproj
src\WpfGfx\core\fxjit\Compiler\Compiler.vcxproj
src\WpfGfx\core\fxjit\PixelShader\PixelShader.vcxproj
src\WpfGfx\core\fxjit\Platform\Platform.vcxproj
src\WpfGfx\core\geometry\Geometry.vcxproj
src\WpfGfx\core\glyph\glyph.vcxproj
src\WpfGfx\core\hw\hw.vcxproj
src\WpfGfx\core\hw\shaders\ShaderGen\shadergen.nativeproj
src\WpfGfx\core\meta\meta.vcxproj
src\WpfGfx\core\resources\resources.vcxproj
src\WpfGfx\core\sw\swlib\sw.vcxproj
src\WpfGfx\core\targets\targets.vcxproj
src\WpfGfx\core\uce\uce.vcxproj
src\WpfGfx\DbgXHelper\DbgXHelper.vcxproj
src\WpfGfx\exts\exts.vcxproj
src\WpfGfx\include\GraphicsInclude.nativeproj
src\WpfGfx\shared\debug\DebugLib\DebugLib.vcxproj
src\WpfGfx\shared\util\ConUtil\ConUtil.nativeproj
src\WpfGfx\shared\util\DllUtil\DllUtil.vcxproj
src\WpfGfx\shared\util\ExeUtil\ExeUtil.nativeproj
src\WpfGfx\shared\util\UtilLib\UtilLib.vcxproj
src\WpfGfx\tools\csp\csp.csproj
```
# Projects and Assemblies
This repository redistributes two assemblies.
```
- vcruntime140.dll
- d3dcompiler_47.dll
```
## Overview
WPF has two C++/CLI `/clr:pure` assemblies - `DirectWriteForwarder.dll` and `System.Printing.dll`.
`/clr:pure` assemblies have a dependeny on VC Runtime assemblies today - i.e., they require `vcruntime140.dll` (or `vcruntime140d.dll` when compiled in `Debug` mode).
This requires that end-users deploying WPF applications to install VC runtime redistributables. **We would like to avoid this.**
`wpfgfx_cor3.dll` - WPF's renderer - depends on `d3dcompiler_47.dll` - which is not available on all platforms (Operating Systems) universally. Some platforms have shipped `d3dcompiler_47.dll` via WU or Download Center and requires customers/consumers to download and install it manually.
We would like to assure that `d3dcompiler_47.dll` to be available at runtime along with WPF on .NET Core.
Both `vcruntime140.dll` and `d3dcompiler_47.dll` are redistributable assemblies, and we are allowed to bundle it with .NET Core 3.0 - and **therefore we choose to redistribute these assemblies with our runtime assemblies.**
Since applications are free to redistribute these assemblies as well, and sometimes they take dependences on specific versions of these assemblies, we should create a design that does not clash with application's choices. In order to acheive this, we **rename the assemblies and change the import table in WPF assemblies to point to the renamed assemblies**.
In other words,
```
- vcruntime140.dll -> renamed to vcruntime140_cor3.dll
- d3dcompiler_47.dll -> renamed to d3dcompiler_47_cor3.dll
```
The following files are used to orchestrate the renaming of DLL import tables, and copying of renamed assemblies and packaging them:
```
eng\WpfArcadeSdk\Redist.props
eng\WpfArcadeSdk\Redist.targets
src\Microsoft.DotNet.Wpf\redist\**\*
```
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Private.Winforms" Version="5.0.0-preview.4.20201.2">
<Dependency Name="Microsoft.Private.Winforms" Version="5.0.0-preview.4.20207.2">
<Uri>https://github.com/dotnet/winforms</Uri>
<Sha>b45c16e905aadce7bb61945395cd0751680f9781</Sha>
<Sha>1e0ac96b26a50d70305a79612744a370de6e1242</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.CodeDom" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.CodeDom" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Configuration.ConfigurationManager" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Configuration.ConfigurationManager" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.DirectoryServices" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.DirectoryServices" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Drawing.Common" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Drawing.Common" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Reflection.Emit" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Dependency Name="System.Reflection.Emit" Version="5.0.0-alpha.1.19563.6" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Sha>5cee7c97d602f294e27c582d4dab81ec388f1d7b</Sha>
</Dependency>
<Dependency Name="System.Reflection.MetadataLoadContext" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Reflection.MetadataLoadContext" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Security.AccessControl" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Security.AccessControl" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Security.Permissions" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Security.Permissions" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="System.Windows.Extensions" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Windows.Extensions" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20162.3">
<Uri>https://github.com/dotnet/arcade</Uri>
......@@ -67,29 +67,29 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Wpf.DncEng" Version="5.0.0-preview.4.20208.4">
<Dependency Name="Microsoft.DotNet.Wpf.DncEng" Version="5.0.0-preview.4.20208.6">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int</Uri>
<Sha>3de9ffd307bc8de030788df057e44b9dae78ed38</Sha>
<Sha>31cea8e501c4649083b88fd2ec48182106433749</Sha>
</Dependency>
<Dependency Name="System.IO.Packaging" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.IO.Packaging" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="5.0.0-alpha1.19513.3" CoherentParentDependency="Microsoft.Private.Winforms">
<Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="5.0.0-alpha1.19562.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>b415b57a15b0c6ba77e63df901823bb46b8aafda</Sha>
<Sha>d5bb8bf2437d447750cf0203dd55bb5160ff36b8</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.ILDAsm" Version="5.0.0-alpha1.19513.3" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>b415b57a15b0c6ba77e63df901823bb46b8aafda</Sha>
<Dependency Name="Microsoft.NETCore.ILDAsm" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.ILAsm" Version="5.0.0-alpha1.19513.3" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>b415b57a15b0c6ba77e63df901823bb46b8aafda</Sha>
<Dependency Name="Microsoft.NETCore.ILAsm" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20162.3">
<Uri>https://github.com/dotnet/arcade</Uri>
......@@ -103,13 +103,13 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
</Dependency>
<Dependency Name="System.Resources.Extensions" Version="5.0.0-alpha1.19512.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>8d21b79b924d29088dbde46d42737a657d466b5e</Sha>
<Dependency Name="System.Resources.Extensions" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.0-alpha1.19514.1" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/core-setup</Uri>
<Sha>4ace84dbf94128b4825c76cdd09b46dba7473478</Sha>
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.0-preview.4.20205.13" CoherentParentDependency="Microsoft.Private.Winforms">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>59ca590949ade88c712e4ca8c6835acd0e9cbf46</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
......@@ -4,40 +4,40 @@
<VersionPrefix>5.0.0</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration>4</PreReleaseVersionIteration>
<SystemIOPackagingVersion>5.0.0-alpha1.19512.1</SystemIOPackagingVersion>
<SystemResourcesExtensionsVersion>5.0.0-alpha1.19512.1</SystemResourcesExtensionsVersion>
<SystemIOPackagingVersion>5.0.0-preview.4.20205.13</SystemIOPackagingVersion>
<SystemResourcesExtensionsVersion>5.0.0-preview.4.20205.13</SystemResourcesExtensionsVersion>
</PropertyGroup>
<!-- NuGet Package Versions -->
<PropertyGroup>
<MicrosoftPrivateWinformsVersion>5.0.0-preview.4.20201.2</MicrosoftPrivateWinformsVersion>
<MicrosoftPrivateWinformsVersion>5.0.0-preview.4.20207.2</MicrosoftPrivateWinformsVersion>
</PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/coreclr -->
<PropertyGroup>
<MicrosoftNETCoreRuntimeCoreCLRVersion>5.0.0-alpha1.19513.3</MicrosoftNETCoreRuntimeCoreCLRVersion>
<MicrosoftNETCoreILDAsmVersion>5.0.0-alpha1.19513.3</MicrosoftNETCoreILDAsmVersion>
<MicrosoftNETCoreILAsmVersion>5.0.0-alpha1.19513.3</MicrosoftNETCoreILAsmVersion>
<MicrosoftNETCoreRuntimeCoreCLRVersion>5.0.0-alpha1.19562.1</MicrosoftNETCoreRuntimeCoreCLRVersion>
<MicrosoftNETCoreILDAsmVersion>5.0.0-preview.4.20205.13</MicrosoftNETCoreILDAsmVersion>
<MicrosoftNETCoreILAsmVersion>5.0.0-preview.4.20205.13</MicrosoftNETCoreILAsmVersion>
</PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/core-setup -->
<PropertyGroup>
<MicrosoftNETCoreAppInternalVersion>5.0.0-alpha1.19514.1</MicrosoftNETCoreAppInternalVersion>
<MicrosoftNETCorePlatformsVersion>5.0.0-alpha1.19512.1</MicrosoftNETCorePlatformsVersion>
<SystemDrawingCommonVersion>5.0.0-alpha1.19512.1</SystemDrawingCommonVersion>
<SystemDirectoryServicesVersion>5.0.0-alpha1.19512.1</SystemDirectoryServicesVersion>
<SystemReflectionMetadataLoadContextVersion>5.0.0-alpha1.19512.1</SystemReflectionMetadataLoadContextVersion>
<MicrosoftNETCoreAppInternalVersion>5.0.0-preview.4.20205.13</MicrosoftNETCoreAppInternalVersion>
<MicrosoftNETCorePlatformsVersion>5.0.0-preview.4.20205.13</MicrosoftNETCorePlatformsVersion>
<SystemDrawingCommonVersion>5.0.0-preview.4.20205.13</SystemDrawingCommonVersion>
<SystemDirectoryServicesVersion>5.0.0-preview.4.20205.13</SystemDirectoryServicesVersion>
<SystemReflectionMetadataLoadContextVersion>5.0.0-preview.4.20205.13</SystemReflectionMetadataLoadContextVersion>
</PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/corefx via core-setup coherency parent dependency -->
<PropertyGroup>
<MicrosoftWin32RegistryPackageVersion>5.0.0-alpha1.19512.1</MicrosoftWin32RegistryPackageVersion>
<SystemCodeDomPackageVersion>5.0.0-alpha1.19512.1</SystemCodeDomPackageVersion>
<SystemConfigurationConfigurationManagerPackageVersion>5.0.0-alpha1.19512.1</SystemConfigurationConfigurationManagerPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-alpha1.19512.1</SystemDiagnosticsEventLogPackageVersion>
<SystemReflectionEmitPackageVersion>5.0.0-alpha1.19512.1</SystemReflectionEmitPackageVersion>
<MicrosoftWin32RegistryPackageVersion>5.0.0-preview.4.20205.13</MicrosoftWin32RegistryPackageVersion>
<SystemCodeDomPackageVersion>5.0.0-preview.4.20205.13</SystemCodeDomPackageVersion>
<SystemConfigurationConfigurationManagerPackageVersion>5.0.0-preview.4.20205.13</SystemConfigurationConfigurationManagerPackageVersion>
<SystemDiagnosticsEventLogPackageVersion>5.0.0-preview.4.20205.13</SystemDiagnosticsEventLogPackageVersion>
<SystemReflectionEmitPackageVersion>5.0.0-alpha.1.19563.6</SystemReflectionEmitPackageVersion>
<SystemReflectionTypeExtensionsPackageVersion>4.6.0-preview4.19176.11</SystemReflectionTypeExtensionsPackageVersion>
<SystemSecurityAccessControlPackageVersion>5.0.0-alpha1.19512.1</SystemSecurityAccessControlPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-alpha1.19512.1</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-alpha1.19512.1</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-alpha1.19512.1</SystemSecurityPrincipalWindowsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-alpha1.19512.1</SystemWindowsExtensionsPackageVersion>
<SystemSecurityAccessControlPackageVersion>5.0.0-preview.4.20205.13</SystemSecurityAccessControlPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-preview.4.20205.13</SystemSecurityCryptographyXmlPackageVersion>
<SystemSecurityPermissionsPackageVersion>5.0.0-preview.4.20205.13</SystemSecurityPermissionsPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-preview.4.20205.13</SystemSecurityPrincipalWindowsPackageVersion>
<SystemWindowsExtensionsPackageVersion>5.0.0-preview.4.20205.13</SystemWindowsExtensionsPackageVersion>
</PropertyGroup>
<!-- Packages that come from https://github.com/dotnet/arcade -->
<PropertyGroup>
......@@ -53,7 +53,6 @@
<!-- Pin specific versions of S.Memory so that it would supply AssemblyVersion=4.0.1.0. See https://github.com/dotnet/runtime/issues/31672 -->
<PropertyGroup>
<SystemCodeDomPackageVersionForPresentationBuildTasks>4.4.0</SystemCodeDomPackageVersionForPresentationBuildTasks>
<SystemMemoryPackageVersionForPresentationBuildTasks>4.5.2</SystemMemoryPackageVersionForPresentationBuildTasks>
</PropertyGroup>
<!-- Other Packages that require manual updating-->
<PropertyGroup>
......@@ -66,7 +65,7 @@
Also in global.json
Used in Wpf.Cpp.PrivateTools.props/targets
-->
<MsvcurtC1xxVersion>0.0.0.8</MsvcurtC1xxVersion>
<MsvcurtC1xxVersion>0.0.1.2</MsvcurtC1xxVersion>
<!--
This is the version of the test infrastructure package is compiled against. This should be
removed as part of https://github.com/dotnet/wpf/issues/816
......@@ -97,6 +96,6 @@
<SystemReflectionMetadataLoadContextPackage>System.Reflection.MetadataLoadContext</SystemReflectionMetadataLoadContextPackage>
</PropertyGroup>
<PropertyGroup>
<MicrosoftDotNetWpfDncEngVersion>5.0.0-preview.4.20208.4</MicrosoftDotNetWpfDncEngVersion>
<MicrosoftDotNetWpfDncEngVersion>5.0.0-preview.4.20208.6</MicrosoftDotNetWpfDncEngVersion>
</PropertyGroup>
</Project>
{
"tools": {
"dotnet": "5.0.100-alpha1-015515",
"dotnet": "5.0.100-preview.1.20155.7",
"runtimes": {
"dotnet": [
"2.1.7",
......@@ -8,21 +8,21 @@
]
},
"vs": {
"version": "16.4"
"version": "16.5"
}
},
"sdk": {
"version": "5.0.100-alpha1-015515"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20162.3",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20162.3"
},
"sdk": {
"version": "5.0.100-preview.1.20155.7"
},
"native-tools": {
"strawberry-perl": "5.28.1.1-1",
"net-framework-48-ref-assemblies": "0.0.0.1",
"dotnet-api-docs_netcoreapp3.0": "0.0.0.2",
"msvcurt-c1xx": "0.0.0.8",
"msvcurt-c1xx": "0.0.1.2",
"net-framework-472-iltools": "0.0.0.1"
}
}
......@@ -313,16 +313,10 @@
<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)" />
<!-- Workaround for https://github.com/dotnet/runtime/issues/31672 -->
<PackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersionForPresentationBuildTasks)" Condition="'$(TargetFramework)' == 'net472'">
<NoWarn>$(NoWarn);NU1605</NoWarn>
</PackageReference>
</ItemGroup>
</Project>
......@@ -337,23 +337,7 @@ public bool ContainsKey(TKey key)
private Dictionary<TValue, List<TKey>> revDictionary;
}
// An IEqualityComparer<T> used to compare objects by reference.
internal class ReferenceEqualityComparer<T> : EqualityComparer<T> where T : class
{
internal static ReferenceEqualityComparer<T> Singleton = new ReferenceEqualityComparer<T>();
public override bool Equals(T x, T y)
{
return object.ReferenceEquals(x, y);
}
public override int GetHashCode(T obj)
{
return System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(obj);
}
}
private static TwoWayDictionary<SolidColorBrush, string> s_knownSolidColorBrushStringCache = new TwoWayDictionary<SolidColorBrush, string>(ReferenceEqualityComparer<string>.Singleton);
private static TwoWayDictionary<SolidColorBrush, string> s_knownSolidColorBrushStringCache = new TwoWayDictionary<SolidColorBrush, string>(keyComparer: ReferenceEqualityComparer.Instance);
#endif
}
}
......@@ -41,7 +41,7 @@ internal class NameFixupGraph
public NameFixupGraph()
{
var referenceComparer = ReferenceEqualityComparer<object>.Singleton;
var referenceComparer = ReferenceEqualityComparer.Instance;
_dependenciesByChildObject = new Dictionary<object, NameFixupToken>(referenceComparer);
_dependenciesByName = new Dictionary<string, FrugalObjectList<NameFixupToken>>(StringComparer.Ordinal);
_dependenciesByParentObject = new Dictionary<object, FrugalObjectList<NameFixupToken>>(referenceComparer);
......
......@@ -8,21 +8,6 @@
namespace System.Xaml.Schema
{
internal class ReferenceEqualityComparer<T> : EqualityComparer<T> where T : class
{
internal static readonly ReferenceEqualityComparer<T> Singleton = new ReferenceEqualityComparer<T>();
public override bool Equals(T x, T y)
{
return ReferenceEquals(x, y);
}
public override int GetHashCode(T obj)
{
return RuntimeHelpers.GetHashCode(obj);
}
}
internal class ReferenceEqualityTuple<T1, T2> : Tuple<T1, T2>
{
public ReferenceEqualityTuple(T1 item1, T2 item2)
......@@ -32,12 +17,12 @@ public ReferenceEqualityTuple(T1 item1, T2 item2)
public override bool Equals(object obj)
{
return ((IStructuralEquatable)this).Equals(obj, ReferenceEqualityComparer<object>.Singleton);
return ((IStructuralEquatable)this).Equals(obj, ReferenceEqualityComparer.Instance);
}
public override int GetHashCode()
{
return ((IStructuralEquatable)this).GetHashCode(ReferenceEqualityComparer<object>.Singleton);
return ((IStructuralEquatable)this).GetHashCode(ReferenceEqualityComparer.Instance);
}
}
......@@ -50,12 +35,12 @@ public ReferenceEqualityTuple(T1 item1, T2 item2, T3 item3)
public override bool Equals(object obj)
{
return ((IStructuralEquatable)this).Equals(obj, ReferenceEqualityComparer<object>.Singleton);
return ((IStructuralEquatable)this).Equals(obj, ReferenceEqualityComparer.Instance);
}
public override int GetHashCode()
{
return ((IStructuralEquatable)this).GetHashCode(ReferenceEqualityComparer<object>.Singleton);
return ((IStructuralEquatable)this).GetHashCode(ReferenceEqualityComparer.Instance);
}
}
}
......@@ -513,7 +513,7 @@ private string GetCompatibleNamespace(string oldNs)
get
{
if (_masterTypeList == null)
Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary<Type, XamlType>(ReferenceEqualityComparer<Type>.Singleton), null);
Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary<Type, XamlType>(ReferenceEqualityComparer.Instance), null);
return _masterTypeList;
}
}
......@@ -728,7 +728,7 @@ public IList<Assembly> ReferenceAssemblies
get
{
if (_xmlnsInfo == null)
Interlocked.CompareExchange(ref _xmlnsInfo, CreateDictionary<Assembly, XmlNsInfo>(ReferenceEqualityComparer<Assembly>.Singleton), null);
Interlocked.CompareExchange(ref _xmlnsInfo, CreateDictionary<Assembly, XmlNsInfo>(ReferenceEqualityComparer.Instance), null);
return _xmlnsInfo;
}
}
......@@ -766,7 +766,7 @@ public IList<Assembly> ReferenceAssemblies
{
if (_xmlnsInfoForUnreferencedAssemblies == null)
{
Interlocked.CompareExchange(ref _xmlnsInfoForUnreferencedAssemblies, CreateDictionary<Assembly, XmlNsInfo>(ReferenceEqualityComparer<Assembly>.Singleton), null);
Interlocked.CompareExchange(ref _xmlnsInfoForUnreferencedAssemblies, CreateDictionary<Assembly, XmlNsInfo>(ReferenceEqualityComparer.Instance), null);
}
return _xmlnsInfoForUnreferencedAssemblies;
}
......
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace MS.Internal.ComponentModel
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
// This is a hashcode comparer we use to compare object references
// rather than object equality.
//
internal class ReferenceEqualityComparer : IEqualityComparer<object>
{
bool IEqualityComparer<object>.Equals(object o1, object o2)
{
return object.ReferenceEquals(o1, o2);
}
public int GetHashCode(object o)
{
return o.GetHashCode();
}
}
}
......@@ -616,11 +616,11 @@ private PropertyDescriptor Property
// Synchronized by "_cache"
private static Dictionary<object, DependencyPropertyDescriptor> _cache =
new Dictionary<object, DependencyPropertyDescriptor>(
new ReferenceEqualityComparer()
ReferenceEqualityComparer.Instance
);
private static Dictionary<object, DependencyPropertyDescriptor> _ignorePropertyTypeCache =
new Dictionary<object, DependencyPropertyDescriptor>(
new ReferenceEqualityComparer()
ReferenceEqualityComparer.Instance
);
#endregion Private Fields
......
......@@ -86,7 +86,6 @@
<Compile Include="MS\Internal\ComponentModel\PropertyChangeTracker.cs" />
<Compile Include="MS\Internal\ComponentModel\PropertyDescriptorComparer.cs" />
<Compile Include="MS\Internal\ComponentModel\PropertyKey.cs" />
<Compile Include="MS\Internal\ComponentModel\ReferenceEqualityComparer.cs" />
<Compile Include="MS\Internal\ContentType.cs " />
<Compile Include="$(WpfSharedDir)\MS\Internal\CriticalExceptions.cs " />
<Compile Include="MS\Internal\DefaultValueFactory.cs" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册