简体   繁体   English

WPF应用程序部署XAML分析错误-.NET Framework版本问题

[英]WPF Application deployment XAML parsing errors - .NET Framework version issue

I created a new WPF application with target framework as .NET Framework 3.0. 我创建了一个新的WPF应用程序,目标框架为.NET Framework 3.0。 I developed WPF windows some of which used DropShadowBitMapEffect for Border tag: 我开发了WPF窗口,其中一些将DropShadowBitMapEffect用于Border标签:

<Border CornerRadius="20" BorderThickness="1" BorderBrush="#FFABE3E4" Background="#FFE6F7FF">
     <Border.Effect>
        <DropShadowEffect Color="Gray" ShadowDepth="2" Direction="320" />
     </Border.Effect>
</Border>

The development environment had .NET framework versions 4.0, 3.5 SP1, 3.0 and 2.0 installed and everything worked fine. 开发环境安装了.NET Framework版本4.0、3.5 SP1、3.0和2.0,并且一切正常。 When I deploy it to a new system, I get the following XAML parse exception: 将其部署到新系统时,会出现以下XAML分析异常:

System.Windows.Markup.XamlParseException: Cannot find DependencyProperty or PropertyInfo for property named 'Effect'. Property names are case sensitive.  Error at object 'System.Windows.Controls.Border' in markup file ...

The deployment system contains .NET Framework 2.0, 3.0 and 3.5 (no service packs for 3.5) on Windows XP. 在Windows XP上,部署系统包含.NET Framework 2.0、3.0和3.5(没有适用于3.5的服务包)。 Now, is this expected? 现在,这是预期的吗? I chose the target framework as 3.0 right from the start and I was always able to compile the application. 我从一开始就选择目标框架为3.0,并且我始终能够编译该应用程序。 If its the case, shouldn't my Application run on any system with .NET framework 3.0 installed? 如果是这样,我的应用程序是否不应在安装了.NET Framework 3.0的任何系统上运行? Why is it giving a parse exception in this case? 为什么在这种情况下会给出解析异常?

Any help/pointers would be appreciated. 任何帮助/指针将不胜感激。

Links already referenced (the references are all for .NET framework 3.5. I am looking for something specific to 3.0): http://blogs.msdn.com/b/xwebsupport/archive/2010/01/06/cannot-find-dependencyproperty-or-propertyinfo-property-error-during-xweb3-setup.aspx 已引用的链接(所有引用均适用于.NET Framework 3.5。我正在寻找3.0特有的内容): http : //blogs.msdn.com/b/xwebsupport/archive/2010/01/06/cannot-find- xweb3-setup.aspx中的依赖项属性或属性信息属性错误

http://connect.microsoft.com/VisualStudio/feedback/details/535637/net-3-5-sp1-not-working-on-vista-enterprise-cannot-find-dependencyproperty-or-propertyinfo-for-property-named-effect http://connect.microsoft.com/VisualStudio/feedback/details/535637/net-3-5-sp1-not-working-on-vista-enterprise-cannot-find-dependencyproperty-or-propertyinfo-for-property-命名效应

效果和DropShadowEffect已在WPF 3.5中添加

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM