MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: WPF app that also uses Microsoft.Windows.SDK.BuildTools not possible
@Navdeep-ss is already working on this.
Since Jul 16, 2025.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
When I add the Microsoft.Windows.SDK.BuildTools to your ~\WebView2Samples\GettingStartedGuides\WPF_GettingStarted\WPFSample.csproj
<PackageReference Include="Microsoft.Web.WebView2" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
So that I can use Microsoft.Windows.ApplicationModel.DynamicDependency.Bootstrap.TryInitialize(0x00010005, out int hresult)
The build fails.
The tag 'WebView2' does not exist in XML namespace 'clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf'. Line 22 Position 10.
Can you recommend a fix or workaround?
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
138.0.3351.83
SDK Version
1.0.3351.48
Framework
WPF
Operating System
Windows 11
OS Version
26100.4652
Repro steps
- Clone https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides
- Modify the WPFSample.csproj to add
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
- hit rebuild.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.