Skip to content

Commit 86f055b

Browse files
Merge branch 'managed-dwrite-factory' of https://github.com/ThomasGoulet73/wpf into managed-dwrite-fontcollectionloader
2 parents 2a69fe1 + 49550d1 commit 86f055b

File tree

1,474 files changed

+11179
-8320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,474 files changed

+11179
-8320
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
labels: []
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
We welcome bug reports! This template will help us gather the information we need to start the triage process.
9+
Note - If the bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...), please file the issue via the instructions [here](https://docs.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2019).
10+
11+
- type: textarea
12+
id: background
13+
attributes:
14+
label: Description
15+
description: Please share a clear and concise description of the problem.
16+
placeholder: Description
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: repro-steps
21+
attributes:
22+
label: Reproduction Steps
23+
description: |
24+
Please include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or a small project, with steps to run it. If possible include text as text rather than screenshots (so it shows up in searches).
25+
placeholder: Minimal Reproduction
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: expected-behavior
30+
attributes:
31+
label: Expected behavior
32+
description: |
33+
Provide a description of the expected behavior.
34+
placeholder: Expected behavior
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: actual-behavior
39+
attributes:
40+
label: Actual behavior
41+
description: |
42+
Provide a description of the actual behavior observed. If applicable please include any error messages, exception stacktraces or memory dumps.
43+
placeholder: Actual behavior
44+
validations:
45+
required: true
46+
- type: textarea
47+
id: regression
48+
attributes:
49+
label: Regression?
50+
description: |
51+
Did this work in a previous build or release of .NET Core, or from .NET Framework? If you can try a previous release or build to find out, that can help us narrow down the problem. If you don't know, that's OK.
52+
placeholder: Regression?
53+
validations:
54+
required: false
55+
- type: textarea
56+
id: known-workarounds
57+
attributes:
58+
label: Known Workarounds
59+
description: |
60+
Please provide a description of any known workarounds.
61+
placeholder: Known Workarounds
62+
validations:
63+
required: false
64+
65+
- type: textarea
66+
id: impact
67+
attributes:
68+
label: Impact
69+
description: |
70+
Please provide a description of known impact radius, impact intensity and impact reach.
71+
placeholder: Impact of bug.
72+
validations:
73+
required: false
74+
75+
- type: textarea
76+
id: configuration
77+
attributes:
78+
label: Configuration
79+
description: |
80+
Please provide more information on your .NET configuration:
81+
* Which version of .NET is the code running on?
82+
* What OS and version, and what distro if applicable?
83+
* What is the architecture (x64, x86, ARM, ARM64)?
84+
* Do you know whether it is specific to that configuration?
85+
placeholder: Configuration
86+
validations:
87+
required: false
88+
- type: textarea
89+
id: other-info
90+
attributes:
91+
label: Other information
92+
description: |
93+
If you have an idea where the problem might lie, let us know that here. Please include any pointers to code, relevant changes, or related issues you know of.
94+
placeholder: Other information
95+
validations:
96+
required: false
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: API Suggestion
2+
description: Propose a change to the public API surface
3+
title: "[API Proposal]: "
4+
labels: [api-suggestion]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We welcome API proposals! We have a process to evaluate the value and shape of new API. There is an overview of our process [here](https://github.com/dotnet/wpf/blob/main/Documentation/project/api-review-process.md). This template will help us gather the information we need to start the review process.
10+
- type: textarea
11+
id: background
12+
attributes:
13+
label: Background and motivation
14+
description: Please describe the purpose and value of the new API here.
15+
placeholder: Purpose
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: api-proposal
20+
attributes:
21+
label: API Proposal
22+
description: |
23+
Please provide the specific public API signature diff that you are proposing.
24+
25+
You may find the [Framework Design Guidelines](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/framework-design-guidelines-digest.md) helpful.
26+
placeholder: API declaration (no method bodies)
27+
value: |
28+
```csharp
29+
namespace System.Collections.Generic;
30+
31+
public class MyFancyCollection<T> : IEnumerable<T>
32+
{
33+
public void Fancy(T item);
34+
}
35+
```
36+
validations:
37+
required: true
38+
- type: textarea
39+
id: api-usage
40+
attributes:
41+
label: API Usage
42+
description: |
43+
Please provide code examples that highlight how the proposed API additions are meant to be consumed. This will help suggest whether the API has the right shape to be functional, performant and usable.
44+
placeholder: API usage
45+
value: |
46+
```csharp
47+
// Fancy the value
48+
var c = new MyFancyCollection<int>();
49+
c.Fancy(42);
50+
51+
// Getting the values out
52+
foreach (var v in c)
53+
Console.WriteLine(v);
54+
```
55+
validations:
56+
required: true
57+
- type: textarea
58+
id: alternative-designs
59+
attributes:
60+
label: Alternative Designs
61+
description: |
62+
Please provide alternative designs. This might not be APIs; for example instead of providing new APIs an option might be to change the behavior of an existing API.
63+
placeholder: Alternative designs
64+
validations:
65+
required: false
66+
- type: textarea
67+
id: risks
68+
attributes:
69+
label: Risks
70+
description: |
71+
Please mention any risks that to your knowledge the API proposal might entail, such as breaking changes, performance regressions, etc.
72+
placeholder: Risks
73+
validations:
74+
required: false

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/backportPRs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Backport PR to branch
2+
on:
3+
issue_comment:
4+
types: [created]
5+
schedule:
6+
# once a day at 13:00 UTC to cleanup old runs
7+
- cron: '0 13 * * *'
8+
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
actions: write
14+
15+
jobs:
16+
backport:
17+
if: ${{ contains(github.event.comment.body, '/backport to') || github.event_name == 'schedule' }}
18+
uses: dotnet/arcade/.github/workflows/backport-base.yml@main
19+
with:
20+
pr_description_template: |
21+
Backport of #%source_pr_number% to %target_branch%
22+
/cc %cc_users%
23+
## Customer Impact
24+
## Testing
25+
## Risk
26+
**IMPORTANT**: If this backport is for a servicing release, please verify that:
27+
- The PR target branch is `release/X.0-staging`, not `release/X.0`.
28+
- If the change touches code that ships in a NuGet package, you have added the necessary [package authoring](https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md) and gotten it explicitly reviewed.

Directory.Build.targets

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@
77
Project="Sdk.targets"
88
Condition="!Exists('$(WpfArcadeSdkProps)') Or !Exists('$(WpfArcadeSdkTargets)')"/>
99

10-
<!-- Temporarily remove analyzers from framework references until we can update to VS 2022 which handles them correctly
11-
https://github.com/dotnet/wpf/issues/5224 -->
12-
<Target Name="_RemoveFrameworkReferenceAnalyzers" AfterTargets="ResolveTargetingPackAssets">
13-
<ItemGroup>
14-
<Analyzer Remove="@(Analyzer)" Condition="'%(Analyzer.FrameworkReferenceName)' != ''" />
15-
</ItemGroup>
16-
</Target>
1710
</Project>

Documentation/api-compat.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# API Compatibility
2-
API compatibility is a build-time check that ensures that an `implementation` assembly implements the API surface area of a `contract` assembly.
2+
API compatibility is a build-time check that ensures that an _implementation_ assembly implements the API surface area of a _contract_ assembly.
33

44
For `WPF on .NET Core`, this means the following:
5-
* All `WPF on .NET Core` reference assemblies contain **at least** the API surface area contained by `WPF on .NET Framework 4.8` reference assemblies.
6-
* All hand-crafted reference assemblies for `WPF on .NET Core` contain **exactly** the needed API surface area defined by their corresponding runtime assemblies. (If you're adding new API surface area, you will need to update the hand-crafted reference assemblies, following [these instructions](https://github.com/dotnet/wpf/blob/main/Documentation/gen-api.md).)
5+
* All `WPF on .NET Core` reference assemblies (_implementation_) contain **at least** the API surface area contained by `WPF on .NET Framework 4.8` reference assemblies (_contract_), see [WpfValidateApiCompatForNetFramework](#wpfvalidateapicompatfornetframework).
6+
* All hand-crafted reference assemblies for `WPF on .NET Core` (_implementation_) contain **exactly** the needed API surface area defined by their corresponding runtime assemblies (_contract_), see [WpfValidateApiCompatForRef](#wpfvalidateapicompatforref). (If you're adding new API surface area, you will need to update the hand-crafted reference assemblies, following [these instructions](https://github.com/dotnet/wpf/blob/main/Documentation/gen-api.md).)
77

88
This is accomplished by the use of the [Arcade API Compatibility tool](https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.ApiCompat) with some modifications to fit our specific needs.
99

Documentation/developer-guide.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ The [Issue Guide](issue-guide.md) describes our approach to using GitHub issues.
66

77
## Machine Setup
88

9-
Follow the [Building CoreFX on Windows](https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md) instructions.
10-
11-
WPF requires the following workloads and components be selected when installing Visual Studio:
9+
WPF requires the following workloads and components be selected when installing Visual Studio 2022 (17.0.0):
1210

1311
* Required Workloads: [wpf.vsconfig](wpf.vsconfig)
1412
* Also see [Import or export installation configurations](https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2019)
@@ -17,7 +15,7 @@ WPF requires the following workloads and components be selected when installing
1715

1816
We use the following workflow for building and testing features and fixes.
1917

20-
You first need to [Fork](https://github.com/dotnet/corefx/wiki/Checking-out-the-code-repository#fork-the-repository) and [Clone](https://github.com/dotnet/corefx/wiki/Checking-out-the-code-repository#clone-the-repository) this WPF repository. This is a one-time task.
18+
You first need to [Fork](https://guides.github.com/activities/forking) and [Clone](https://www.git-scm.com/docs/git-clone) this WPF repository. This is a one-time task.
2119

2220

2321
### Running DRTs locally ###
@@ -197,22 +195,40 @@ If you don't have the ability to build from source, you can update the *.runtime
197195
Follow the steps defined [here](https://github.com/dotnet/arcade/blob/main/Documentation/SeePackagesLatestVersion.md) to get setup for [swagger API](https://maestro-prod.westus2.cloudapp.azure.com/swagger/ui/index.html). Note that you need to authorize each time you login, so keep note of your token or you'll have to generate a new one. Assuming you have a commit (and therefore an Azure DevOps build id) that you are interested in, you can enter the build id into your query.
198196

199197
### Testing PresentationBuildTasks
200-
-- add more content here --
201198

202-
## Commonly Encountered Errors
199+
#### Debugging Presentation Build Task
200+
Debugging Presentation Build Task(hereafter called PBT) can be required for various reasons. One of them can be if there is something you wanted to know about markup compilation. In this section you will learn how to debug PBT.
201+
202+
For the sake of explaining the debugging steps, we will try to stop the debugger at execute (public function) of markupCompilatonPass2.
203+
204+
Follow the following steps sequentially.
205+
1. Replace the`PresentationBuildTasks.dll` located at `C:\Program Files\dotnet\sdk\<your sdk version>\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472` with your binaries (`<wpf clone directory>\artifacts\packaging\Debug\Microsoft.NET.Sdk.WindowsDesktop.Debug\tools\net472`).
206+
2. Launch Visual Studio and open the `Msbuild.exe` (generally located at `C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\MSBuild.exe`)
207+
3. Go to Debug->Options->Symbols
208+
4. Check option - `Load only specified modules` and click on `Specify included modules`
209+
5. Symbols to Load automatically dialog box will pop up
210+
6. Click on `+` button on top right and add `PresentationBuildTasks.dll`.
211+
7. Click OK.
212+
8. Right click on `MsBuild.exe` in solution explorer and select Properties.
213+
9. In the Parameters textbox enter the fullpath to a solution file (.sln ||.csproj) of a test repo.
214+
10. Click Save.
215+
11. Open "`<wpf clone directory>\src\Microsoft.DotNet.Wpf\src\PresentationBuildTasks\Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs`" (File -> Open -> File) in editor
216+
12. Insert a breakpoint at start of `execute` function.
217+
13. Hit F5 to start debugging.
203218

219+
## Commonly Encountered Errors
204220
#### The specified RuntimeIdentifier `win-` is not recognized (Code: NETSDK1083)
205-
If you are seeing this error it means you are possibly missing `<Platform>` tag from your `.csproj` file. Please add the tag with apropriate value.
221+
If you are seeing this error it means you are possibly missing `<PlatformTarget>` tag from your `.csproj` file. Please add the tag with apropriate value.
206222

207-
For example:- if your wpf binaries are build for platform `x86` you should add `<Platform>x86</Platform>` to your `.csproj` file.
223+
For example:- if your wpf binaries are build for platform `x86` you should add `<PlatformTarget>x86</PlatformTarget>` to your `.csproj` file.
208224
Your final csproj file should look like as below:
209225

210226
```xml
211227
<PropertyGroup>
212228
<OutputType>WinExe</OutputType>
213229
<TargetFramework>net6.0-windows</TargetFramework>
214230
<UseWPF>true</UseWPF>
215-
<Platform>x86</Platform>
231+
<PlatformTarget>x86</PlatformTarget>
216232
</PropertyGroup>
217233

218234
<PropertyGroup>
@@ -221,6 +237,7 @@ Your final csproj file should look like as below:
221237
<Import Project="$(WpfRepoRoot)\eng\wpf-debug.targets" />
222238
```
223239

240+
224241
## More Information
225242

226243
* [git commands and workflow](https://github.com/dotnet/corefx/wiki/git-reference)
Loading

0 commit comments

Comments
 (0)