I'm getting an unexpected error when I (re)build the main project of my solution:
"Exception has been thrown by the target of an invocation." D:\MyApp\Db\Model.edmx
Db is a supporting project referenced by the main project. I created the .EDMX with a Model-First design.
I've looked at the detailed build output, but nothing is apparent as to what the cause and/or source of this is. There's no apparent way to find out what the exception actually is.
Nor does Google return anything for this error in the context of an .EDMX file.
How to go about finding out what's causing this, so I can fix it?
EDIT #1: I also get the error as a single MessageBox when I try to open the .EDMX for editing in Visual Studio. There's no hint about what the exception may be, nor where I might find more detail.
EDIT #2: I've been able to narrow it down to one of these four assemblies:
- Db.dll (the project assembly)
- EntityFramework.dll
- EntityFramework.SqIServer.dll
- EntityFramework.SqIServerCompact.dll
If I delete any one of the four in the project's \bin folder, I can open the .EDMX for editing.
Does anyone know how to trap the exception that's occurring, so I can go about fixing it?