Solved

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

Posted on 2010-09-21
4
429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

729 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