SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Error creating EF Model with wizard

Last post 10-01-2014 11:16 PM by MattWard. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-29-2014 8:32 AM

    Error creating EF Model with wizard

    I'm trying to generate an EntityFramework Model on an SQL Server 2008 R2 with the Wizard. The connection to the database server can be established and all databases are shown...

    This is my SD-Version:

    SharpDevelop Version : 4.4.1.9729-7196a277
    .NET Version         : 4.0.30319.18063
    OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
    Current culture      : German (Germany) (de-DE)
    Current UI language  : en

    When clicking "Finish" in the wizard I get the following unhandled exception:

    System.NullReferenceException: Object reference not set to an instance of an object.
       at ICSharpCode.Data.EDMDesigner.Core.IO.EDMXIO.WriteXDocument(XDocument ssdlDocument, XDocument csdlDocument, XDocument mslDocument) in c:\Users\123\Downloads\SharpDevelop_4.4.1.9729_Source\src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\IO\EDMXIO.cs:line 155
       at ICSharpCode.Data.EDMDesigner.Core.ObjectModelConverters.EDMConverter.CreateEDMXFromIDatabase(IDatabase database, String modelNamespace, String objectContextNamespace, String objectContextName) in c:\Users\123\Downloads\SharpDevelop_4.4.1.9729_Source\src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\ObjectModelConverters\EDMConverter.cs:line 76
       at ICSharpCode.Data.EDMDesigner.Core.Windows.EDMWizard.EDMWizardWindow.OnFinished() in c:\Users\123\Downloads\SharpDevelop_4.4.1.9729_Source\src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\Windows\EDMWizard\EDMWizardWindow.cs:line 160
       at ICSharpCode.Data.Core.UI.Windows.WizardWindowInnards.btnFinish_Click(Object sender, RoutedEventArgs e) in c:\Users\123\Downloads\SharpDevelop_4.4.1.9729_Source\src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core.UI\Windows\WizardWindowInnards.xaml.cs:line 215

     

    What am I doing wrong?

  • 09-30-2014 11:14 AM In reply to

    Re: Error creating EF Model with wizard

    The same error occurs with the latest beta as well...

  • 10-01-2014 11:16 PM In reply to

    Re: Error creating EF Model with wizard

    Looking at the code it looks like it might be that SharpDevelop cannot find some information from the mapping file (.msl). 

    What happens is that SharpDevelop runs the EdmGen.exe application and then reads in the output files, one of which is a mapping file.

    The mapping file is read and if certain elements are missing a null is returned which will cause the NullReferenceException you are seeing.

    If you can debug SharpDevelop you can probably see what is happening. How to fix it is another question.

     

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.