C#POS-用于';Microsoft.PointOfService.Management.Explorer';抛出异常
这是密码C#POS-用于';Microsoft.PointOfService.Management.Explorer';抛出异常,c#,pos,C#,Pos,这是密码 private PosPrinter GetReceiptPrinter() { PosExplorer posExplorer = new PosExplorer(); DeviceInfo receiptPrinterDevice = posExplorer.GetDevice(DeviceType.PosPrinter, sPOSPrinterName); return (PosPrinter)posExplorer.CreateInstance(rec
private PosPrinter GetReceiptPrinter()
{
PosExplorer posExplorer = new PosExplorer();
DeviceInfo receiptPrinterDevice = posExplorer.GetDevice(DeviceType.PosPrinter, sPOSPrinterName);
return (PosPrinter)posExplorer.CreateInstance(receiptPrinterDevice);
}
PosExplorer posExplorer = new PosExplorer();
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true" />
</runtime>
System.TypeInitializationException未处理 HResult=-2146233036
Message=Microsoft.PointOfService.Management.Explorer的类型初始值设定项引发异常。
Source=Microsoft.PointOfService
TypeName=Microsoft.PointOfService.Management.Explorer
StackTrace:
位于Microsoft.PointOfService.Management.Explorer.CreateExplorer()
在Microsoft.PointOfService.PosExplorer.LoadExplorer()上 在Microsoft.PointOfService.PosExplorer.Initialize()上 在Microsoft.PointOfService.PosExplorer..ctor()上
您是否有可能告诉我们它引发的异常?:)也许你的框架版本太高了?您好,我的框架是:.NETFramework4OK,您已经给了我们一些堆栈跟踪以及它抛出异常的事实,但是我们仍然不知道它抛出了什么异常。请复制完整的错误消息。当“异常未处理”框出现时,单击“复制详细信息”。将这些信息粘贴到您的问题中。@john,我将添加此内部异常和其他详细信息,关于完整的错误消息,它只显示标题。