Skip to content

Getting "MSB3030 Could not copy the file ..winuiex\2.4.1\lib\net6.0-windows10.0.19041\WinUIEx\runtimes\win-x64\native\WebView2Loader.dll" because it was not found. #188

@MagnusJohansson

Description

@MagnusJohansson

After adding WinUIEx to an OOB WinUI3 app template project, I get:

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error (active)	MSB3030	Could not copy the file "E:\packages\NuGet\cache\winuiex\2.4.1\lib\net6.0-windows10.0.19041\WinUIEx\runtimes\win-arm64\native\WebView2Loader.dll" because it was not found.	App1WithWinUIEx	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets	5321		
image

Reproducible projects:

  1. Project straight from VS Template:
    https://github.com/MagnusJohansson/App1WithWinUIEx

Which gives me:

This version of the Windows App SDK requires Microsoft.Windows.SDK.NET.Ref 10.0.19041.38 or later.
    Please update to .NET SDK 6.0.134, 6.0.426, 8.0.109, 8.0.305 or 8.0.402 (or later).
    Or add a temporary Microsoft.Windows.SDK.NET.Ref reference which can be added with:
        <PropertyGroup>
            <WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
        </PropertyGroup>
image
  1. Project after adding the WindowsSdkPackageVersion:
    https://github.com/MagnusJohansson/App1WithWinUIEx/tree/feature/amend-appsdk-requirements

All good.

  1. Adding the latest WinUIEx Nuget package:
    https://github.com/MagnusJohansson/App1WithWinUIEx/tree/add-winuiex

I now get the "WebView2Loader.dll" error as stated at the top.
image

Of course, if I clone this WinUIEx repo and build, everything works, because then I have those runtime dependencies:
image

But I don't have them in my NuGet cache:
image

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions