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

WPF,命名空间“Microsoft”中不存在类型或命名空间名称“Windows”(是否缺少程序集引用?),第1张

默认禅镇是引用这贺梁粗些命名空间,渣陵没有Thems那一项

using System

using System.Collections.Generic

using System.Linq

using System.Text

using System.Windows

using System.Windows.Controls

using System.Windows.Data

using System.Windows.Documents

using System.Windows.Input

using System.Windows.Media

using System.Windows.Media.Imaging

using System.Windows.Navigation

using System.Windows.Shapes

你的意思链卜是使用了toolkit的控此唤脊件出现这个错误提示吗?

最大可能是dll没引用到,试试在工具箱“选择项”,选择nuget添加到项目森渗中的dll文件,再在窗口使用控件试试,第一次使用手动从工具箱中拖出来

所有Visual Studio编译的程序,只要你用到了C Runtime库的函数,比如printf等最基本的标准函数,就会链接MSVCRxx.dll,仿孙里面的xx是你编译的Visual Studio的版本号。现在的问题就是你用的闷大团VS2010,很多计算机上没有这个DLL,即使你编译成Release版本(Debug版本需要更多的库支持),依然会出现运行不了的情况。解决办法是你可以静态链接这些库,这样蚂橘就不需要DLL支持,或者你让目标计算机安装Visual Studio 2010 Redistribute Package,这个包包含了VS2010编译出来的程序需要的库。

Redistribute Package的下载:http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12464558.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-25
下一篇 2023-05-25

发表评论

登录后才能评论

评论列表(0条)

保存