1

Closed

NRE in the designer when double clicking on an edmx project file that is not a valid xml file

description

  1. Create a text file (can be empty) and change an extension to edmx
  2. Add the file to the project
  3. Attach a debugger and set break when a (CLR) exception is thrown
  4. Any time you double click the "edmx" file in your project a NRE will be thrown.
  5. A dialog box pops-up saying "The operation could not be completed. Invalid Pointer."
Stack trace:
   at Microsoft.Data.Entity.Design.Model.EntityDesignArtifact.GetRootNamespace()
   at Microsoft.Data.Entity.Design.Model.EntityDesignArtifact.DetermineIfArtifactIsVersionSafe()
   at Microsoft.Data.Entity.Design.VisualStudio.Model.VSArtifact.DetermineIfArtifactIsVersionSafe()
   at Microsoft.Data.Entity.Design.Model.EntityDesignArtifact.DetermineIfArtifactIsDesignerSafe()
   at Microsoft.Data.Entity.Design.VisualStudio.Model.VSArtifact.DetermineIfArtifactIsDesignerSafe()
   at Microsoft.Data.Entity.Design.Model.EFArtifact.get_IsDesignerSafe()
   at Microsoft.Data.Entity.Design.EntityDesigner.CustomSerializer.EntityModelToDslModelTranslatorStrategy.TranslateModelToDslModel(IModelObject modelElement, Partition partition)
   at Microsoft.Data.Tools.Dsl.ModelTranslator.ModelTranslator`1.TranslateModelToDslModel(IModelObject modelElement, Partition partition)
   at Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignSerializationHelper.LoadModel(SerializationResult serializationResult, Partition partition, String fileName, ISchemaResolver schemaResolver, ValidationController validationController, ISerializerLocator serializerLocator)
   at Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignSerializationHelper.LoadModelAndDiagram(SerializationResult serializationResult, Partition modelPartition, String modelFileName, Partition diagramPartition, String diagramFileName, ISchemaResolver schemaResolver, ValidationController validationController, ISerializerLocator serializerLocator)
   at Microsoft.Data.Entity.Design.Package.MicrosoftDataEntityDesignDocDataBase.Load(String fileName, Boolean isReload)
   at Microsoft.VisualStudio.Modeling.Shell.DocData.LoadDocData(String fileName, Boolean isReload)
   at Microsoft.VisualStudio.Modeling.Shell.ModelingDocData.LoadDocData(String fileName, Boolean isReload)
   at Microsoft.Data.Entity.Design.Package.MicrosoftDataEntityDesignDocData.LoadDocData(String fileName, Boolean isReload)
   at Microsoft.VisualStudio.Modeling.Shell.DocData.LoadDocData(String fileName)
Source:

EntityDesignArtifact the XDocument was not loaded because the file is not valid Xml but then we want to get the namespace of the document element like this:
        internal XNamespace GetRootNamespace()
        {
            return this.XDocument.Root.Name.Namespace;
        }
the Root is null and therefore Root.Name causes the NRE
Closed Sep 27, 2013 at 6:21 PM by RoMiller
EF Team Triage: As we start to plan the releases that follow EF6 we are doing a large triage effort on our backlog of bugs, features and tasks. Our aim is to have our backlog be a realistic representation of what we (or our contributors) may add to EF in the future.
 
This reduces the number of issues we need to sift thru as we plan each release. For example, coming into the planning for the set of releases after EF6 we had 600+ items on the backlog. A large number of these items are very low priority and will realistically never be addressed.
 
As a result of this we are closing a number of items as “Won’t Fix”. These items fall into one of the following buckets:
  • Items that are either low priority or expensive to implement and we don’t believe provide enough benefit to outweigh the cost of implementing (given that time spent implementing them would detract from implementing other features).
  • Items created by a member of the EF Team that we have not seen customers asking for and we don’t believe would provide significant benefit to customers.
  • Bugs that only manifest in corner cases and have workarounds.
     
    These decisions are not final, if you disagree with this resolution for an item feel free to let us know.

comments