Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Compiler errors VS2012中错误的错误C2039,带有C++/CLI_Compiler Errors_Visual Studio 2012_C++ Cli - Fatal编程技术网

Compiler errors VS2012中错误的错误C2039,带有C++/CLI

Compiler errors VS2012中错误的错误C2039,带有C++/CLI,compiler-errors,visual-studio-2012,c++-cli,Compiler Errors,Visual Studio 2012,C++ Cli,我有一个使用C++/CLI的项目。然后我有一个事件处理程序,如下所示: void NotificationSystemEventHandler::NotificationServiceDetailViewRequested(System::Object^ sender, Notifications::NotificationViewer::DetailViewOpenRequestedEventArgs^ e) { try { switch (e->Type

我有一个使用C++/CLI的项目。然后我有一个事件处理程序,如下所示:

void NotificationSystemEventHandler::NotificationServiceDetailViewRequested(System::Object^ sender, Notifications::NotificationViewer::DetailViewOpenRequestedEventArgs^ e)
{
    try
    {
        switch (e->Type->ID)
        {
            (...)
DetailViewOpenRequestedEventArgs
有一个名为
Type
的属性,其类型为
DomainModel::CMN::NotificationType^

然后,
NotificationType
类有一个名为int类型ID的属性。当我访问该属性时,我会得到一个C2039,表示ID不是
NotificationType
的成员,而我可以在对象浏览器上看到该属性

唯一奇怪的是,Intellisense在尝试查找类型时出错,并表示该类型没有成员,但编译器似乎仍然可以正确解析该类型,但不能解析其成员

我在其他几个地方使用这个课程。如有需要,我可以提供更多信息/图片,以帮助澄清问题

以下是该问题的图像:

错误消息:

对象浏览器:

错误的弹出窗口:

删除所有引用并将其再次添加到项目中解决了问题

属性ID只是一个int。项目上的引用似乎有问题。“引用”对话框显示添加的一些引用(选中复选框),但它们不显示在解决方案资源管理器上项目的“引用”项中。。。。奇怪的