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

Build conflicts caused by standalone WebView2 and embedded WebView2 (in Windows App SDK) #4249

Open
DJRM2021 opened this issue Mar 3, 2024 · 4 comments
Assignees

Comments

@DJRM2021
Copy link

DJRM2021 commented Mar 3, 2024

Describe the bug

Hi,

Can someone please help me on determining why I am having file conflict issues with WebView2.Core.dll? Below is my csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<TargetPlatformMinVersion>10.0.22621.0</TargetPlatformMinVersion>
<RootNamespace>Schoolr</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;ARM64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<SupportedOSPlatformVersion>10.0.22621.0</SupportedOSPlatformVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
**<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>**
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.CameraPreview" Version="8.0.240109" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.0.240109" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0-preview.1.24081.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0-preview.1.24081.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0-preview.1.24081.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
<PrivateAssets>all</PrivateAssets>
<!--<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>-->
</PackageReference>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26031-preview" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
image

Steps to reproduce the bug

  1. Create a new project using:
    image
  2. Modify the csproj file. Add true
  3. Modify the project to use .Net 8. Make sure to fix the RIDs.
  4. Update Windows App SDK and Build Tools in NPM.
  5. Install EF Core nuget references:
    image

Expected behavior

No response

Screenshots

No response

NuGet package version

Windows App SDK 1.5.0: 1.5.240227000

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

@Scottj1s
Copy link
Member

Scottj1s commented Mar 6, 2024

@DJRM2021 This is a known incompatibility between EntityFramework and WindowsAppSDK, both of which publish WebView2.Core.dll. There are several workarounds discussed here:
#1856

@DJRM2021
Copy link
Author

DJRM2021 commented Mar 7, 2024

Maybe we could make a configuration or option in the MSIX tooling to not include WebView2 if the app will not even use it?

@bpulliam
Copy link
Collaborator

Resolving this as a dup of #1856

@bpulliam bpulliam closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
@bpulliam bpulliam added the duplicate This issue or pull request already exists label Mar 14, 2024
@Scottj1s
Copy link
Member

Scottj1s commented Mar 19, 2024

Reopening, this for tracking WebView2 nuget reference factoring work. Retitled for clarity.

@Scottj1s Scottj1s reopened this Mar 19, 2024
@Scottj1s Scottj1s changed the title WindowsAppSDKSelfContained set to true Gives Build Error Build conflicts caused by standalone WebView2 and embedded WebView2 (in Windows App SDK) Mar 19, 2024
@Scottj1s Scottj1s removed the duplicate This issue or pull request already exists label Mar 19, 2024
@Scottj1s Scottj1s assigned DmitriyKomin and unassigned Scottj1s Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants