Questions tagged [targetinvocationexception]

DO NOT USE. This is a typo for InvocationTargetException.

71 questions
0
votes
2 answers

Target Invocation Exception in async method

I am trying to retrieve items from an rss feed but at times I get a TargetInvocationException 'unable to connect to remote server'. I am trying to use a try catch block to catch this error but I am not managing as I need the variable feed to be used…
0
votes
2 answers

C# event/delegate TargetInvocationException (WPF)

I'm playing around with events/delegates and I constantly get the following error: An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in PresentationFramework.dll Additional information: Exception has been thrown…
HelloWorld
  • 2,375
  • 5
  • 22
  • 21
0
votes
1 answer

Binding.UpdateSourceTrigger giving XamlParseException/TargetInvocationException in WPF

I'm trying to apply the trigger as follows: using SmartRoutePlanner.Models; ... Map locationMap = new Map(); locationTextBox.DataContext = locationMap; Binding locationBinding = new…
0
votes
2 answers

System.NullReferenceException: Object reference not set to an instance of an object WPF

I'm getting TargetInvocationException in below code. InnerException is "System.NullReferenceException". I don't understand problem here. Can anyone tell me, where could be the problem? C# code: public class Harvest_Project { public string…
user2622971
  • 685
  • 3
  • 10
  • 20
0
votes
1 answer

dealing cards from a deck to an array of Cards called Hands

I am trying to deal 5 cards to a Hand object that can contain 6 card objects. Ive written the hand class, the deck class and the card class. The code deals cards to the Hand object which can contain Card objects, but i keep on getting the…
Lxrd-AJ
  • 592
  • 7
  • 16
0
votes
1 answer

exception System.Reflection.TargetInvocationException error

I m trying to run an older vb.net code but it breaks with this error (exception System.Reflection.TargetInvocationException). Here's the tracelog: Source="mscorlib" StackTrace: à System.RuntimeMethodHandle._SerializationInvoke(Object target,…
Stan92
  • 453
  • 1
  • 8
  • 21
0
votes
2 answers

Trapping exceptions for logging in a C++ CLI app

I'm trying to trap any and all exceptions in a C++/CLI app so that I can log and record them (including a stack trace). So far I have some code which looked promising: [STAThreadAttribute] int main(array ^args) { // Enabling…
Jon Cage
  • 36,366
  • 38
  • 137
  • 215
-2
votes
2 answers

Crash in C# Class Library when i use it

Source/destination types public struct MyStruct { public int FirstText { get; set; } public int SecondText { get; set; } } Source/destination JSON {FirstText:1,SecondText:2} Expected behavior When I use it in a single exe demo: 1 -…
-2
votes
1 answer

C# Winform application error if i target Any CPU or x64

Im developing a simple winform application which i would like to deploy to a mix of pcs - some x64 and some x86. The application searches the harddrive for files containing text the user enters, and uses a backgroundworker to to the actual search so…
Nick
  • 3,454
  • 6
  • 33
  • 56
-2
votes
1 answer

C# Entity Framework "An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in EntityFramework.dll"

I'm building a simple login form using VS2015, C#, SQLite DB and entity Framework (under .net framework 4) when I enter a valid user and password I get this exception An unhandled exception of type 'System.Reflection.TargetInvocationException'…
Charaf
  • 177
  • 1
  • 2
  • 12
-2
votes
4 answers

TargetInvocationException was unhandled at the end of DoWork Backgroundworker Method

Here's DoWork: private void uploadWorker_DoWork(object sender, DoWorkEventArgs e) { uploadWorker.ReportProgress(20); int tiffError = 0; finalFiles = Directory.GetFiles(AppVars.FinalPolicyImagesFolder); …
JJ.
  • 9,580
  • 37
  • 116
  • 189
1 2 3 4
5