Link to home
Start Free TrialLog in
Avatar of exceter
exceterFlag for Kyrgyzstan

asked on

my application written in VS2010 does not work on other computers

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
Avatar of Member_2_99151
Member_2_99151

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?
Avatar of exceter

ASKER

1. I installed .NET 4 on other OS
2. It does not copy itself, I did it manually
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?
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...
Avatar of exceter

ASKER

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.
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
Avatar of exceter

ASKER

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
what about the telerik prerequisites?
Avatar of exceter

ASKER

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
difficult to say for certain, but looks like teleric needs .net 2.0
Avatar of exceter

ASKER

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

the same error
Have you made the target specifically x64?

Avatar of exceter

ASKER

No, I could find where to do that
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of exceter

ASKER

found it, it was x86, anyway changed it to "Any CPU". no success
Avatar of exceter

ASKER

2 emoreau:
But my application even does not start
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>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.
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?
Avatar of exceter

ASKER

>>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.