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

CoreWebView2WebErrorStatus exists in both Microsoft.Web.WebView2.Core and Microsoft.WinUI #4633

Closed
1 of 3 tasks
aureole82 opened this issue Feb 26, 2023 · 3 comments
Closed
1 of 3 tasks
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Needs: Triage 🔍

Comments

@aureole82
Copy link

aureole82 commented Feb 26, 2023

Describe the bug

I get this error message for any usage of the CoreWebView2WebErrorStatus enum:
The type 'CoreWebView2WebErrorStatus' exists in both 'Microsoft.Web.WebView2.Core, Version=1.0.864.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e' and 'Microsoft.WinUI, Version=3.0.0.0, Culture=neutral, PublicKeyToken=de31ebe4ad15742b'

It looks like Microsoft.EntityFrameworkCore.SqlServer has an indirect dependency on Microsoft.Web.WebView2 where the WinUI assembly copied from and now the same type exists twice:
image
Could you help me to fingerpoint to the correct originator? Thanks alot!

To Reproduce

  1. Create new project by "Template Studio for WinUI", in addition to defaults
    • Add WebView and
    • Select "Self-Contained", deselect "MSIX Packaging".
  2. Add EntityFrameworkCore + SQL Server database provider to the Core project.
    PM> Install-Package Microsoft.EntityFrameworkCore.SqlServer
  3. Rebuild solution.

Additional context

It worked with the wizard 5.2.1 who used .NET 6.
I'm pretty sure this is a duplicate of microsoft/microsoft-ui-xaml#5689.

Applies to the following platforms:

  • WinUI
  • WPF
  • UWP

About your setup

  • Visual Studio Version: 5.3
  • Template Studio Wizard Version: 17.5.0
  • Windows Build: 22H2 19045.2604
@aureole82 aureole82 added the bug The issue relates to the wizard not working or a problem with the generated code. label Feb 26, 2023
@mikebattista
Copy link
Collaborator

Yes this is a duplicate of the issue you linked. It needs to be fixed at the platform level.

https://task.ms/39554408 is the corresponding internal bug tracking the issue.

@mikebattista mikebattista closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2023
@mikebattista
Copy link
Collaborator

See #4632 (reply in thread) for a potential workaround.

@aureole82
Copy link
Author

aureole82 commented Mar 12, 2023

@mikebattista

I think

to install the lower version of Microsoft.EntityFrameworkCore.SqlServer that doesn't have Azure in its dependency.

is not possible within a multi project solution where other clients also depend on the latest SQL Server access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

2 participants