0

When running my code, I get an 'DbUpdateException was unhandled by user code', which shows in my application as an 'unhandled exception', refering to the 'inner exception' for details. I've read some articles on here which suggested building a simple try catch block to show the inner exception. When this didn't show anything, I went through the code step by step to find out where it went wrong and why the innerexception wasn't showing. Turns out; The inner exception is null.

The inner exception is null.

I'd prefer some tips as to where to look to find a solution to the problem than having someone find the problem for me, so I'll refrain from posting some of the code here for now, unless someone tells me that's not going to work out for me.

Community
  • 1
  • 1
Ciphra
  • 269
  • 2
  • 17
  • 2
    Did you read the message? – Mark Sep 05 '16 at 14:47
  • @mark what message are you refering to.. ? – Ciphra Sep 05 '16 at 14:50
  • Looks to me like it's trying to load an assembly that you referenced in your project, but is no longer there. – Mike Sep 05 '16 at 14:50
  • In the exception image you posted. The "Message" Property holds every information you need to get rid of the error. "Cannot load assembly xxx". You have a reference in your project which is probably not in the folder where your application starts – Mark Sep 05 '16 at 14:51
  • @mark the assembly not being loaded turns out to be the C:\MyProject\bin\Debug\EntityFramework.dll I suppose that's why the innerexception turns out to be null ? – Ciphra Sep 05 '16 at 15:02
  • the DbUpdateException is already everything about the exception. Do you copy the reference locally? How did you install EF/providers? – DevilSuichiro Sep 05 '16 at 16:57

0 Answers0