RE: .net framework version, visual studio '03



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/library/aa720684(VS.71).aspx


"jroozee@xxxxxxxxx" 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


.



Relevant Pages

  • Re: .Net Framework 2.0
    ... standalone application using a Config file works very well and that will ... may be other applications running in the host process so you couldn't just ... override the use of the .NET framework. ... > version of the CLR is loaded to work around the behavioral differences. ...
    (microsoft.public.dotnet.framework.clr)
  • RE: App.Config: using doctype and entity blocks
    ... Block Framework, ... Framework for the manipulation of the App.Config is included as part of the ... fuslogvw reports that the XML config file is not formatted correctly. ...
    (microsoft.public.dotnet.general)
  • Re: Latest patch parses 1.1 pages with 2.0
    ... It reports 1.1. ... The properties for the root site in the MMC plugin show the .Net version as ... Version Information: Microsoft .NET Framework Version:2.0.50727.832; ... Now I could fix the config file to run happily under 2.0, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Framework 1.0 application looking for 1.1 dll
    ... Dan ... assume installing v1.1 is not an option or some reason ... > used to build the application, provided that version of the Framework is ... Two create the correct app config file. ...
    (microsoft.public.dotnet.framework)
  • Re: VPN using IPSec over PPPoE
    ... >>config file for a recompile. ... What I was talking about was compiling in ... to become my own Certificate Authority, ... Now I have to go talk to the ISP. ...
    (comp.unix.bsd.freebsd.misc)