VS 2005 Trial Hello World

  • Thread starter J André Labuschagné
  • Start date
J

J André Labuschagné

Hi Peter

Thanks for that. I could not find any trget setting for .NET version. How
do you configure a specific assembly version requirement? How do I know
which version the IDE or program is actually using? Or am I way off the
mark here?

Cheers
Andre
 
P

Peter Duniho

J said:
Hi Peter

Thanks for that. I could not find any trget setting for .NET version.
How do you configure a specific assembly version requirement? How do I
know which version the IDE or program is actually using? Or am I way
off the mark here?

I doubt for your purposes you need to specify a specific .NET version.
However, if you wanted to do it in VS2005, you would select the specific
assembly in the References section of the project, right-click and
choose the Properties menu item (if the property inspector is not
already open), and then in the property inspector, set the version
number and the "exact version" setting to "true" (I forget the exact
name of the property, but it's something obvious like that).

Note that between .NET 2.0 and .NET 3.5 there's not really any
significant difference between the versions. Most of the assemblies are
actually unchanged, and for those that have changed, the changes are
mainly bug fixes. Usually people target a specific version if they
require v1.1, as it's the changeover from 1.1 to 2.0 that had a number
of "breaking changes" (that is, changes in .NET that would cause code
that used to work in 1.1 to no longer work in 2.0).

Since then, .NET has been good about being backward compatible from
version to version (for assemblies that have changed at all…obviously
for those that haven't, backward compatibility is trivial :) ).

Pete
 
P

Peter Duniho

J said:
Hi Chris

Just noticed that I have 1 and 2 installed as well. At this juncture I
have no idea which version VS2005 is referencing. How can I tell? I
just asssumed that it was using 3.51. Where do I explicitly instruct
the IDE or the code?

If you haven't restricted your references to a specific version, the
most recent version is being used.

With one exception: if you happen to be writing a library assembly that
is used by some _other_ assembly, and that other assembly requires .NET
1.1, then your assembly will wind up executing in the .NET 1.1 context
(assuming it can…if it can't – e.g. it has a dependency on a library
that requires a later version – then it will simply fail).

My understanding is that .NET 4.0 (in beta now) will have more robust
support for mixing .NET versions in the same process, and so perhaps the
versioning issues will be different. But I don't know the specifics at
the moment.

The bottom line: as long as you don't do something explicit to create a
dependency on a specific version, it should just work.

Pete
 
J

J André Labuschagné

Hi Peter

I was thinking the exact same thing. It is making a lot more sense to me
now. Thanks.

Cheers
Andre
 
J

J André Labuschagné

Hi Peter

You have been so helpful. It all makes sense to me. Thank you for your
input.

Cheers
Andre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top