【发布时间】:2010-08-29 17:33:46
【问题描述】:
我正在使用 Visual Studio 2010 Express for C#,但在安装代码包时遇到问题。 我从 MSDN 下载了源代码,不知道如何处理它? 我打开了 WindowsAPICodePack.sln 并尝试构建项目并得到:
错误 16 找不到类型或命名空间名称“ContentPropertyAttribute”(您是否缺少 using 指令或程序集引用?) C:\Users\Joe\Downloads\WindowsAPICodePack\Shell\CommonFileDialogs\CommonFileDialogRadioButtonList.cs 13 6壳牌
和
错误 13 在命名空间“System.Windows.Markup”中找不到类型名称“IComponentConnector”。此类型已转发到程序集 'System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 考虑添加对该程序集的引用。 C:\Users\Joe\Downloads\WindowsAPICodePack\Shell\obj\Debug\Controls\CommandLinkWPF.g.cs 42 99 Shell
每次约 5-6 次。
我也尝试构建示例,但遇到了类似的错误。
如何将代码安装到 Visual Studio 中?
如何修复错误?
如何将代码包含到我的项目中?
我能否仅通过“使用”命令使库在我的项目中可用?
【问题讨论】:
-
我刚刚下载了这个并在 VS 2008 中编译它没有错误。在 VS 2010 中打开项目时,您是否收到任何错误/警告?看来转换过程可能有问题。
-
这是个好问题
标签: c# winapi compiler-errors