application has generated an exception that could not be handled in VB.NET

R

RDKram

This applicaiton was originally developed in VB 6. I converted it to
VB.NET using .NETs own conversion utilities. It runs fine on the
machine with the .NET development environment. However, why I put the
executable on a machine with MDAC 2.8 and .NET 1.1, I receive the
afformentioned error.

I have try/catch blocks in the primary forms load event. The one
statement within the catch/end section is to display the error. This
code does not get executed.
Try
.... code here
Catch ex As Exception
' never gets executed
MsgBox("Here is the error:" & vbCrLf & ex.Message)
End Try

I even put a message box as the first line in the starting forms load
event and it too does not get executed either.

I do not know how to execute any other type of error dumping or
tracing from the machine where the error occurs, but I am willing to
try anything.

Please help.

Daniel
 
J

Jevon Farr

Hi,

What version of VS.Net are you using? If you're using 2002, you'll need to
have, iirc, .Net framework 1.0 installed as only version 2003 programs use
version 1.1 of the framework.

HTH,

Jevon
 
J

Jay B. Harlow [MVP - Outlook]

Daniel,
Which version of the framework did you use to develop the app?

The following web site identifies how to ensure that a 1.0 app will run on
the 1.1 framework & a 1.1 app will run on the 1.0 framework.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/sidexsidenet.asp

Also seeing as you upgraded your app from VB6. Did you create a setup
package to deploy your app, or did you simply copy the executable? I suspect
you are missing the Microsoft.VisualBasic.Compatibility assembly. This
assembly is used by the upgrade wizard, you are free to deploy it with your
app, however it is not installed as part of the Framework itself. I would
recommend using a setup package to deploy your app &
Microsoft.VisualBasic.Compatibility initially, which would allow you to
install Microsoft.VisualBasic.Compatibility to the GAC.

http://msdn.microsoft.com/library/d...vbconthevisualbasic60compatibilitylibrary.asp

http://msdn.microsoft.com/library/d...isualbasiccompatibilitynamespacereference.asp

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top