, который добавил элемент в мой.
Код: Выделить всё
WinExe
netcoreapp3.0
true
< /code>
Далее я изменил свой файл XAML, чтобы выглядеть так: < /p>
Код: Выделить всё
namespace csharp {
public partial class App : Application {
public App() {
var settings = new CefSettings() { // Line 12
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
};
settings.CefCommandLineArgs.Add("enable-media-stream");
settings.CefCommandLineArgs.Add("use-fake-ui-for-media-stream");
settings.CefCommandLineArgs.Add("enable-usermedia-screen-capturing");
var dependencyCheck = true;
Cef.Initialize(settings, performDependencyCheck: dependencyCheck, browserProcessHandler: null);
}
}
}
< /code>
Когда я запускаю приложение, я получаю следующую ошибку: < /p>
Exception has occurred: CLR/System.BadImageFormatException
An unhandled exception of type 'System.BadImageFormatException' occurred in CefSharp.Wpf.dll: 'Could not load file or assembly 'CefSharp.Core.Runtime, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138'. An attempt was made to load a program with an incorrect format.'
at CefSharp.CefSettingsBase..ctor()
at CefSharp.Wpf.CefSettings..ctor()
at csharp.App..ctor() in App.xaml.cs:line 12
at csharp.App.Main()
Подробнее здесь: https://stackoverflow.com/questions/662 ... re-runtime