Running framework version 2.0 application on version 3.0/3.5

A

Ashutosh

Can anyone please tell me why it is not possible to run an application
developed in/on version 2.0 on version 3.0 or 3.5?
MSDN says "An application created with the .NET Framework version 2.0
can target only version 2.0."

I don't have much idea of framework 3.0 or 3.5 except that it contains
WPF/WCF...

Regards,
Ashutosh
 
A

Alex Meleta

Hi Ashutosh,

How did you check that is not possible? Because 3.x builds upon versions
2.0 and required 2.0 to be installed, so, after installing 3.* you have .net
2.0 installed too to run applications built for 2.0 platform.

Regards, Alex
blog:devkids.blogspot.com
 
J

Jialiang Ge [MSFT]

Hello Ashutosh,

I think the MSDN article you referred to might be:

How to: Use an Application Configuration File to Target a .NET Framework
Version
http://msdn.microsoft.com/en-us/library/9w519wzk.aspx

The article discusses the .NET runtime version: <supportedRuntime>. Because
..NET Framework 3.0 and 3.5 uses the same runtime as .NET 2.0, an
application created with the .NET Framework version 2.0 can still work on
the computers with .NET Framework 3.0 or 3.5.

For more information about the relationship between .NET Framework versions
2.0, 3.0, and 3.5, you may want to read the MSDN article:
http://msdn.microsoft.com/en-us/library/bb822049.aspx
<quote>
The relationship of the .NET Framework versions 2.0, 3.0, and 3.5 differs
from the relationship of versions 1.0, 1.1, and 2.0. The .NET Framework
versions 1.0, 1.1, and 2.0 are completely separate from each other, and one
version can be present on a computer regardless of whether the other
versions are present. When versions 1.0, 1.1, and 2.0 are on the same
computer, each version has its own common language runtime, class
libraries, compiler, and so forth. Application developers can choose which
version to target.
</quote>

An article that describes the new features of .NET 3.5 in detail is at:
What's New in the .NET Framework Version 3.5
http://msdn.microsoft.com/en-us/library/bb332048.aspx
Apart from WPF/WCF, .NET 3.0/3.5 also introduces a large number of classes
(like the System.Addin namespace), the new data access model LINQ, and so
on.

If you have any other questions or want more resources of .NET 3.0/3.5,
please DON'T hesitate to tell me.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Ashutosh

Hi Jialiang/Alex
Thanks for the comments. I got my answer.

I had an application developed on 2.0 and was trying to force 3.0 or 3.5
because of an issue. I had done similar thing for 1.0/1.1 application
without any problems.

But I still want to know, why I get an error when launching an
application on a system on which 1.1, 2.0, 3.0, 3.5 all are installed,
and in the application configuration file I set the version to 3.0 or
3.5 for an application developed using 2.0. It should still run and use
the appropriate version.

Regards,
Ashutosh
 
M

Marc Gravell

The distinction between 2.0, 3.0 and 3.5 is largely artificial; give or
take a service-pack, .NET 3.5 is just ".NET 2.0 with a few extra dlls
that you may or may not be using".

What mainly matters is the CLR version, and all of the above use v2 of
the CLR. In short, I wouldn't bother with that version tag... I'm not
sure it is doing quite what you expect.

Marc
 
J

Jialiang Ge [MSFT]

Hello Ashutosh,

As far as I know, the highest runtime version at this moment (before the
next runtime is released) is v2.0.50727. .NET 3.0 and 3.5 also uses
v2.0.50727 runtime. In other words, we cannot input the version value in
<supportedRuntime /> as v3.0 or v3.5 because these versions of runtime do
not exist. If I remember it rightly, the currently supported version values
in <supportedRuntime /> are:

v1.0.3705
v1.1.4322
v2.0.50727

You mentioned that you had an application developed on 2.0 and was trying
to force 3.0 or 3.5 because of an issue. Would you mind telling us the
reason for forcing 3.0 and 3.5? I have a suggestion if your intention is to
make sure that the app is run on machines with .NET 3.0 or 3.5:

In the startup code the application, we manually check whether .NET 3.0 or
3.5 is installed:
http://www.walkernews.net/2008/05/16/how-to-check-net-framework-version-inst
alled/

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
A

Ashutosh

Thanks for the information.
The system has just v 2.0 with SP1 as the runtime.

I have a GUI application which has a textbox as a password field. When I
run the application the passwords are not shown using the password
character I have set (I used x). If you try to copy the text from the
textbox, it doesn't allow you.

The same application works fine on other system.

Regards,
Ashutosh
 
J

Jialiang Ge [MSFT]

Hello Ashutosh,

I just built up a system with .NET 2.0 SP1 (without .NET 3.0 or higher),
and tested a simple winform project in it. The windows form has a TextBox
whose "PasswordChar" property is set to 'x'. The app runs well in the test
machine:

1. when I input characters into the textbox, the textbox shows 'x'
2. when I want to copy the content from the textbox, the textbox shows 'Not
Allowed' tip. (this also applies to winform in other .NET platforms)

Ashutosh, you mentioned that "the passwords are not shown using the
password character I have set", would you let me know what it shows in the
textbox? To be honest, I don't think the symptom is caused by the fact that
we do not have .NET Framework 3.0/3.5 installed. This might be a winform
issue. I'm not an expert on winform, but you may consider posting it to the
microsoft.public.dotnet.framework.windowsforms newsgroup. My colleagues
focusing on winform will help you with it.

If you have any other questions about .NET 2.0/3.0/3.5 runtime, please
DON'T hesitate to tell me.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
A

Ashutosh

Agreed that it has nothing to do with 3.0 or 3.5. But something is
definitely wrong.
Thanks for trying this out.

I see the actual characters in the textbox. I am facing this only on one
particular system. So, not sure if it is a localized problem or a
framework issue.
 
J

Jialiang Ge [MSFT]

Hello Ashutosh,

I know about some tools that can reveal the password in password textboxes.
For instance, "Asterisk Logger" by NirSoft:

http://www.nirsoft.net/utils/astlog.html

When this app is started, all the normal password textboxes will reveal the
actual characters in the box.

Asterisk Logger is a useful utility. It's not a spyware. However, Ashutosh,
you may want to check whether there are any spyware/virus programs with the
similar function in that particular machine. Hope it's a useful clue for
you to find out the cause.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
A

Ashutosh

Hi Jialiang,
Thanks for your prompt reply.
I am aware of those kinds of spy wares/virus. There is no possibility of
it being there on any of the systems. Today I happened to test the same
application on one more system. That system has just the framework 2.0
installed, no SP. Even on that system, it shows the password characters.

Regards,
Ashutosh
 
J

Jialiang Ge [MSFT]

Hello Ashutosh,

I sent an email to your mailbox yesterday. I'm not sure that you received
it. In the email, I attached a simple winform project with one textbox
control whose PasswordChar property = 'x'. You may want to test it in the
computers with the problem, so that we can determine whether it's a computer
level issue or an application specific problem.

By the way, I will go to Singapore to take a training next week. I won't be
available for the whole week. Because this textbox issue is more proper to
be handled in a winform newsgroup, I suggest that you re-post it to the
microsoft.public.dotnet.framework.windowsforms. My colleagues focusing on
winform support will continue to help you with it.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 

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