C# 应用程序处于中断模式

C# Application is in break mode

我正在努力让我的应用程序退出中断模式,这是发生的事情:

这是我的代码,一切正常:

Engine btEngine = new Engine();
btEngine.Start();
LabelFormatDocument SerialPlate = btEngine.Documents.Open(@"C:\Afrisoft\Labels\ItemLabel_General.btw");
LabelFormatDocument BoxLabel = btEngine.Documents.Open(@"C:\Afrisoft\Labels\BoxLabel_General.btw");
SerialPlate.DatabaseConnections.QueryPrompts["JobNumber"].Value = textBox1.Text.Trim();
BoxLabel.DatabaseConnections.QueryPrompts["JobNumber"].Value = textBox1.Text.Trim();
Result SerialPlateResult = SerialPlate.Print();
Result BoxLabelResult = BoxLabel.Print();
btEngine.Stop();

然后我按照文档的建议将其更改为以下内容:

using (Engine btEngine = new Engine(true))
{
    LabelFormatDocument SerialPlate = btEngine.Documents.Open(@"C:\Afrisoft\Labels\ItemLabel_General.btw");
    LabelFormatDocument BoxLabel = btEngine.Documents.Open(@"C:\Afrisoft\Labels\BoxLabel_General.btw");
    SerialPlate.DatabaseConnections.QueryPrompts["JobNumber"].Value = textBox1.Text.Trim();
    BoxLabel.DatabaseConnections.QueryPrompts["JobNumber"].Value = textBox1.Text.Trim();
    Result SerialPlateResult = SerialPlate.Print();
    Result BoxLabelResult = BoxLabel.Print();

我在以下位置插入了一个断点:

using (Engine btEngine = new Engine(true))

然后,当我取消断点以测试该部分时,应用程序也会在该点崩溃。我重新添加了参考,将代码改回了它工作时的状态,但没有任何修复。

请帮忙。

看起来库坏了,重新安装它解决了问题