Urgent help needed : Strange error !!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

I have a windows application which works perfectly well on my developement
platform.
When deplyoing it I get an error :

"Exception has been thrown by the target of an invocation"

By placing log entry point I figured out that it fails executing the
following function:

CType(AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap(Application.StartupPath
& Global.ENVIRONMENT_PATH.PLUGINS_FILE_PATH & "\" & m_PluginST.FileName,
"NomosNetSolution.PluginAppRT.PlugIn" & m_PluginST.Name), IPRTApplication)

This function works well under my dev system

Thnaks for your help
regards
 
Are you missing any required assemblies? Are you using a Setup project
which has analysed dependecies?
Can you post details of the entire exception including any inner
exception?
 
Hello calderara,
"Exception has been thrown by the target of an invocation"

That exception means that a different exception has been thrown while the
class you're creating with that call to CreateInstanceFromAndUnwrap() was
being created. You should look at the property InnerException of the
exception you're catching to see the original exception and its message.
That'll help you figure out what the source of the problem is.


Oliver Sturm
 
calderara said:
Dear all,

I have a windows application which works perfectly well on my developement
platform.
When deplyoing it I get an error :

"Exception has been thrown by the target of an invocation"

By placing log entry point I figured out that it fails executing the
following function:

CType(AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap(Application.StartupPath
& Global.ENVIRONMENT_PATH.PLUGINS_FILE_PATH & "\" & m_PluginST.FileName,
"NomosNetSolution.PluginAppRT.PlugIn" & m_PluginST.Name), IPRTApplication)

This function works well under my dev system

Thnaks for your help
regards

In addition to the other replies, make sure that the machine you are
deploying on has the environment variables assigned to values that you
expect. You appear to be referring to these environment variables without
checking them first. Values in environment variables may not be valid or
may have an extra "\" at the end, or extra spaces, etc, that make the
concatenated string (in your code) invalid.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
Back
Top