?
Solved

my application written in VS2010 does not work on other computers

Posted on 2011-10-25
20
Medium Priority
?
386 Views
Last Modified: 2013-12-16
Hi,
I have written a simple windows application - VS2010, OS-Windows 7 x64
it uses telerik radgridview and button.
When I try to start the application, it throws error:
"WinForms has encountered a problem and needs to close. We are sorry for the inconvenience"

I try it on XP on VMware and on Windows 2003 Ent.

It is 4 hours I am googling to find a solution with no success
0
Comment
Question by:exceter
  • 9
  • 8
  • 3
20 Comments
 
LVL 4

Expert Comment

by:James Atkin
ID: 37023580
Have you ensured that all the correct runtime libraries are in place? i.e. .NET 4 (x86/x64)

Has the telerik control library copied itself to the destination folder?
0
 
LVL 3

Author Comment

by:exceter
ID: 37023623
1. I installed .NET 4 on other OS
2. It does not copy itself, I did it manually
0
 
LVL 4

Expert Comment

by:James Atkin
ID: 37023645
I'm not familiar with the specific control, but in many cases there are dependencies on the controls themselves. Do they provide you with a runtime distribution?
0
Industry Leaders: 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!

 
LVL 4

Expert Comment

by:James Atkin
ID: 37023655
Take a look at this:

http://www.telerik.com/help/winforms/installation-deployment-and-distribution-application-deployment.html

if you sen the control to copy locally, it *should* copy any other dependent libraries with it...
0
 
LVL 3

Author Comment

by:exceter
ID: 37023660
What I did:
1 - installed .NET 4 (I compiled for .NET 4) on target computer
2 - copied all Telerik dlls to "bin" directory in my application folder

I did not understand what you mean. It is the first time I use this control for Windows application, before I used its ASP.NET Ajax dlls.
0
 
LVL 4

Expert Comment

by:James Atkin
ID: 37023687
The obvious things to check are:

1. Correct .NET runtime is installed (x64/x86)
2. Telerik controls do not need a different runtime library (are they .NET 4?)
3. Select properties of Telerik in references and select Copy Local, then recompile
0
 
LVL 3

Author Comment

by:exceter
ID: 37023728
2 jatkin:
I tried this to make local copy, it copies all DLLs to folder where .exe file, I tried to move them into bin folder
no effect
0
 
LVL 4

Expert Comment

by:James Atkin
ID: 37023738
what about the telerik prerequisites?
0
 
LVL 3

Author Comment

by:exceter
ID: 37023740
I tried to make a fresh install of .NET4 and reboot it, then copied there my application.
Probably u r right, the problem is with Telerik component
0
 
LVL 4

Expert Comment

by:James Atkin
ID: 37023751
difficult to say for certain, but looks like teleric needs .net 2.0
0
 
LVL 3

Author Comment

by:exceter
ID: 37023778
What I tried on VMWare XP:
- installed .NET2, .NET3, .NET4
- installed telerik components installation

the same error
0
 
LVL 4

Expert Comment

by:James Atkin
ID: 37023794
Have you made the target specifically x64?

0
 
LVL 3

Author Comment

by:exceter
ID: 37023818
No, I could find where to do that
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 1600 total points
ID: 37023820
it would be time to start tracing your application. it can be as simple as putting a lot of MessageBox.Show here and there or as sophisticated as using the System.Diagnostics (check http://www.emoreau.com/Entries/Articles/2003/11/Code-diagnostic-an-article-on-tracing-and-debugging.aspx)
0
 
LVL 3

Author Comment

by:exceter
ID: 37023831
found it, it was x86, anyway changed it to "Any CPU". no success
0
 
LVL 3

Author Comment

by:exceter
ID: 37023837
2 emoreau:
But my application even does not start
0
 
LVL 4

Assisted Solution

by:James Atkin
James Atkin earned 400 total points
ID: 37023840
emoreau is right, you may need to do some runtime debugging to see where the failure is...

You could use a tool such as depends.exe, but this is less useful with .NET ( does identify if Visual C++ Runtime or other dependencies are needed though...)
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37023847
>>But my application even does not start

it might start but you might have some instructions (like trying to access resources) that prevent it from correctly starting). Put messages in your initializers, form's load event, ... everywhere code is run before the first is being displayed.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37023876
have you made sure that all your references other then Microsoft (at least Telerik in your case) have the "Copy Local" set to true and that you have copied all the files from the bin folder (debug or release depending on your current mode) to the other PC?
0
 
LVL 3

Author Closing Comment

by:exceter
ID: 37029166
>>Put messages in your initializers, form's load event, ... everywhere code is run before the first is being displayed.

You were right, finally found the row making trouble. It was DataSet(!).
removed it, initialized all data manually, and it worked.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

621 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