CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Mar 2000
    Location
    Germany, Franken
    Posts
    257

    Strange expection with invalid Cast

    Hello there,
    I've wrote a programm. While the program is started plugins are loaded.
    That worked well. Now I added a new plugin and recompiled all.
    Yet I got a exception during the loading of a older plugin.
    The exception tells me that:
    Code:
    System.InvalidCastException wurde nicht behandelt.
      Message="[A]com.markus_heid.bftradingstrategies.livescoreparser.LiveScoreParser kann nicht in [B]com.markus_heid.bftradingstrategies.livescoreparser.LiveScoreParser umgewandelt werden. Der Typ \"A\" stammt von \"LiveScoreParser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\" im Kontext \"Default\" am Speicherort \"C:\\Users\\Markus\\Documents\\Visual Studio 2008\\Projects\\BFTradingStrategies\\BFTSGUI\\bin\\Debug\\LiveScoreParser.dll\".. Der Typ \"B\" stammt von \"LiveScoreParser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\" im Kontext \"LoadFrom\" am Speicherort \"C:\\Users\\Markus\\Documents\\Visual Studio 2008\\Projects\\BFTradingStrategies\\BFTSGUI\\bin\\Debug\\Plugins\\BackThe4\\LiveScoreParser.dll\".."
      Source="LayThe4"
      StackTrace:
           bei com.markus_heid.bftradingstrategies.LayThe4.PluginLay4.Initialize(Object[] parameters) in C:\Users\Markus\Documents\Visual Studio 2008\Projects\BFTradingStrategies\LayThe4\PluginLay4.cs:Zeile 76.
           bei com.markus_heid.bftradingstrategies.BFTSGUI.frmMain.AddPlugin(String strFileName) in C:\Users\Markus\Documents\Visual Studio 2008\Projects\BFTradingStrategies\BFTSGUI\frmMain.cs:Zeile 186.
           bei com.markus_heid.bftradingstrategies.BFTSGUI.frmMain.FindPlugins(String strPath) in C:\Users\Markus\Documents\Visual Studio 2008\Projects\BFTradingStrategies\BFTSGUI\frmMain.cs:Zeile 123.
           bei com.markus_heid.bftradingstrategies.BFTSGUI.frmMain..ctor() in C:\Users\Markus\Documents\Visual Studio 2008\Projects\BFTradingStrategies\BFTSGUI\frmMain.cs:Zeile 214.
           bei com.markus_heid.bftradingstrategies.BFTSGUI.Program.Main() in C:\Users\Markus\Documents\Visual Studio 2008\Projects\BFTradingStrategies\BFTSGUI\Program.cs:Zeile 18.
           bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           bei System.Threading.ThreadHelper.ThreadStart()
      InnerException:
    The strange thing about it, is that I haven't changed a line of code of the LiveScoreParser.

    Does anyone here know what went wrong?

    I'm using VS.Studio 2008 Express on Vista Home with .NET Framework 3.5. All in german.

    Thanks in advance

    markus
    Last edited by Akademos; July 10th, 2009 at 04:30 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured