【发布时间】:2014-10-05 23:15:19
【问题描述】:
我正在尝试在 Visual Studio 2013 .net 4.5 中使用“System.Windows.Controls.GridViewColumn”,但收到此错误:
找不到类型“GridViewColumn”。确认您不是 缺少程序集引用并且所有引用的程序集都有 已建成。
查看我的参考管理器,我在“程序集”选项卡下有此消息:
所有框架程序集都已被引用。请使用 对象浏览器来探索框架中的引用。
浏览时找不到“PresentationFramework.dll”。 这是该课程的 MSDN:http://msdn.microsoft.com/en-us/library/system.windows.controls.gridviewcolumn(v=vs.110).aspx
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
我尝试添加using System.Windows.Controls.GridViewColumn,但收到此错误:
命名空间中不存在类型或命名空间名称
ControlsSystem.Windows(您是否缺少程序集引用?)
编辑:
对于WhyCry,当我按照您的建议进行搜索时,我仍然没有得到任何结果。
也许我需要使用不同的 GridView?也许Windows.UI.Xaml.Controls?
【问题讨论】:
-
尝试仅添加:使用 System.Windows.Controls 然后转到您的引用,右键单击并添加引用,在程序集中搜索 System.Windows.Controls 并以这种方式添加。
-
如果你重建解决方案或退出并重新打开VS怎么办?我知道这些不是最好的解决方案,但有时我发现这样的事情似乎会发生。
-
你的项目是 WPF 项目吗?
-
我按照您的建议在参考管理器中搜索了 System.Windows.Controls,但它显示“未找到任何项目。”
-
我正在输入答案,找到了方法。
标签: c# visual-studio-2013 .net-4.5 assembly-references