From 57d8fd8b3a0ed358c86dfc8d9a7443dba0a1f719 Mon Sep 17 00:00:00 2001 From: vishalmsft Date: Tue, 25 May 2021 15:13:02 +0530 Subject: [PATCH 1/3] Adding target file, that can be imported inside the csproj. This will make it easy to use the locally built wpf assemblies. --- Documentation/developer-guide.md | 18 ++++++++++++++++++ eng/wpf-debug.targets | 23 +++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 eng/wpf-debug.targets diff --git a/Documentation/developer-guide.md b/Documentation/developer-guide.md index 44d1e35c2a3..98a6ef5796c 100644 --- a/Documentation/developer-guide.md +++ b/Documentation/developer-guide.md @@ -47,6 +47,24 @@ If there were any failures, you can cd into $(RepoRoot)\artifacts\test\$(Configu *NOTE: This requires being run from an admin window at the moment. Removing this restriction is tracked by https://github.com/dotnet/wpf/issues/816.* +### Debugging locally build WPF assemblies with WPF Application +This section is intended to simplify the steps needed to be able to debug the locally built WPF Assemblies, with any sample app. +Configure the project to build x86 or x64, as per the platform architecture you have selected while performing the build for WPF assemblies. +Go to the csproj file and append this line at the bottom of it. ``. The resultant csproj will look like this: +```xml + + WinExe + net6.0-windows + true + + + + C:\wpf + + +``` + + ### Testing Locally built WPF assemblies (excluding PresentationBuildTasks) This section of guide is intended to discuss the different approaches for ad-hoc testing of WPF assemblies, and not automated testing. For automated testing, see the [Running DRTs locally](#Running-DRTs-locally) section above. There are a few different ways this can be done, and for the most part, it depends on what you are trying to accomplish. This section tries to lay out which scenarios require which workflow. diff --git a/eng/wpf-debug.targets b/eng/wpf-debug.targets new file mode 100644 index 00000000000..51c130aebab --- /dev/null +++ b/eng/wpf-debug.targets @@ -0,0 +1,23 @@ + + + + + + Debug + win-$(PlatformTarget) + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\'))\artifacts\packaging\$(WpfConfig)\Microsoft.DotNet.Wpf.GitHub.$(WpfConfig) + + + + + + + From 3d2e69325b7ccc0eae40daa93293e17b65264d60 Mon Sep 17 00:00:00 2001 From: vishalmsft Date: Tue, 25 May 2021 15:25:44 +0530 Subject: [PATCH 2/3] The assemblies are locally built. --- Documentation/developer-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/developer-guide.md b/Documentation/developer-guide.md index 98a6ef5796c..d640df002e8 100644 --- a/Documentation/developer-guide.md +++ b/Documentation/developer-guide.md @@ -47,7 +47,7 @@ If there were any failures, you can cd into $(RepoRoot)\artifacts\test\$(Configu *NOTE: This requires being run from an admin window at the moment. Removing this restriction is tracked by https://github.com/dotnet/wpf/issues/816.* -### Debugging locally build WPF assemblies with WPF Application +### Debugging locally built WPF assemblies with WPF Application This section is intended to simplify the steps needed to be able to debug the locally built WPF Assemblies, with any sample app. Configure the project to build x86 or x64, as per the platform architecture you have selected while performing the build for WPF assemblies. Go to the csproj file and append this line at the bottom of it. ``. The resultant csproj will look like this: From dfaaad853a565149ca33c480cab73799c46acee5 Mon Sep 17 00:00:00 2001 From: Vishal Sharma <83055644+vishalmsft@users.noreply.github.com> Date: Mon, 31 May 2021 10:49:50 +0530 Subject: [PATCH 3/3] Update eng/wpf-debug.targets Set WpfConfig, only if consuming project haven't set it. Co-authored-by: ThomasGoulet73 <51839772+ThomasGoulet73@users.noreply.github.com> --- eng/wpf-debug.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/wpf-debug.targets b/eng/wpf-debug.targets index 51c130aebab..39c9d459217 100644 --- a/eng/wpf-debug.targets +++ b/eng/wpf-debug.targets @@ -11,7 +11,7 @@ --> - Debug + Debug win-$(PlatformTarget) $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\'))\artifacts\packaging\$(WpfConfig)\Microsoft.DotNet.Wpf.GitHub.$(WpfConfig)