Search code examples
.net-corecefsharp

CefSharp.Core.Runtime.dll'. The specified module could not be found


Firstly, I have a bad English so I am sorry.

I develop net8.0-windows7.0 with WPF project. I didn't a problem in development environment (Visual Studio). But, I published the project. I can't open the project. The project trowed a exception.

Could not load file or assembly '[My Published Project Path]\runtimes\win-x64\lib\netcoreapp3.1\CefSharp.Core.Runtime.dll'. The specified module could not be found.

I checked location. This location have a CefSharp.Core.Runtime.dll


Solution

  • I used to Any CPU publish so I always catch a this problem. After, I changed publish command.It worked

    Added Property = p:RuntimeIdentifier=win-x64
    

    I used definitions. But, this definitions didn't solve my problem.

      <PropertyGroup>
            <CefSharpExcludeSubProcessExe>true</CefSharpExcludeSubProcessExe>
            <CefSharpBuildAction>Content</CefSharpBuildAction>
            <CefSharpAnyCpuSupport>true</CefSharpAnyCpuSupport>
      </PropertyGroup>