VS2003 - VS2005

H

Harry V

I wrote a C# Windows app using VS2003 to read selected text files and write
the data to 3 tables in an Access database. After "upgrading" to VS2005, I
tried to add a feature and rebuild - what a can of worms.

At this point, the solution builds and runs, but if I open or restore
another window, program or application, the app will go to a "Not Responding"
status. Sometimes, it writes records, sometimes it doesn't. I'm really
not sure what the problem might be, as a lot of the events and methods have
changed.

Do I "downgrade" back to VS2003, try to work through the myriad of changes
in VS2005 or dig a deeper hole with VS2008? Any insight to the changes
between 2003 and 2005?
 
E

Edwin van Holland

Harry,

The version of visual studio you need depends on the .NET framework
functions you are using. As u created the basics in VS2003 u most likely
used .NET 1.1.

VS 2005 has support for .NET 2.0 and some support for 1.1 while VS2008
has support for 3.5/3.0/2.0 but without special plugins no support for v1.1.

U might want to check if the functions u've used in your program are
still in use in the current .NET package or replaced by others
 
K

KWienhold

Harry,

The version of visual studio you need depends on the .NET framework
functions you are using. As u created the basics in VS2003 u most likely
used .NET 1.1.

VS 2005 has support for .NET 2.0 and some support for 1.1 while VS2008
has support for 3.5/3.0/2.0 but without special plugins no support for v1.1.

U might want to check if the functions u've used in your program are
still in use in the current .NET package or replaced by others







- Zitierten Text anzeigen -

The first time you open a 2003-project with VS 2005 it should be
automatically converted into the new format, after that it should work
fine (at least I have never had any trouble doing this).
Almost anything that worked in 1.1 should still work in 2.0, there are
some breaking changes, but they are so obscure that you are unlikely
to run into them.
My first guess would be that the changes you made broke the program,
since upgrading is pretty reliable.
 
J

Jeroen

We also upgraded (about a year ago) without (too) much trouble. It
indeed seems the new feature might be the problem; how was the app
performing when you had just upgraded?
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

What kind of problems?

I have several projects upgraded from 1.1 to 2.0 and I have nver
encountered a single problem.
 
M

Marc Gravell

Well, one thing that did change (that might impact you here) is
that .NET 2.0 has much tighter treatment of cross-thread violations at
the UI. Are you doing anything interesting with threads here?
Actually, in this case you probably *should* be - the "Not Responding"
message is typical if you have blocked the UI thread instead of using
a worker : but it should be done correctly.

In both cases there are some scrappy workarounds:
* If you are doing the work on the UI thread, sprinkle a few
Application.DoEvents() into your loop to let the UI paint itself
* If you are violating thread-affinity, you can turn off these checks
(globally) using Control.CheckForIllegalCrossThreadCalls = false;

The first is just a little messy; the second is more dangerous, but in
reality it places you back in 1.1-land in this respect. The better
approach (although I realise it isn't always possible to be
perfectionist) is to use something like BackgroundWorker, which will
a: work on a background thread, and b: automatically marshal progress
updates back to the UI thread for you.

Marc
 
H

Harry V

..NET Framework 1.1 and VS2003, 2.0 and VS 2005, 3.0 and VS2008. Most likely
something to do with my problem.

But with the "not responding" issue aside, you would think that one could
count on a certain amount of very simple functionality and compatibility.
Wouldn't you expect something as simple as "this.close" would work from
version to version? Is proprietarianism THAT importatnt?

Oh well, 15 goin' on 20.
 
J

Jon Skeet [C# MVP]

Harry V said:
.NET Framework 1.1 and VS2003, 2.0 and VS 2005, 3.0 and VS2008. Most likely
something to do with my problem.
Unlikely.

But with the "not responding" issue aside, you would think that one could
count on a certain amount of very simple functionality and compatibility.
Wouldn't you expect something as simple as "this.close" would work from
version to version? Is proprietarianism THAT importatnt?

If you were calling Close() from a non-UI thread, you already had a bug
in 1.1. It may have more effect when debugging in 2.0 than 1.1, but it
was your bug to start with.

If that isn't the issue, please try to provide a short but complete
program that demonstrates the problem.
 

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