Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15583

VS 2019 Exception thrown: 'System.InvalidCastException' in Microsoft.VisualBasic.dll

$
0
0
Hi guys

I'm writing a console (command line) based cross assembler and it's all but complete. This is a rewrite of an earlier attempt which had turned into a bit of a mess as I didn't know about Option Explicit On when I wrote it :blush: (I'm a hobby programmer as you can tell). So, when I rewrote the code I made sure that I was using Option Explicit On for the entire project.

The issue I have is that when I run the project after compiling I get the following in the Output window (the Error List is empty when compiling):

Quote:

Exception thrown: 'System.InvalidCastException' in Microsoft.VisualBasic.dll
Exception thrown: 'System.InvalidCastException' in Microsoft.VisualBasic.dll
Exception thrown: 'System.InvalidCastException' in Microsoft.VisualBasic.dll
Exception thrown: 'System.InvalidCastException' in Microsoft.VisualBasic.dll
Exception thrown: 'System.InvalidCastException' in Microsoft.VisualBasic.dll
The program '[20564] Parser.exe' has exited with code 0 (0x0).
The program runs as it should, but clearly I have tried to convert a value to another cast and not done it properly. I'd like to track this down, but my program is absolutely full of conversions and there aren't any other errors so I'm not sure how to do this.

I'm using Visual Basic 2019.

Can any one point me in the right direction?

Viewing all articles
Browse latest Browse all 15583

Trending Articles