var settings = new CefSettings();
// Initialize cef with the provided settings
settings.CachePath = "C:/Users/Anoni/Source/Repos/WindowsFormsApp1/bin/Debug/Cache";
Cef.Initialize(settings);
// Create a browser component
chromeBrowser = new ChromiumWebBrowser("https://www.reddit.com/r/Turkishleft/");
// Add it to the form and fill it to the form window.
this.Controls.Add(chromeBrowser);
chromeBrowser.Dock = DockStyle.Fill;
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
settings.RemoteDebuggingPort = 8088;
这些是我的CefSharp设置。如您所见,CefSharp将缓存存储在CefSharp中。但是我想让它存储应用程序从哪里开始的缓存。例如,如果应用程序从"D:/“开始,我希望它将缓存保存在"D:/ cache”中。我怎样才能做到这一点?
发布于 2020-10-17 13:05:18
找到了。代码行应该是
settings.CachePath = Application.StartupPath + "/Cache";
https://stackoverflow.com/questions/64402719
复制相似问题