<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Error in model generation (code first)</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Error in model generation (code first)</description>
  <pubDate>Fri, 10 Apr 2026 20:24:43 -700</pubDate>
  <lastBuildDate>Wed, 26 Sep 2012 05:05:11 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3649</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Error in model generation (code first) : The inner execption is nullThe...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14606#14606</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 26-Sep-2012 at 5:05am<br /><br />The inner execption is null<div><br></div><div>The thing is if it was a recomposition issue I should be able to use the model, few second after the error, once the recomposition is done &nbsp;right ? because if I navigate to another screen which use the same model I will still get the same error, not matter how long I wait before to navigate.</div><div>That would means the error is more certainly because of Postsharp.</div><div><br></div><div>But, if I reference the same model in the silverlight Application it works so I am confused to what is the real cause.</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 26 Sep 2012 05:05:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14606#14606</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :   Walid,The error message about...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14602#14602</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 11:05pm<br /><br />Walid,<div>The error message about the missing constructor is missleading here. What's actually going on is that the EntityManager fails to instantiate. I can tell that from the following error:</div><div>&nbsp;</div><div><font face="Courier New">Unable to get metadata for xxx.Commun.Domain.Entities.News. Make sure it is a valid entity type or POCO type with a KeyAttribute</font></div><div>&nbsp;</div><div>What does the inner exception say?</div><div>&nbsp;</div><div>I see these errors primarly if PostSharp didn't do it's job, but maybe in this case it has something to do with the xap loading. I did test xap loading, but I don't remember if I tested it with a CF domain model in the dynamic xap. I have to put together a small repro and see If I get any issues.</div><div>&nbsp;</div><div>Sorry, you are having these issues. We appreciate you attempting this migration. With a beta product there are bound to be issues.</div>]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 23:05:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14602#14602</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : I wasn&amp;#039;t sure if it was in...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14598#14598</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 5:00pm<br /><br />I wasn't sure if it was in the XAPLoader too so I did rewrite it without yield return.<br /><br />Same problem.<br /><br />I then tried to directly use the AddXapAsync method from cocktail and same problem. Below the code I use.<br />The ActivateWorkspaceAsync method instantiate the view and navigate to it thru Cocktail Navigator service.<br /><br />ExecuteAsync() is bind to the click event of a button.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public async overide Task ExecuteAsync()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  await Composition.AddXapAsync("xxx.Commun.Screens.xap");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  await ActivateWorkspaceAsync("xxx.Commun.Screens.ViewModels.News.NewsWorkspaceViewModel, xxx.Commun.Screens, Version=1.0.0.0");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (Exception e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ErrorFns.HandleError(e);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />Maybe super marcel will come to the rescue ... <br /><br /><br />Do you plan to provide new beta builds of devforce regulary thru nuget ?<br /><br />]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 17:00:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14598#14598</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :   I&amp;#039;m afraid we&amp;#039;ll...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14597#14597</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 4:50pm<br /><br />I'm afraid we'll need Marcel's help with this, since I'm not familiar with Cocktail.&nbsp; <div>&nbsp;</div><div>We did make composition-related changes in both DevForce and Cocktail in the 2012 beta release, but based on this error I don't know whether the problem is there, or in the XapLoader I see in the sample you sent.&nbsp; Until DevForce has fired the Recomposed event the newly loaded entity types won't be available, and the lack of metadata for these entities&nbsp;could cause an EntityManager constructor to fail.</div>]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 16:50:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14597#14597</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : I didn&amp;#039;t say the 3 models...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14595#14595</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 2:04pm<br /><br />I didn't say the 3 models where dynamically loaded in différents xap and not the Security model.<div>If I set a reference to those model on the appplication it works.</div><div><br></div><div>Looks like there is a recomposition issue. Maybe something is broken on my part with the mix of yield return and Task.</div><div><br></div>]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 14:04:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14595#14595</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :    I will try the Ignore()...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14594#14594</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 1:42pm<br /><br /><div>I will try the Ignore() once I get the domain working. Actually only the Security model works, the 3 others aren't and all get the same error :</div><div><br></div><div><div><div><b><font color="#ff0000">Unable to create an instance of EntityManager: CommunEntities. Required constructor not found. Please add the following constructor: public CommunEntities(IdeaBlade.EntityModel.EntityManagerContext).</font></b></div></div></div><div><br></div><div>Each entityManager owns this constructor I you can see in the model I sent you.</div><div>What could cause this error ? everything was working in previous version.</div><div><br></div><div>In the Log, the domain assemblies are probed on the server.</div><div>Probe Assemblies: xxx.Common.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: <b>xxx.Commun.Domain</b>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: <b>xxx.Security</b>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&nbsp;</div><div><br></div><div>I can see the log when it instanciate the security domain :</div><div>Metadata file 'xxx.Security.xxxDBSecurity.ibmmx' loaded from assembly 'xxx.Security, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'&nbsp;</div><div><br></div><div>but nothing about the xxx.Commun.Domain model I currently try to use.</div><div><br></div><div><br></div><div>below the full error message :</div><div><br></div><div><font face="Courier New, Courier, mono">La composition a produit une seule erreur de composition. La cause initiale est fournie ci-après. Pour plus d'informations, passez en revue la propriété CompositionException.Errors.</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">1) Unable to get metadata for xxx.Commun.Domain.Entities.News. Make sure it is a valid entity type or POCO type with a KeyAttribute</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">Résultat : Unable to initialize EntityManager</font></div><div><font face="Courier New, Courier, mono">Unable to get metadata for xxx.Commun.Domain.Entities.News. Make sure it is a valid entity type or POCO type with a KeyAttribute</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">Résultat : Une exception a été levée par la cible d'un appel.</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">Résultat : Unable to create an instance of EntityManager: CommunEntities. Required constructor not found. Please add the following constructor: public CommunEntities(IdeaBlade.EntityModel.EntityManagerContext).</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">Résultat : Une exception s'est produite lors de la tentative de création d'une instance de type xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork.</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">Résultat : Impossible d'activer le composant 'xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork'.</font></div><div><font face="Courier New, Courier, mono">Élément : xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork --&gt; &nbsp;xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork --&gt; &nbsp;AssemblyCatalog (Assembly="xxx.Commun.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">Résultat : Impossible d'obtenir l'exportation 'xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork (ContractName="xxx.Commun.Services.UnitsOfWork.ICommunUnitOfWork")' du composant 'xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork'.</font></div><div><font face="Courier New, Courier, mono">Élément : xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork (ContractName="xxx.Commun.Services.UnitsOfWork.ICommunUnitOfWork") --&gt; &nbsp;xxx.Commun.Services.UnitsOfWork.CommunUnitOfWork --&gt; &nbsp;AssemblyCatalog (Assembly="xxx.Commun.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")</font></div><div><font face="Courier New, Courier, mono">La composition a produit une seule erreur de composition. La cause initiale est fournie ci-après. Pour plus d'informations, passez en revue la propriété CompositionException.Errors.</font></div><div><br></div><div><br></div><div>This migration is really a pain in the ass, I started saturday and I still don't have a running application ;(</div><div><br></div><div><br></div><div><br></div><span style="font-size:10px"><br /><br />Edited by Walid - 25-Sep-2012 at 1:55pm</span>]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 13:42:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14594#14594</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :     That looks like the bug....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14585#14585</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 10:21am<br /><br /><p>That looks like the bug.&nbsp; I saw that mentioned on StackOverflow too, but we're not interested in modifying the EntityFramework source code, at least not right now.&nbsp;&nbsp;<br></p><div>I think you can work around the issue by using the Ignore method <strong>instead</strong> of the NotMapped attribute.&nbsp; I was able to get the model built when I added the following to TiersConfiguration:</div><p>Ignore(p =&gt; p.AdressePrincipale);<br>Ignore(p =&gt; p.TelephonePrincipal);</p><p>.. also making sure to remove the NotMapped attribute from these properties.</p>]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 10:21:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14585#14585</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : Found on codeplex there is a bug...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14575#14575</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 3:31am<br /><br />Found on codeplex there is a bug about NotMapped and inheritance but regarding the suggested fix I am not able to say if it is related or not.<br /><br />http://entityframework.codeplex.com/workitem/481?FocusElement=CommentTextBox]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 03:31:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14575#14575</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : sent you a link to download the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14574#14574</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 25-Sep-2012 at 2:18am<br /><br />sent you a link to download the solution in PM<br /><br />Thanks]]>
   </description>
   <pubDate>Tue, 25 Sep 2012 02:18:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14574#14574</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :   I&amp;#039;m not able to reproduce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14563#14563</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 2:12pm<br /><br />I'm not able to reproduce the NotMapped issue, although it could be that my model is too simplistic.<div>&nbsp;</div><div>One other thing to look at is whether you have an older EntityFramework assembly in the Global Assembly Cache, and also ensure that the EntityFramework.dll is in the bin folder of the application project.</div><div>&nbsp;</div><div>If that looks good, would you be willing to send us more of your model code?&nbsp; I'm specifically interested in whether you have a DbContext defined, the full definitions of "Personne", "Adresse" and "Professionel", and what flavor of inheritance you're using.&nbsp; The EntityManager, and DbContext if present, would help too.&nbsp; You can send either to me via a PM, or to IdeaBladeSupport.</div>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 14:12:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14563#14563</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : I found out for the null reference...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14559#14559</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 12:22pm<br /><br />I found out for the null reference exception.<br /><br />in one entity class I had this delcaration :<br /><br />&#091;DataMember&#093;<br />public TypePiece? TypePiece { get; set; } <br /><br />where TypePiece is an enumeration<br /><br />The correct sentence is<br /><br />&#091;DataMember&#093;<br />public int? TypePiece { get; set; } <br /><br /><br />Pretty hard to find, specially since this model didn't throw any exception with EF 4.3<br /><br /><br />Only the &#091;NotMapped&#093; issue is left for now.<br />]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 12:22:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14559#14559</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : Yes I found those post too. The...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14555#14555</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 11:22am<br /><br />Yes I found those post too.<br />The problem in most of them was that in EF5 & .NET4.5 the NotMappedAttribut is in the namespace System.ComponentModel.DataAnnotations.Schema while it is in System.ComponentModel.DataAnnotations while targetting .NET4<br /><br />When I made my migration I was aware of those problems around EF5 so I targeted .NET4.5 prior upgrading to EF5.<br />The NotMapped attribut correctly use the good schema namespace.<br /><br />The weird part is in my base class I have a NotMapped attribut on the EntityAspect property and this one doesn't cause any trouble.<br />I checked all the reference in the project (I even did compare with the reference on the Temphire model) and nothing is different.<br /><br />So right now I am stuck :(<br /><br />For the null reference exception I am still investigating. It might be another model issue because if I comment all my EntityTypeConfiguration I can compile and generate a .ibmmx (of course this file isn't good as it miss some configuration).<br /><br />]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 11:22:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14555#14555</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :   Regarding the issue with applying...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14552#14552</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 11:05am<br /><br />Regarding the issue with applying the Code First package to your base class assembly - we will need to look at making this cleaner.&nbsp; For now, removing the .cf file will ensure that the DevForce metadata deploy task doesn't kick off.&nbsp; Instead of installing the package, though, you can just reference the IdeaBlade.EntityModel.Aop assembly (by browsing to the packages folder holding the assemblies).<div>&nbsp;</div><div>We haven't seen this NullReferenceException issue, and as you say the error message doesn't help.&nbsp; Is the model project in which you get this error the one referencing the assembly containing the base class?&nbsp; You mentioned that you created an empty EntityManager to work around the problem building the assembly holding the base&nbsp;class, so one thing to try would be removing this EM.</div><div>&nbsp;</div><div>Regarding the attribute problems you mention in your first post, these are due to EF 5 data annotation changes.&nbsp;&nbsp; We hadn't seen these issues before now, but some quick googling shows that others are having this issue with using NotMapped when inheritance is involved.&nbsp; We don't have a workaround to suggest right now, but as soon as we do we'll let you know.</div>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 11:05:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14552#14552</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : Well it contains the bases class...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14550#14550</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 8:04am<br /><br />Well it contains the bases class of my entities shared with all my domains.<div>So I need access to Aop for the ProvideEntityAspect attribut<br><div><br></div><div><br></div><div>Any idea what/where I should look for to fix the error I did mention earlier ?&nbsp;</div><div><b style="color: rgb255, 0, 0; : rgb251, 251, 253; ">error : An error occurred during metadata generation and a metadata file could not be created. &nbsp;Error: La référence d'objet n'est pas définie à une instance d'un objet.</b></div><div>The error message doesn't give me any indication on what to do.</div><div><br></div></div>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 08:04:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14550#14550</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :  Originally posted by Walid Originally...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14546#14546</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 4:04am<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Walid</strong></em><br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Walid</strong></em><br /><br />&nbsp;<DIV>When I try to build I get this error when it was working in the previous with the 6.1.8.</DIV><DIV><BR></DIV><DIV><DIV><B><FONT color=#ff0000>Erreur<SPAN style="WHITE-SPACE: pre" ="apple-tab-span"> </SPAN>1<SPAN style="WHITE-SPACE: pre" ="apple-tab-span"> </SPAN>CodeFirst entities were found in this assembly, but an EntityManager or DbContext was not. &nbsp;You must define a container for these entities in this assembly.<SPAN style="WHITE-SPACE: pre" ="apple-tab-span"> </SPAN>xxx.Common.Domain</FONT></B></DIV></DIV><DIV><BR></DIV><DIV><BR></DIV><DIV>This assembly doesn't contains any entitymanager or DBContext because it hosts the base class (all abstract) for all the others domains assemblies.</DIV><DIV><BR></DIV><DIV>Is it now mandatory to create a DBContext or entitymanager in any assembly hosting a code first class even if all are abstract &nbsp;?&nbsp;</DIV><DIV>I created an internal empty entityManager to be able to continue the migration but I feel I shouldn't have to.</DIV><DIV><BR></DIV></td></tr></table> <DIV><BR></DIV><DIV>For this issue it was related to this one&nbsp;<a href="http://www.ideablade.com/forum/forum_posts.asp?TID=3651&amp;title=nuget-packate-server-add-extra-entry-to-webc&#111;nfig" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=3651&amp;title=nuget-packate-server-add-extra-entry-to-webconfig</A></DIV><DIV>Like for the global.asax, the server package created a Devforce.cf file that I didn't notice before.</DIV><DIV><BR></DIV><DIV>Removing this file fixed it.</DIV><DIV><BR></DIV></td></tr></table> <DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>The DevForce.cf file gets added by the Code-First package. You shouldn't install the Code-First package to a project that doesn't contain model classes.</DIV>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 04:04:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14546#14546</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :   Originally posted by mgoodWalid, Did...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14541#14541</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 3:33am<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by mgood</strong></em><br /><br />Walid,<div>Did you completely uninstall DF 2010? Code-First builds currently do not work with DF 2010 and DF 2012 installed side-by-side.</div></td></tr></table><div><br></div><div>I am doing the migration on a clean VM under Win8 where I only installed VS2012 and devforce/cocktail thru nuget</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 03:33:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14541#14541</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :   Originally posted by WalidWhen...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14540#14540</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 3:30am<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Walid</strong></em><br /><br />&nbsp;<div>When I try to build I get this error when it was working in the previous with the 6.1.8.</div><div><br></div><div><div><b><font color="#ff0000">Erreur<span ="apple-tab-span"="" style="white-space:pre">	</span>1<span ="apple-tab-span"="" style="white-space:pre">	</span>CodeFirst entities were found in this assembly, but an EntityManager or DbContext was not. &nbsp;You must define a container for these entities in this assembly.<span ="apple-tab-span"="" style="white-space:pre">	</span>xxx.Common.Domain</font></b></div></div><div><br></div><div><br></div><div>This assembly doesn't contains any entitymanager or DBContext because it hosts the base class (all abstract) for all the others domains assemblies.</div><div><br></div><div>Is it now mandatory to create a DBContext or entitymanager in any assembly hosting a code first class even if all are abstract &nbsp;?&nbsp;</div><div>I created an internal empty entityManager to be able to continue the migration but I feel I shouldn't have to.</div><div><br></div></td></tr></table><div><br></div><div>For this issue it was related to this one&nbsp;<a href="http://www.ideablade.com/forum/forum_posts.asp?TID=3651&amp;title=nuget-packate-server-add-extra-entry-to-webc&#111;nfig" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=3651&amp;title=nuget-packate-server-add-extra-entry-to-webconfig</a></div><div>Like for the global.asax, the server package created a Devforce.cf file that I didn't notice before.</div><div><br></div><div>Removing this file fixed it.</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 03:30:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14540#14540</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : Walid, Did you completely uninstall...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14539#14539</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 3:27am<br /><br />Walid,<DIV>Did you completely uninstall DF 2010? Code-First builds currently do not work with DF 2010 and DF 2012 installed side-by-side.</DIV>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 03:27:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14539#14539</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :  Another error which doesn&amp;#039;t...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14537#14537</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 24-Sep-2012 at 2:56am<br /><br />Another error which doesn't exist in 6.1.8 :<div><br></div><div><br></div><div><div>Tâche "EntityModelMetadataDeploy"</div><div>&nbsp; In EntityModelMetadataDeploy. &nbsp;Parms: &nbsp;Assembly='C:\Dev\Dev\MigrationDFandCocktail2012\Company\Domains\Management\Company.Management.Domain\bin\Debug\Company.Management.Domain.dll', TargetFolder='C:\Dev\Dev\MigrationDFandCocktail2012\Company\Domains\Management\Company.Management.Domain'</div><div>&nbsp; IdeaBlade.VisualStudio.Build.Tasks, Version=7.0.0.0, Culture=neutral, PublicKeyToken=287b5094865421c0</div><div>&nbsp; Trying model metadata discovery for C:\Dev\Dev\MigrationDFandCocktail2012\Company\Domains\Management\Company.Management.Domain\bin\Debug\Company.Management.Domain.dll</div><div>&nbsp; Creating metadata from DbContext 'ManagementDbContext'</div><div>&nbsp; Searching for connectionString named 'CompanyDBManagement': not found</div><div>&nbsp; A connection string was not found but metadata discovery has detected that the DefaultConnectionFactory is overridden.</div><div><font color="#ff0000"><b>C:\Dev\Dev\MigrationDFandCocktail2012\Company\packages\IdeaBlade.DevForce.Aop.7.0.0-beta1\tools\IdeaBlade.DevForce.Common.targets(110,5): error : An error occurred during metadata generation and a metadata file could not be created. &nbsp;Error: La référence d'objet n'est pas définie à une instance d'un objet.</b></font></div><div>&nbsp; EntityModelMetadataDeploy: No metadata files generated.</div><div>Exécution de la tâche "EntityModelMetadataDeploy" terminée -- ÉCHEC.</div></div><div><br></div><div>I first though the problem could come from the connection string but here is the log from model which build :</div><div><br></div><div><div>Creating metadata from DbContext 'StockDbContext'</div><div>&nbsp; Searching for connectionString named 'CompanyDBStock': not found</div><div>&nbsp; A connection string was not found but metadata discovery has detected that the DefaultConnectionFactory is overridden.</div><div>&nbsp; Model metadata created for&nbsp;CompanyDBStock</div></div><div><div>&nbsp; Model metadata for WSoftDBStock.ibmmx is unchanged</div><div>Exécution de la tâche "EntityModelMetadataDeploy" terminée.</div></div><div><br></div><div><br><div><br ="Apple-interchange-newline">Any clue what could be the problem ?</div></div><span style="font-size:10px"><br /><br />Edited by Walid - 24-Sep-2012 at 3:22am</span>]]>
   </description>
   <pubDate>Mon, 24 Sep 2012 02:56:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14537#14537</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) : Updated </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14518#14518</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 22-Sep-2012 at 2:25pm<br /><br />Updated]]>
   </description>
   <pubDate>Sat, 22 Sep 2012 14:25:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14518#14518</guid>
  </item> 
  <item>
   <title>Error in model generation (code first) :   Hi,I am trying to migrate...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14515#14515</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3649<br /><strong>Posted:</strong> 22-Sep-2012 at 1:05pm<br /><br />Hi,<div><br></div><div>I am trying to migrate from 2010 to 2012.</div><div><br></div><div>When I try to build I get this error when it was working in the previous with the 6.1.8.</div><div><br></div><div><div><b><font color="#ff0000">Erreur<span ="apple-tab-span"="" style="white-space:pre">	</span>1<span ="apple-tab-span"="" style="white-space:pre">	</span>CodeFirst entities were found in this assembly, but an EntityManager or DbContext was not. &nbsp;You must define a container for these entities in this assembly.<span ="apple-tab-span"="" style="white-space:pre">	</span>xxx.Common.Domain</font></b></div></div><div><br></div><div><br></div><div>This assembly doesn't contains any entitymanager or DBContext because it hosts the base class (all abstract) for all the others domains assemblies.</div><div><br></div><div>Is it now mandatory to create a DBContext or entitymanager in any assembly hosting a code first class even if all are abstract &nbsp;?&nbsp;</div><div>I created an internal empty entityManager to be able to continue the migration but I feel I shouldn't have to.</div><div><br></div><div><br></div><div>Another issue (also working in 6.1.8) &nbsp;:</div><div><div><br></div><div><font color="#ff0000"><b>Erreur<span ="Apple-tab-span" style="white-space:pre">	</span>4<span ="Apple-tab-span" style="white-space:pre">	</span>An error occurred during metadata generation and a metadata file could not be created. &nbsp;Error: You cannot use Ignore method on the property 'AdressPrincipal' on type 'xxx.Global.Domain.Entities.Professional' because this type inherits from the type 'xxx.Global.Domain.Entities.Person' where this property is mapped. To exclude this property from your model, use NotMappedAttribute or Ignore method on the base type.<span ="Apple-tab-span" style="white-space:pre">	</span>xxx.Global.Domain</b></font></div></div><div><br></div><div>I already have the NotMapped attribut on the property AdressPrincipal (below the code)</div><div><br></div><div><div>&nbsp; &nbsp; &#091;DataContract(IsReference = true)&#093;</div><div>&nbsp; &nbsp; public abstract class Personne : BaseAuditEntity</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &#091;DataMember&#093;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public int Id { get; set; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; ...</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <b>&#091;NotMapped&#093;</b></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public Adresse AdressPrincipal {... }</div><div>&nbsp; &nbsp; }</div><div><br></div></div><div><div>&nbsp; &nbsp; public class Professionel : Person</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; ...</div><div>&nbsp; &nbsp; }</div></div><div><br></div><div>I don't know, generaly speaking, if I should put the DataContract attribute on &nbsp;the inherited class if the parent class has it</div><div>Anyway I tried both case and both give this error</div><div><br></div><span style="font-size:10px"><br /><br />Edited by Walid - 22-Sep-2012 at 2:24pm</span>]]>
   </description>
   <pubDate>Sat, 22 Sep 2012 13:05:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3649&amp;PID=14515#14515</guid>
  </item> 
 </channel>
</rss>