Hi,
When I try to validate my EF6 model or generate code, I get an exception (see attachment):
"Het doel van een aanroep heeft een uitzondering veroorzaakt"
It's in Dutch, because that's where I live/work. It translates to something like:
"The purpose of a call caused an exception"
Can you tell me how to proceed resolving this issue?
Best regards,
Raymond
Strange exception when validating model/generating code
Re: Strange exception when validating model/generating code
1. You are working with Entity Developer (the Devart Entity Model item, *.edml), aren't you?
2. Is it a standalone version of Entity Developer or the one integrated in Visual Studio?
3. Specify a call stack of the exception. If there is no call stack, you can obtain it by connecting from Visual Studio (Debug | Attach to Proccess) to the instance of Entity Developer or Visual Studio (where you are running Create Model Wizard). Before attaching don't forget to make these settings in your Visual Studio you are attaching from: a) in the (Debug | Exceptions) window select Common Language Runtime Exceptions; b) in the (Tools | Options) window, Debugging | General - clear Enable Just My Code (Managed Only).
4. Tell us the exact versions of your Entity Developer and Visual Studio.
5. Send us a test model and specify the steps we should follow using it to reproduce the issue.
2. Is it a standalone version of Entity Developer or the one integrated in Visual Studio?
3. Specify a call stack of the exception. If there is no call stack, you can obtain it by connecting from Visual Studio (Debug | Attach to Proccess) to the instance of Entity Developer or Visual Studio (where you are running Create Model Wizard). Before attaching don't forget to make these settings in your Visual Studio you are attaching from: a) in the (Debug | Exceptions) window select Common Language Runtime Exceptions; b) in the (Tools | Options) window, Debugging | General - clear Enable Just My Code (Managed Only).
4. Tell us the exact versions of your Entity Developer and Visual Studio.
5. Send us a test model and specify the steps we should follow using it to reproduce the issue.
Re: Strange exception when validating model/generating code
Hi,
Thanks for assisting me with this issue.
1. Correct.
2. Standalone version
3. There is no stack trace, not even in Visual Studio. Detaching the debugger shows:
A. A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll. And after I 'Continue':
B. A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll (but no stack trace).
4. I use Visual Studio 2013 and Entity Developer version 5.7.422.
5. I'll do that!
Best regards,
Raymond
Thanks for assisting me with this issue.
1. Correct.
2. Standalone version
3. There is no stack trace, not even in Visual Studio. Detaching the debugger shows:
A. A first chance exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll. And after I 'Continue':
B. A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll (but no stack trace).
4. I use Visual Studio 2013 and Entity Developer version 5.7.422.
5. I'll do that!
Best regards,
Raymond
Re: Strange exception when validating model/generating code
Thank you for the test model. We have reproduced the error and are investigating the issue. We will notify you about the results of our investigation as soon as any are available.
Re: Strange exception when validating model/generating code
The behaviour of the latest (5.7.441) build of Entity Developer is improved. Now your model doesn't throw error window but writes the "The given key was not present in the dictionary." message in the Error List window of Entity Developer. Unfortunately, it doesn't include a useful information about a problem in the model.
The Validate (Generate Code also calls Validate) functionality of Entity Developer is fully implemented basing on Entity Framework runtime (System.Data.Entity.dll/System.Data.Entity.Design.dll for EF1/EF4/EF5 and EntityFramework.dll for EF6). The "The given key was not present in the dictionary." error is generated by EF runtime, and this is a bug of Entity Framework. We don't know what exactly causes this fail.
We recommend to find out the reason of the problem in the following way: recreate CSDL from SSDL step by step to localize the problem and fix (or work around) it.
If we can be of any further assistance, let us know.
The Validate (Generate Code also calls Validate) functionality of Entity Developer is fully implemented basing on Entity Framework runtime (System.Data.Entity.dll/System.Data.Entity.Design.dll for EF1/EF4/EF5 and EntityFramework.dll for EF6). The "The given key was not present in the dictionary." error is generated by EF runtime, and this is a bug of Entity Framework. We don't know what exactly causes this fail.
We recommend to find out the reason of the problem in the following way: recreate CSDL from SSDL step by step to localize the problem and fix (or work around) it.
If we can be of any further assistance, let us know.