![](/img/trans.png)
[英]The Name 'My' does not exist in current context in Visual Studio 2013
[英]The name 'DependencyProperty' does not exist in the current context (Visual Studio)
我有以下几点:
using System.Windows;
public static object ConvertBack(string value, Type targetType)
{
...
return DependencyProperty.UnsetValue;
}
但是在我安装WindowsBase
包后,VisualStudio 没有找到DependencyProperty
。 我对C#
和 Visual Studio 相当陌生,我不明白为什么 Visual Studio 没有看到DependencyProperty
类。 在文档中,我可以清楚地看到它需要WindowsBase.dll
程序集,我有:
我还能缺少什么?
共有三种不同的目标框架:
- .NET Framework(1)
- .NET Core(2)
- .net Standart(3)
1 或 2 可能依赖于一个写在 3 上的项目,但 1 不能依赖于 2,反之亦然。 您的目标框架是.NET Core 3.1
并且您有一个与WindowsBase
相关的错误,该错误是在 NET Framework 上编写的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.