开发者

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

开发者 https://www.devze.com 2023-03-15 14:45 出处:网络
I created a new WPF application with target framework as .NET Framework 3.0. I developed WPF windows some of which used DropShadowBitMapEffect for Border tag:

I created a new WPF application with target framework as .NET Framework 3.0. I developed WPF windows some of which used DropShadowBitMapEffect for Border tag:

<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. When I deploy it to a new system, I get the following XAML parse exception:

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. 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. If its the case开发者_Python百科, shouldn't my Application run on any system with .NET framework 3.0 installed? 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

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


Effect and the DropShadowEffect was added in WPF 3.5

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号