文章目录
- 总结
- CS0246
- System.Runtime.InteropServices.COMException
- 参考
总结
在使用Brotherb-pac SDK在VS C#中碰到几个问题,并解决。
CS0246
将代码转移到新环境中编译,报CS0246错。原因是Brotherb-pac SDK没有安装,进行安装,问题解决。
System.Runtime.InteropServices.COMException
bpac.Document doc = new bpac.Document();
抛异常。
由于我下载的Brotherb-pac SDK是X64版本的,需要在工程属性设置中设置目标环境为X64运行环境。问题解决。
参考
Why am I getting error CS0246: The type or namespace name could not be found?b-PAC DownloadLabel printing development using b-pac SDK in a C# applicationHow to develop a custom b-Pac SDK | Brother QL Label Printers