Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista Tutorial - Multi - targeting not working properly.

 
 
Old 10-28-2008   #1 (permalink)
WernerG
Guest


 
 

Multi - targeting not working properly.

Hello.

I recently started a WPF project in .NET 3.5. Since then I learned that the
target arhitecture does not support .NET 3.5, only .Net 3.0. I continued by
changing the target framework to .NET 3.0 in the project application
settings. Although all seemed fine on the development machine I since
realized that downgrading from .Net 3.5 to .NET 3.0 does nothing.

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.

Do I have it all wrong?

I would really like to know. This does not seem like something that is hard
to test so I am unsure as to why multi targeting is so hyped when it is
actually useless.



My System SpecsSystem Spec
Old 10-29-2008   #2 (permalink)
Serge Baltic
Guest


 
 

Re: Multi - targeting not working properly.

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
Old 11-02-2008   #3 (permalink)
WernerG
Guest


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Is this working properly? Vista networking & sharing
Please help! Multi-boot option not working anymore Vista installation & setup
keyboard not working properly Vista hardware & devices
Sidebar not working properly Vista General
DVD drive not working properly Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46