c# - 将文件移动到另一个文件夹但被视为丢失
问题描述
我似乎在移动一些文件夹和文件时遇到问题,我正在使用cefSharp
库,我最初使用的是PrettyBin
from nugent,这对其他 .dll 文件做得很好,我想我也会将 cef 文件移动到lib
文件夹中,只是为了保持一切。
我做了什么:
程序.cs
using CefSharp;
using System;
using System.IO;
using System.Windows.Forms;
namespace rankjester
{
internal static class Program
{
private static string lib, browser, locales, res;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main()
{
lib = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"lib\cef\libcef.dll");
browser = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"lib\cef\CefSharp.BrowserSubprocess.exe");
locales = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"lib\cef\locales\");
res = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"lib\cef\");
var libraryLoader = new CefLibraryHandle(lib);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormMain());
}
}
}
lib
路径都很好并且匹配,但是当我运行软件时,我得到:
System.IO.FileNotFoundException: 'Could not load file or assembly 'CefSharp, Version=86.0.241.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.'
如果我将这些行注释掉,然后按应有的方式加载,我有什么遗漏的吗?
我还注意到每次运行调试时cefSharp
都会创建x86
和文件夹,有没有办法可以关闭它?x64
任何帮助,将不胜感激。
解决方案
推荐阅读
- merge - 在mercurial中合并来自合并子存储库的多个分支的历史记录
- c# - .NET 可视化代码(两个硬盘)
- doctrine-orm - 每次测试后 Nuke/Delete/Truncate 数据库条目,而不使用数据夹具
- kubernetes - 使用外部 Nginx 负载均衡器或 F5 负载均衡器的 Kubernetes HA 设置用户“system:anonymous”无法在集群范围内创建节点
- python - 从文件中读取数据并使用 python 中的 anytree 创建树
- python - HTML Select - 稍后在 HTML 中使用当前选择值,与 Flask
- python - Python中空列表中的常用词
- javascript - Jmeter用双引号发送Cookie
- vba - workbooks.open 拉错文件
- python-3.x - Python生成带有条件的元组组合