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

.net framework version, visual studio '03

P: n/a
I am developing in VS '03. I have all of the current framework
versions installed on my PC, 1.1, 2.0, and 3.0.

How can I make sure the code I am developing in is using the 3.0
framework version? Or do I need to be using the latest version of
Visual Studio to do so?
Thanks,

Jason

Sep 28 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You can use a config file to direct the runtime to use a particular version
of the framework.

The config file must be named the same as the dll or the exe, but with
..config at the end...
MyApp.exe.config
MyAppLib.dll.config

You can write the config file, if it does not already exist, in notepad, and
add it to the project.

Here is an example of a config file

<?xml version ="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>

Just name the file as stated above, and use one of these files for each
project in the solution. Also...get the exact version number for 3.0 and
insert it in place of version="v1.1.4322" as shown above.

Caution: AT DESIGN TIME, when attempting to use a later version of the
framework using an older version of VB.net, your design-time views of forms
may not be available. To alleviate this, use the compatible framework that
your design environment was intended for. When you compile for runtime, you
can switch out the referenced assemblies and add the config file. (Actually,
I think you only have to switch one reference for each project, and the rest
happen automatically.)

This is a tricky proposition, because you are actually writing code as
though it will be compiled against the expected framework. I would only
suggest doing this if you have a distinct reason for doing so.

Recently, I needed the System.Net.Mail namespace instead of the
System.Web.Mail namespace due to an additional method that I needed. Except
when I was testing for that method, I still was running the compatible
framework. When compiling the release, I did the switch. (You need to be
sure the config file is properly directed, or only present when compiling to
the "mis-matched" framework).

You should do serious beta testing for compatibility issues.

By default, I think that the compiled exe and dll's, whatever framework they
are compiled to run under, will find the closest framework available on the
system they are running on (unless the config file provides distinct
direction).

http://msdn2.microsoft.com/en-us/lib...84(VS.71).aspx
"jr*****@gmail.com" wrote:
I am developing in VS '03. I have all of the current framework
versions installed on my PC, 1.1, 2.0, and 3.0.

How can I make sure the code I am developing in is using the 3.0
framework version? Or do I need to be using the latest version of
Visual Studio to do so?
Thanks,

Jason

Sep 28 '07 #2

P: n/a
j,

Version 2003 is made for Net 1.1 you cannot make programs for higher Net
versions with that.

Cor

Sep 28 '07 #3

P: n/a
>you cannot make programs for higher Net versions with that.

Well actually you can , i have once tested a 1.1 app on a 2.0 framework (
clean pc with only framework 2.0 installed ) and to my own surprise it
worked without anny noticable problems.

So i guess the.Net framework is backwards compatible to some point

HTH

Michel

"Cor Ligthert[MVP]" <1n*************@planet.nlschreef in bericht
news:DB**********************************@microsof t.com...
j,

Version 2003 is made for Net 1.1 you cannot make programs for higher Net
versions with that.

Cor

Sep 28 '07 #4

P: n/a
Michel,

In my idea that was always written that it was the goal. However as we can
see by all the post about this, I have not much believe in it.

Cor

Sep 28 '07 #5

P: n/a
"Michel Posseth [MCP]" <MS**@posseth.comschrieb:
you cannot make programs for higher Net versions with that.

Well actually you can , i have once tested a 1.1 app on a 2.0 framework
( clean pc with only framework 2.0 installed ) and to my own surprise it
worked without anny noticable problems.

So i guess the.Net framework is backwards compatible to some point
That's true (there are some cases in which it won't work though).
Nevertheless, VS.NET 2003 will create .NET 1.1 assemblies and cannot be
altered to create .NET 2.0 assemblies.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Sep 28 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.