View Single Post
Old 11-02-2008   #3 (permalink)
WernerG


 
 

Re: Multi - targeting not working properly.

It makes sense to me that the language is compatible between the different
versions. However, what multi-targeting comes down to for me is the following:

A developer machine with .NET 3.5 installed being able to develop a .NET
program that would run on a OS with just .NET 3.0 installed.

For example:

I can compile and run WPF code simular to the following on a development
machine ( running .Net 3.5 ) set to target framework 3.0:

System.Windows.Controls.Button btn = new System.Windows.Controls.Button();
btn.Effect = null; // This should fail! Button.Effect does not exist in
framework 3.0

This code runs on the development machine.
This code does NOT run on a Machine with only .Net 3.0 installed. ( Or .net
3.0 SP1 for that matter, which should work according to the help file's
Framework supported list )

The issue is that the IDE must protect the developer against himself when
coding to a target framework lower than the maximum supported in his machine.
This does not happen which makes this targetting feature seem not very
usefull. I dont understand .NET well enough to understand why this is not
possible.

Does this make sense?

W










Dev

"Serge Baltic" wrote:
Quote:

> Hello,
>
Quote:

> > Once I deploy my application to a windows machine that only has .net
> > 3.0 on it, it would crash. Further investigation revield that
> > downgrading from 3.5 to 3.0 somehow does not prevent you from using
> > features only present in 3.5.
>
> Nearly the only difference between 3.0 and 3.5 targeting projects is a reference
> to the System.Core assembly (and a couple more, like MSBuild's, but that's
> a rarer case). That's the thing to check.
>
> C# language features do not depend on the target framework version and work
> for 2.0/3.0/3.5 just as good.
>
> (H) Serge
>
>
>
My System SpecsSystem Spec