c# - 任何帮助!错误系统 IO 文件未找到异常
问题描述
当我运行这个程序时,我已经修复了这个错误。任何帮助!
错误 System.IO.FileNotFoundException:'无法加载文件或程序集'System.Configuration.ConfigurationManager,版本 = 4.0.3.0,文化 = 中性,PublicKeyToken = cc7b13ffcd2ddd51'。该系统找不到指定的文件。'
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Bluetooth bluetooth = new Bluetooth();
bluetooth.startScan();
}
class Bluetooth
{
Guid mUUID = new Guid("00001101-0000-1000-8000-00805F9B34FB");
List<string> items = new List<string>();
BluetoothDeviceInfo[] devices;
public void startScan()
{
Thread bluetoothScanThread = new Thread(new ThreadStart(scan));
bluetoothScanThread.Start();
}
public void scan()
{
Console.WriteLine("Start scanning...");
BluetoothClient client = new BluetoothClient();
devices = client.DiscoverDevicesInRange();
Console.WriteLine(devices.Length.ToString() + " devices discovered");
Console.WriteLine("Scan complete");
}
}
解决方案
You might be missing the dll. Try installing this from Nuget
System.Configuration.ConfigurationManager
推荐阅读
- python - Pandas csv 读取:dtype int 太大而无法转换为 C long
- javascript - 在 React 中返回 array.map() 的最佳方式?
- javascript - React JSX 按钮的动态定位
- pentaho - Pentaho OLAP 限制
- c - 尝试将两个维度为 1000*1000 的大矩阵相乘会导致分割错误
- c# - 当 1 个更改时更新 2 个用户模型列表
- angular - 无法解析 DataService Angular 的所有参数
- git - Git子模块添加错误
- php - 在树枝模板 symfony 3 中显示流式响应
- wso2 - 与使用连接操作的 siddhi 查询的完全分布式部署相关的问题