[英]C# Visual Studio System.Windows.Media does not exist in Program Files (x86)\Referenced Assemblies
I couldn't see System.Windows.Media in the list of references, so I followed the advice in previous questions about adding PresentationCore.dll. 我在引用列表中看不到System.Windows.Media,因此我按照之前有关添加PresentationCore.dll的问题中的建议进行操作。 When that didn't resolve my problem, I searched Program Files (x86)\\Referenced Assemblies\\Microsoft, and as far as I can tell, there are no files named System.Windows.Media on my computer in any location, whatsoever. 如果这样做不能解决问题,则搜索程序文件(x86)\\参考程序集\\ Microsoft,据我所知,我的计算机上任何位置都没有名为System.Windows.Media的文件。 What should I do? 我该怎么办?
System.windows.media is not a reference however it's a namespace and must be used as one, this namespace lives in either PresentationFramework.dll or PresentationCore.dll depending if you are using Windows forms or WPF System.windows.media不是引用,但是它是一个名称空间,必须作为一个名称空间使用,该名称空间位于PresentationFramework.dll或PresentationCore.dll中,具体取决于您使用的是Windows窗体还是WPF
Try adding either one of the .dll files and then add "using system.windows.media" 尝试添加任何一个.dll文件,然后添加“ using system.windows.media”
PS path for presentationcore.dll is c:/Windows/Microsoft.NET/Framework64/v4.0.30319/WPF/PresentationCore.dll Presentationcore.dll的PS路径为c:/Windows/Microsoft.NET/Framework64/v4.0.30319/WPF/PresentationCore.dll
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.