1

I have created a WPF C# project. IN which I am using CSharp dlls. This project has successfully built and also running fine.

I need to use the setup .exe of the project to direct run the application. Which I have created using a setup project. Setup project also created successfully.

When I installed this by setup.exe. This created the application exe. But when I run that .exe. Then it shows a dialog with the message "A problem caused the program to stop working correctly. Please close the program. "

With the option Close the program and Debug the program. When I click to Debug the program. This will show an exception("Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specific module could not be found") in the code line where I had initialized Cef setting.

Installed CefSharp Version: 57.0.0

Framwork version: .Net Framwork 4.5.2

2 Answers2

0

I have got the solution from this link: https://github.com/cefsharp/CefSharp/issues/1428

I see there are some file and dll are creating in bin/Debug folder when we build the project,In which we use CefSharp dlls.

But when we create the Setup project some files and dlls not added by default in setup project.

You can checkout the list of dlls are required for setup from this link --- https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution) In above link, Where Always required column have yes, those dlls and files are required in the setup project also. These all files and dlls you can find in your Project's Bin/Debug or Bin/Release folder.

How can you add these dll and files:

  1. Go to application folder of setup project.
  2. Right click/Add/Files.
  3. Browse files from your project Bin/Debug or Bin/Release folder.
  4. Add all files and dlls which have not added yet and required.
  5. You can see a locales folder are also required. So you need to crate a new folder in application folder of setup project with same name locales.
  6. Then right click on this . Add the files from project's Bin/Debug/locales folder in Setup project's Application/locales folder.
  7. Now Rebuild your application and try now.

I hope this will helpful for others. Happy coding!!

0

I managed to overcome this issue by installing the following redistributable: Microsoft Visual C++ Redistributable

DanielV
  • 101