I have a strange (to me) problem with a c# forms application that I am
developing. The application is installed on approxmatly 30 Windows XP
machines and until recently they all worked perfectly. However since I have
updated the application to a new version one of the machines fails with an
unhandled exception when the application starts. The code in program.cs
works fine and anything before the InitializeComponent(); method in the main
form. As soon as the aplication enters the InitializeComponent method it
crashes with mention of a filenotfound exception.

I have copied the application folder from the failing PC to a good PC and it
works fine which leads me to believe that it must be a system file that is
missing. Likewise if I copy the program folder from a good PC to the failing
one it again fails.

I have reinstalled the app and the .Net 2 framework but to no avail.

Having only done "basic debugging" I'm now a bit stuck.

Any help would be appreciated

Re: Strange error when app starts by Bryan

Bryan
Tue Oct 17 13:42:48 CDT 2006

Are you referencing any assemblies other than those in the System.*
namespaces? If so, you might not have copied other dependent assemblies
to the destination computers. Also, check your app.config files for any
paths that do not exist on those workstations. Finally, if there is an
infrastructure group that maintains these workstations, make sure that
they have not made any changes that you are not aware of.

Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com




"MJ" <no_s_pam@belmont.co.uk> wrote in message
news:12j9njg6dims8e1@corp.supernews.com:

> I have a strange (to me) problem with a c# forms application that I am
> developing. The application is installed on approxmatly 30 Windows XP
> machines and until recently they all worked perfectly. However since I have
> updated the application to a new version one of the machines fails with an
> unhandled exception when the application starts. The code in program.cs
> works fine and anything before the InitializeComponent(); method in the main
> form. As soon as the aplication enters the InitializeComponent method it
> crashes with mention of a filenotfound exception.
>
> I have copied the application folder from the failing PC to a good PC and it
> works fine which leads me to believe that it must be a system file that is
> missing. Likewise if I copy the program folder from a good PC to the failing
> one it again fails.
>
> I have reinstalled the app and the .Net 2 framework but to no avail.
>
> Having only done "basic debugging" I'm now a bit stuck.
>
> Any help would be appreciated


Re: Strange error when app starts by MJ

MJ
Tue Oct 17 14:04:01 CDT 2006

Other Assemblies
The application does use Crystal and Component One components but they all
installed correctly via the installer

Config Files
The application uses one custom config file and all paths exist

Any suggestions on how to debug an application that runs perfectly on a
development machine but fails in the "real world"

See the following code which is the constructor of the main form:

project.public Form1()
{
MessageBox.Show("This message will show as normal");
InitializeComponent();
MessageBox.Show("This message never shows as the application has now
failed");
}

MJ

"Bryan Phillips" <bphillips@nospam.crowechizek.com.spammenot> wrote in
message news:upgkmvh8GHA.4012@TK2MSFTNGP04.phx.gbl...
> Are you referencing any assemblies other than those in the System.*
> namespaces? If so, you might not have copied other dependent assemblies
> to the destination computers. Also, check your app.config files for any
> paths that do not exist on those workstations. Finally, if there is an
> infrastructure group that maintains these workstations, make sure that
> they have not made any changes that you are not aware of.
>
> Bryan Phillips
> MCSD, MCDBA, MCSE
> Blog: http://bphillips76.spaces.live.com
>
>
>
>
> "MJ" <no_s_pam@belmont.co.uk> wrote in message
> news:12j9njg6dims8e1@corp.supernews.com:
>
>> I have a strange (to me) problem with a c# forms application that I am
>> developing. The application is installed on approxmatly 30 Windows XP
>> machines and until recently they all worked perfectly. However since I
>> have
>> updated the application to a new version one of the machines fails with
>> an
>> unhandled exception when the application starts. The code in program.cs
>> works fine and anything before the InitializeComponent(); method in the
>> main
>> form. As soon as the aplication enters the InitializeComponent method it
>> crashes with mention of a filenotfound exception.
>>
>> I have copied the application folder from the failing PC to a good PC and
>> it
>> works fine which leads me to believe that it must be a system file that
>> is
>> missing. Likewise if I copy the program folder from a good PC to the
>> failing
>> one it again fails.
>>
>> I have reinstalled the app and the .Net 2 framework but to no avail.
>>
>> Having only done "basic debugging" I'm now a bit stuck.
>>
>> Any help would be appreciated
>



Re: Strange error when app starts by Pritcham

Pritcham
Wed Oct 18 03:17:26 CDT 2006

Hi

Apologies if this suggestion is a little 'basic' but have you wrapped
the call to InitialiseComponents() inside a try...catch so that you can
actually get the full details of the exception in order to establish
what file it is having problems with?

Martin
MJ wrote:
> Other Assemblies
> The application does use Crystal and Component One components but they all
> installed correctly via the installer
>
> Config Files
> The application uses one custom config file and all paths exist
>
> Any suggestions on how to debug an application that runs perfectly on a
> development machine but fails in the "real world"
>
> See the following code which is the constructor of the main form:
>
> project.public Form1()
> {
> MessageBox.Show("This message will show as normal");
> InitializeComponent();
> MessageBox.Show("This message never shows as the application has now
> failed");
> }
>
> MJ
>
> "Bryan Phillips" <bphillips@nospam.crowechizek.com.spammenot> wrote in
> message news:upgkmvh8GHA.4012@TK2MSFTNGP04.phx.gbl...
> > Are you referencing any assemblies other than those in the System.*
> > namespaces? If so, you might not have copied other dependent assemblies
> > to the destination computers. Also, check your app.config files for any
> > paths that do not exist on those workstations. Finally, if there is an
> > infrastructure group that maintains these workstations, make sure that
> > they have not made any changes that you are not aware of.
> >
> > Bryan Phillips
> > MCSD, MCDBA, MCSE
> > Blog: http://bphillips76.spaces.live.com
> >
> >
> >
> >
> > "MJ" <no_s_pam@belmont.co.uk> wrote in message
> > news:12j9njg6dims8e1@corp.supernews.com:
> >
> >> I have a strange (to me) problem with a c# forms application that I am
> >> developing. The application is installed on approxmatly 30 Windows XP
> >> machines and until recently they all worked perfectly. However since I
> >> have
> >> updated the application to a new version one of the machines fails with
> >> an
> >> unhandled exception when the application starts. The code in program.cs
> >> works fine and anything before the InitializeComponent(); method in the
> >> main
> >> form. As soon as the aplication enters the InitializeComponent method it
> >> crashes with mention of a filenotfound exception.
> >>
> >> I have copied the application folder from the failing PC to a good PC and
> >> it
> >> works fine which leads me to believe that it must be a system file that
> >> is
> >> missing. Likewise if I copy the program folder from a good PC to the
> >> failing
> >> one it again fails.
> >>
> >> I have reinstalled the app and the .Net 2 framework but to no avail.
> >>
> >> Having only done "basic debugging" I'm now a bit stuck.
> >>
> >> Any help would be appreciated
> >


Re: Strange error when app starts by MJ

MJ
Wed Oct 18 07:17:36 CDT 2006

Excellent idea which I have tried but it didn't work. The aplication crashed
just the same as though the try catch block had not been entered even though
it enclosed everything.

MJ

"Pritcham" <dontwanttogivemyname@hotmail.com> wrote in message
news:1161159446.515433.111820@i42g2000cwa.googlegroups.com...
> Hi
>
> Apologies if this suggestion is a little 'basic' but have you wrapped
> the call to InitialiseComponents() inside a try...catch so that you can
> actually get the full details of the exception in order to establish
> what file it is having problems with?
>
> Martin
> MJ wrote:
>> Other Assemblies
>> The application does use Crystal and Component One components but they
>> all
>> installed correctly via the installer
>>
>> Config Files
>> The application uses one custom config file and all paths exist
>>
>> Any suggestions on how to debug an application that runs perfectly on a
>> development machine but fails in the "real world"
>>
>> See the following code which is the constructor of the main form:
>>
>> project.public Form1()
>> {
>> MessageBox.Show("This message will show as normal");
>> InitializeComponent();
>> MessageBox.Show("This message never shows as the application has now
>> failed");
>> }
>>
>> MJ
>>
>> "Bryan Phillips" <bphillips@nospam.crowechizek.com.spammenot> wrote in
>> message news:upgkmvh8GHA.4012@TK2MSFTNGP04.phx.gbl...
>> > Are you referencing any assemblies other than those in the System.*
>> > namespaces? If so, you might not have copied other dependent
>> > assemblies
>> > to the destination computers. Also, check your app.config files for
>> > any
>> > paths that do not exist on those workstations. Finally, if there is an
>> > infrastructure group that maintains these workstations, make sure that
>> > they have not made any changes that you are not aware of.
>> >
>> > Bryan Phillips
>> > MCSD, MCDBA, MCSE
>> > Blog: http://bphillips76.spaces.live.com
>> >
>> >
>> >
>> >
>> > "MJ" <no_s_pam@belmont.co.uk> wrote in message
>> > news:12j9njg6dims8e1@corp.supernews.com:
>> >
>> >> I have a strange (to me) problem with a c# forms application that I am
>> >> developing. The application is installed on approxmatly 30 Windows XP
>> >> machines and until recently they all worked perfectly. However since I
>> >> have
>> >> updated the application to a new version one of the machines fails
>> >> with
>> >> an
>> >> unhandled exception when the application starts. The code in
>> >> program.cs
>> >> works fine and anything before the InitializeComponent(); method in
>> >> the
>> >> main
>> >> form. As soon as the aplication enters the InitializeComponent method
>> >> it
>> >> crashes with mention of a filenotfound exception.
>> >>
>> >> I have copied the application folder from the failing PC to a good PC
>> >> and
>> >> it
>> >> works fine which leads me to believe that it must be a system file
>> >> that
>> >> is
>> >> missing. Likewise if I copy the program folder from a good PC to the
>> >> failing
>> >> one it again fails.
>> >>
>> >> I have reinstalled the app and the .Net 2 framework but to no avail.
>> >>
>> >> Having only done "basic debugging" I'm now a bit stuck.
>> >>
>> >> Any help would be appreciated
>> >
>



RE: Strange error when app starts by PrabakarSamiyappan

PrabakarSamiyappan
Thu Oct 26 03:44:02 CDT 2006

Hi
1. Check the Framework Version which you have developed and the Version of
the Client machine which you have insatlled .
2. Some time we may give the ouput directory to store some file .if you have
any thing like that plz Check that.
3.Check weather all the assembly are properly Placed.
4.Check weather all the Third Party Control are installed properly (if any)
5. Check weather any of you controls uses any Skins which should be place in
proper place..

Regards
Prabakar


"MJ" wrote:

> I have a strange (to me) problem with a c# forms application that I am
> developing. The application is installed on approxmatly 30 Windows XP
> machines and until recently they all worked perfectly. However since I have
> updated the application to a new version one of the machines fails with an
> unhandled exception when the application starts. The code in program.cs
> works fine and anything before the InitializeComponent(); method in the main
> form. As soon as the aplication enters the InitializeComponent method it
> crashes with mention of a filenotfound exception.
>
> I have copied the application folder from the failing PC to a good PC and it
> works fine which leads me to believe that it must be a system file that is
> missing. Likewise if I copy the program folder from a good PC to the failing
> one it again fails.
>
> I have reinstalled the app and the .Net 2 framework but to no avail.
>
> Having only done "basic debugging" I'm now a bit stuck.
>
> Any help would be appreciated
>
>
>
>