exception - System.TypeLoadException in C# -


i have c# application , modified show new window using lines:

private void button1_click(object sender, eventargs e) {    welcomescreen channelbar = new welcomescreen(true, "http://www.trade-ideas.com/cms_static/channelbar/channelbar.html"); } 

it compiles fine, when run app , click on button, error:

an unhandled exception of type 'system.typeloadexception' occurred in windowsformsapplication1.exe

additional information: not load type 'tradeideas.tiprodata.oddsmakercolumnconfiguration' assembly 'tiprodata, version=1.0.0.0, culture=neutral, publickeytoken=null'.

what doesn't make sense welcomescreen comes tiprogui.dll not tiprodata. have included both dll's in project along 3rd dll:

using tradeideas.tiprodata; using tradeideas.tiprogui; using tradeideas.tiprodata.configuration; 

also, when run project initially, see strange message. says:

loading symbols tiprodata.dll from: \\missioncontrol\users\klewis2\documents\cvsroot\c_sharp\tiprodata\obj\release 

needless say, there no path machine.

any clues causing appreciated.

there many reasons , 1 of common once exceptions in static initializers.

to diagnose - debug program exceptions set "break when thrown" , disabled "my code only". when exception happen take note of call stack , check exceptions thrown static initializers.

location of options:

  • tools-> options -> debug -> code (uncheck)
  • debug -> exceptions -> common language runtime exceptions (check "thrown")

sample code cause error:

class myclass {       static int value = readfromconifg();        static int  readfromconifg()       {...            throw new configmissingexception();       } } 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -