首页 文章

命名空间'Microsoft'中不存在类型或命名空间名称'PointOfService'(您是否缺少程序集引用?)

提问于
浏览
-1

我已经将Microsoft.PointOfService.dll添加到我的项目的引用中,VS甚至正确地解析了它的成员类,但是,当我尝试构建时,我得到了 Headers 错误:

命名空间“Microsoft”中不存在类型或命名空间名称“PointOfService”(您是否缺少程序集引用?)

我的代码如下:

using Microsoft;
using Microsoft.PointOfService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

    namespace oposfordotnet
    {
        public partial class Form1 : Form
        {
            PosExplorer explorer = new Microsoft.PointOfService.PosExplorer();
            CashDrawer drawer;
        }
    }

我以前从未见过这个 . 似乎dll没有正确编写以适应Microsoft命名空间?这甚至可能吗?

无论如何,我已经尝试删除引用并重新创建它并重新启动Visual Studio,但这些操作都没有奏效 .

有人可以建议修复吗?

1 回答

  • 0

    根据@StephenRoss对问题的评论,我更改了项目使用的.NET Framework版本,这解决了问题 .

相关问题