By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,609 Members | 1,565 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,609 IT Pros & Developers. It's quick & easy.

Why does a service pack that targets VS2008 and .NET 3.5 is cause a compilation error in a VS2005 build that targets .NET 3.0?

P: n/a
Hi,

After installing SP1 for VS2008 and SP1 for .NET 3.5 we get the following
warning in a VS2005 build:

error CS0618: Warning as Error: 'System.Windows.UIElement.BitmapEffect' is
obsolete: 'Avoid using BitmapEffects as they have very poor performance
characteristics. They will be deprecated in a future version. Consider
using the UIElement.Effect property and ShaderEffects where appropriate
instead.'

We do not get this error with VS2008 and .NET installed without SP1.

Why does a service pack that targets VS2008 and .NET 3.5 is cause a
compilation warning in a VS2005 build that targets .NET 3.0?
Nov 5 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
.. wrote:
After installing SP1 for VS2008 and SP1 for .NET 3.5 we get the following
warning in a VS2005 build:

error CS0618: Warning as Error: 'System.Windows.UIElement.BitmapEffect' is
obsolete: 'Avoid using BitmapEffects as they have very poor performance
characteristics. They will be deprecated in a future version. Consider
using the UIElement.Effect property and ShaderEffects where appropriate
instead.'

We do not get this error with VS2008 and .NET installed without SP1.

Why does a service pack that targets VS2008 and .NET 3.5 is cause a
compilation warning in a VS2005 build that targets .NET 3.0?
Because the .NET 2.0, 3.0 and 3.5 framework all share the 2.0 runtime and
the 2.0 framework library. The VS2008 service pack only targets VS, but .NET
3.5 SP1 (which has to be installed with it) upgrades the common 2.0 runtime
to 2.0 SP2. The ObsoleteAttribute is part of the class' metadata and will
affect compilers regardless of their version or target settings.

This shared base is how VS2008 can easily target different versions in the
first place (and also why you can actually write .NET 3.0 and 3.5
applications using VS2005, as long as you only use the new classes and not
the new language features).

As to the actual problem, you have two obvious solutions: either take the
deprecation warning to heart and rewrite your code (obviously the best
solution, but it may not be feasible) or exclude the warning for now. You
can selectively disable warnings at specific locations in your code by using
"#pragma warning" (excluding all obsolescence warnings globally is another
option, but is obviously risky if other classes are obsoleted after you do
this).

--
J.
Nov 5 '08 #2

P: n/a
Thanks Jeroen - It seems that in this case the PresentationCore assembly was
modified.

"Jeroen Mostert" <jm******@xs4all.nlwrote in message
news:49*********************@news.xs4all.nl...
>. wrote:
>After installing SP1 for VS2008 and SP1 for .NET 3.5 we get the following
warning in a VS2005 build:

error CS0618: Warning as Error: 'System.Windows.UIElement.BitmapEffect'
is obsolete: 'Avoid using BitmapEffects as they have very poor
performance characteristics. They will be deprecated in a future
version. Consider using the UIElement.Effect property and ShaderEffects
where appropriate instead.'

We do not get this error with VS2008 and .NET installed without SP1.

Why does a service pack that targets VS2008 and .NET 3.5 is cause a
compilation warning in a VS2005 build that targets .NET 3.0?
Because the .NET 2.0, 3.0 and 3.5 framework all share the 2.0 runtime and
the 2.0 framework library. The VS2008 service pack only targets VS, but
.NET 3.5 SP1 (which has to be installed with it) upgrades the common 2.0
runtime to 2.0 SP2. The ObsoleteAttribute is part of the class' metadata
and will affect compilers regardless of their version or target settings.

This shared base is how VS2008 can easily target different versions in the
first place (and also why you can actually write .NET 3.0 and 3.5
applications using VS2005, as long as you only use the new classes and not
the new language features).

As to the actual problem, you have two obvious solutions: either take the
deprecation warning to heart and rewrite your code (obviously the best
solution, but it may not be feasible) or exclude the warning for now. You
can selectively disable warnings at specific locations in your code by
using "#pragma warning" (excluding all obsolescence warnings globally is
another option, but is obviously risky if other classes are obsoleted
after you do this).

--
J.

Nov 5 '08 #3

P: n/a
More is heading ot the core. You can potentially see more of this. it is
also the reason .NET 4.0 will be a new framework rather than a bolt on (like
3.x).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
<.wrote in message news:ec*************@TK2MSFTNGP06.phx.gbl...
Hi,

After installing SP1 for VS2008 and SP1 for .NET 3.5 we get the following
warning in a VS2005 build:

error CS0618: Warning as Error: 'System.Windows.UIElement.BitmapEffect' is
obsolete: 'Avoid using BitmapEffects as they have very poor performance
characteristics. They will be deprecated in a future version. Consider
using the UIElement.Effect property and ShaderEffects where appropriate
instead.'

We do not get this error with VS2008 and .NET installed without SP1.

Why does a service pack that targets VS2008 and .NET 3.5 is cause a
compilation warning in a VS2005 build that targets .NET 3.0?
Nov 6 '08 #4

P: n/a
Thanks for the heads up Cowboy. I'll pass it along to the watchers.

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:OF**************@TK2MSFTNGP03.phx.gbl...
More is heading ot the core. You can potentially see more of this. it is
also the reason .NET 4.0 will be a new framework rather than a bolt on
(like 3.x).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
<.wrote in message news:ec*************@TK2MSFTNGP06.phx.gbl...
>Hi,

After installing SP1 for VS2008 and SP1 for .NET 3.5 we get the following
warning in a VS2005 build:

error CS0618: Warning as Error: 'System.Windows.UIElement.BitmapEffect'
is obsolete: 'Avoid using BitmapEffects as they have very poor
performance characteristics. They will be deprecated in a future
version. Consider using the UIElement.Effect property and ShaderEffects
where appropriate instead.'

We do not get this error with VS2008 and .NET installed without SP1.

Why does a service pack that targets VS2008 and .NET 3.5 is cause a
compilation warning in a VS2005 build that targets .NET 3.0?

Nov 6 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.