none
EF 4.1 June CTP seems to break model first database generation RRS feed

  • Question

  • Hi,

    After installing Microsoft Entity Framework June 2011 CTP, I can no longer run the "Generate Database from Model..." function from within the EF designer. It produces the following error:

     

    Inspecting C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\SSDLToSQL10.tt learns that the template uses the method GetAllAssociationSets. This is probably the one defined in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Microsoft.Data.Entity.Design.DatabaseGeneration, which is not part of the CTP release. I assume the cause of my problem is that this dll cannot be used in combination with the CTP release. Is this assumption right? Is there a solution for this issue?

    After deinstalling the CTP release everything works normal again.

    Thanks,

    Merijn

    Tuesday, August 16, 2011 10:40 AM

Answers

  • Hello MDej,

     

    I have couple questions which could greatly help us to identify the issue.

    1. Did you install  EF 4.1 Release Candidate or  EF June 2011 CTP ? They are not the same.

    2. If you installed EF June 2011 CTP, did you also installed Entity Framework Tool CTP update?

    The download link as well as the instruction (I highly recommend reading it the before  proceeding with installation) can be found in the following link:

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26660

     

    Thank you,

    - Alex

     

    • Marked as answer by MdeJ Friday, August 26, 2011 2:52 PM
    Thursday, August 25, 2011 8:26 AM
  • Hi Mdej,

     

    Yes, EF Tool CTP update is required for EF June 2011 CTP. EF Tools and  SQL Server Tools for Data Framework are one and the same.

    We recommend you to install in the following order:

    • Microsoft Entity Framework June 2011 CTP
    • Microsoft Data Services June 2011 CTP
    • Microsoft SQL Server Data Framework Tools June 2011 CTP

    Please let me know how this goes.

     

    Thank you,

     

    Alex

     

    • Proposed as answer by Adi Unnithan Thursday, August 25, 2011 5:28 PM
    • Marked as answer by MdeJ Friday, August 26, 2011 2:52 PM
    Thursday, August 25, 2011 5:07 PM

All replies

  • Hi Merijn;

    Did you change the projects target framework from 4.0 to one of the following, Microsoft Entity Framework June 2011 CTP or Microsoft Entity Framework June 2011 CTP Client Profile as stated in the ReadMe file. From the ReadMe file :

    In order to use the new features of the Entity Framework in Visual Studio, you will need to change your project's target.
    This target framework allows use of the CTP versions of the Entity Framework assemblies in addition to the standard .NET 4.0 RTM assemblies.

    To retarget a C# project:

    1. Right-click the project in the Solution Explorer and choose Properties or select <Project> Properties from the Project menu.
    2. On the Application tab, select Microsoft Entity Framework June 2011 CTP or Microsoft Entity Framework June 2011 CTP Client Profilefrom the Target framework dropdown.
    3. A dialog box will appear indicating that the project needs to be closed and reopened to retarget the project. Choose Yes.

    To retarget a VB.NET project:

    1. Right-click the project in the Solution Explorer and choose Properties or select <Project> Properties from the Project menu.
    2. Select the Compile tab and then the Advanced Compile Options… button on the bottom left of the dialog.
    3. Select Microsoft Entity Framework June 2011 CTP or Microsoft Entity Framework June 2011 CTP Client Profilefrom the Target framework dropdown.
    4. Choose OK.
    5. A dialog box will appear indicating that the project needs to be closed and reopened to retarget the project. Choose Yes. 

     


    Fernando (MCSD)

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    Tuesday, August 16, 2011 1:57 PM
  • Hi Fermando,

    Thanks for your reply.

    Yes, I did exactly that. But that doesn't help.

    Merijn

    Tuesday, August 16, 2011 2:04 PM
  • Hello,

    Have you installed Visual Studio 2010 SP1 on your machine before installed June 2011 CTP? http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/c98bc26a-65f5-425a-af48-dd765519594a

    Thanks,

    Werewolf,


    Just a newbie for everything.
    Friday, August 19, 2011 3:53 AM
  • Hi Werewplf,

    Thanks for your reply.

    Yes, I installed VS2010.SP1.

    BTW I do have this problem also on a freshly installed computer.

    Kind regards,

    Merijn

    Friday, August 19, 2011 6:22 AM
  • Hello,

    I tried install CTP June 2011 on my side, but it's in order. like your description, Microsoft.Data.Entity.Design.DatabaseGeneration this assembly wasn't related to CTP June 2011 onto your machine. IMO, it looks that your question maybe related to Entity Designer Database Generation Power Pack, perhaps you should repair this tool.

    Thanks,

    Werewolf,


    Just a newbie for everything.
    Saturday, August 20, 2011 1:59 PM
  • Hi Werewolf,

    Thanks again for your help.

    But no, I didn't install the Entity Designer Database Generation Power Pack. I installed Dev Studio 2010sp1 on a brand new x64/Window7 laptop. I installed NuGet (this is unrelated but I mention it just to be complete), Silverlight and WCF RIA Services and then I installed EF June CTP. When I uninstall this CTP I can run "generate database from model" from within the entity designer without any problems. When I install the CTP again, I get this exception.

    I've created a new console app solution. Then I added a new entity model. Then, even without adding anything to the empty model, I receive the error when I try to generate a database from the model.

    Does this information give you any ideas?

     

    Best reards,

    Merijn

    • Edited by MdeJ Tuesday, August 23, 2011 1:25 PM
    Monday, August 22, 2011 11:42 AM
  • Hello MdeJ,

    Honestly, I installed June CTP EF installation package on my side. Everything looks OK. I didn't reproduce your question on my side. I suggest you use ProcessMonitor to collect more detailed information to us to analyze your question further. You can get it here. http://technet.microsoft.com/en-us/sysinternals/bb896645 

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 23, 2011 7:32 AM
  • Hi Larcolais,

    Thanks for your help. I also find it strange to happen. It's even more strange that you cannot reproduce it, while I can on two different machines.

    I downloaded ProcessMonitor, but I'm not sure what to look for. Can you maybe give me a hint what (and how) I should look for using that tool?

    Thanks again,

    Merijn

    Tuesday, August 23, 2011 7:59 PM
  • Hello again Merijn,

    I reproduced this issue on the other two machines. Like you said, it works OK after uninstalled June CTP from them. I suggest you submit this feedback into Connect portale site. https://connect.microsoft.com/data/Feedback

    Every feedback submitted will be evaluated carefully by our engineers. If this suggestion is reasonable and other customers have the similar concern on this feature, they will let us know their comments further through that portal. This would be helpful to improve Visual Studio products.

    Please feel free to share the feedback link in your reply, which help other members to find out how the thing are going.

    Please feel free to let us know if you have any concern.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 25, 2011 6:39 AM
  • Thank you for posting this and confirming the repros. The designer team is looking at this. Please feel free to file a Connect issue as Larcolais mentioned (https://connect.microsoft.com/data/Feedback) so that we can track it and please mention any other details that you think would be useful.

    -adi


    Adi Unnithan | Software Design Engineer | SQL Server Developer Tools | Please mark the post as answered if it sufficiently answers your question
    Thursday, August 25, 2011 7:12 AM
  • Hello MDej,

     

    I have couple questions which could greatly help us to identify the issue.

    1. Did you install  EF 4.1 Release Candidate or  EF June 2011 CTP ? They are not the same.

    2. If you installed EF June 2011 CTP, did you also installed Entity Framework Tool CTP update?

    The download link as well as the instruction (I highly recommend reading it the before  proceeding with installation) can be found in the following link:

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26660

     

    Thank you,

    - Alex

     

    • Marked as answer by MdeJ Friday, August 26, 2011 2:52 PM
    Thursday, August 25, 2011 8:26 AM
  • Larcolais, Adi,

    I've submirtted a feedback form about this issue. This is the url: https://connect.microsoft.com/data/feedback/details/685572/ef-4-1-june-ctp-breaks-model-first-database-generation.

    Alex,
    here are the answer to your questions:

    1. I installed EF June 2011 CTP. (After I installed VS2010 SP1)
    2. No, I did not install the Entity Framework Tool CTP update. Is this needed? In the docs I see references to SQL Server Tools for Data Framework, is this the same as EFTools?

    Thank you all for your help.

    Kind regards,

    Merijn

    Thursday, August 25, 2011 10:00 AM
  • Hi Mdej,

     

    Yes, EF Tool CTP update is required for EF June 2011 CTP. EF Tools and  SQL Server Tools for Data Framework are one and the same.

    We recommend you to install in the following order:

    • Microsoft Entity Framework June 2011 CTP
    • Microsoft Data Services June 2011 CTP
    • Microsoft SQL Server Data Framework Tools June 2011 CTP

    Please let me know how this goes.

     

    Thank you,

     

    Alex

     

    • Proposed as answer by Adi Unnithan Thursday, August 25, 2011 5:28 PM
    • Marked as answer by MdeJ Friday, August 26, 2011 2:52 PM
    Thursday, August 25, 2011 5:07 PM
  • Yes, after installing the other two updates it works again.

    Thanks!

     

    Friday, August 26, 2011 2:51 PM
  • I too am having issues creating a data model now.

     

    Also many people having issues with it here:

    http://social.msdn.microsoft.com/Forums/en-US/adonetefx/thread/1aa3d8b7-14e5-4182-b08e-9563cfc737ca/

     

    I've installed sp1 for vs2010.

    I've installed all 3 products in the suggested order:

    1. EF_JUNE_2011_CTP.msi
    2. DS_JUNE_2011_CTP.msi
    3. EFTools.msi

    I've switched the target framework to Entity Framework June 2011 CTP.

    Still same issues, based around "Type Constructor threw an exception"

    Even more unfortunate for me is that I'm unable to uninstall and get back to a working state for my project.

     

    Error Details:

    Error 6 Error 6039: error CS0006: Metadata file 'C:\WINNT\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.2.0.0__b77a5c561934e089\System.Data.Entity.dll' could not be found

    error CS0006: Metadata file 'C:\WINNT\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity.Design\v4.0_4.2.0.0__b77a5c561934e089\System.Data.Entity.Design.dll' could not be found

    Do I need to reinstall the .net 4 framework??

    Any ideas of where I can go from here, this is turning into a bit of a crisis for me. 

    Thanks,

    Mike




    Friday, August 26, 2011 5:32 PM
  • Hi Mike,

    Did you install the CTP bits on Windows XP? Unfortunately, WindowsXP is not a supported OS.

    The following are the requirements:

    System requirement:
    Supported Operating Systems: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

    Other requirements
    Microsoft .NET Framework 4
    Microsoft Visual Studio® 2010 SP1 or Microsoft Visual Web Developer 2010 SP1 Express Edition
    Microsoft Silverlight® 4 SDK and Microsoft Silverlight Tools for Visual Studio 2010 (both optional)

    There is information on how to get back to the Visual Studio 2010 SP1 state in the readme file which can be found in:

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26660

    We apologize for the inconvenience.

    Thank you,

    Alex

     

     

     

    Friday, August 26, 2011 7:19 PM
  • Ya, I'm using XP.

    That would be the reason for my problems.

    I should have read all the details before I went ahead with the install.

    Thanks,

    Mike

    Tuesday, August 30, 2011 10:07 AM
  •  

    You can get errors running Entity Designer Database Generation Power Pack along with Entity Framework Junce 2011 CTP

    It happens because the dll running the workflow for the database sql generation is trying to find the assembly Microsoft.Data.Entity.Design.DatabaseGeneration with version 10.0.0.0. (specific version reference) if you have entity framework june 2011 CTP installed, then you have the version 10.6.0.0. and it gives you an error.

    Workaround: You can do a binding redirect on the visual studio exe ( devenv.exe.config) to force the generation workflow to use the new dll : Add this under dependentassembly tag: <assemblyIdentity name="Microsoft.Data.Entity.Design.DatabaseGeneration" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="10.0.0.0" newVersion="10.6.0.0"/>

     

    It seems work ok but I haven't fully tested it.

    Friday, November 18, 2011 8:27 PM