Solved

Win Forms from VS 2005 to VS 2010 Problem....

Posted on 2010-09-21
4
417 Views
Last Modified: 2012-05-10
Hello Experts,

                 I'm working with Win forms using Visual Studio 2005 and code behind language is Visual Basic.My current project contains more than 450 forms.We were planning to migrate it from VS 2005 to VS 2010.So, I opened  my project with VS 2010.It had changed from framework 2.0 to framework 4.0. It builds and runs fine.

My Problem is that,

After  running my application . When I open any form it gives me an Exception System.outofmemoryexception...

If I clean my project It works fine...

What will I do for it?????

I'm googling in the internet... I had found lots of article... But no one is works for me...

Thanks in Advance
0
Comment
Question by:zillion_kamesh
4 Comments
 
LVL 3

Expert Comment

by:ghayasurrehman
ID: 33723537
double check you have chosen Framework 4.0 or Compact Framework 4.0
0
 

Author Comment

by:zillion_kamesh
ID: 33723714
I checked with .net framework 4.0 client profile and also Framework 4.0..
It gives me a same problem
0
 
LVL 5

Expert Comment

by:ina_don
ID: 33725015
Hi

Have you tried to establish how much resources you application is consuming when you run it and to see how well it releases the memory it uses when you close it? I think its best to start on the basic thing which is check how much ram you have left after running you application.

I once change an app done in VS2005 to VS 2008 or was it 2002 - 2008 but that left me with a problem with resources. I think at that time I'd used some legacy activeX controls and removing them resolved the problem and I had to and find alternative ways of perfoming the functions that the ocxs were.
0
 
LVL 3

Accepted Solution

by:
Blacklord_76 earned 500 total points
ID: 33773896
Many things may be screwed up. I'd suggest you now to convert the whole solution at ones. If if worked it would be fine. However, it didn't.
As soon as you had your solution previously running under .NET 2.0 I'd
1) suggest making it running with VS2010 and .NET 2.0 (which actually is a default conversion made by VS2010). While VS2010 "prefers" .NET 4.0, it runs fine if you setup a solution to use .NET 2.0 or 3.5

2) If you have good reasons to migrate to .NET 4.0, perform this migration as the second step

If you encounter issues at the first step then you could use "Swiss cheese" method to perform migrations by pieces. I mean that you may convert parts of you solutions to VS2010 format, and have them working. As soon as VS2010 doesn't allow (well, at least I am not aware if it does) to migrate only only one of the projects, you need to make
 
1) "Final" project that uses all binaries with your forms. This project may contain only a class with Main method. This project would contain references to all assemblies that you have right now. First you'd need to have it done with VS 2005. It' doesn't really matter what version of VS you use here, but you need to use .NET 2.0 as run-time.

2) Once the "final" project is working (not just compiled) you may compile some of projects (or a project if you have only one) are converted to VS2010 format.

3) Please backup after each step in case if you encounter any issues. Then you'll be able to revert the latest changed.

The main advantage of step-by-step approach is that you can find what parts of your solutions cause issues, which is typically more difficult when you convert all at once
Good luck




0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now