none
Entity Framework 4.2 POCOs RRS feed

  • Question

  • After installing EF 4.2 I can no longer chose POCO as my code generator item.

     

    Any input appreciated...

     

    EDIT: Forgot to say I have set Target Framwork to: Microsoft Entity FrameWork June 2011 CTP to be able to have enums directly in my model.


    • Edited by p19101 Friday, November 4, 2011 1:41 PM
    Friday, November 4, 2011 12:55 PM

Answers

  • Hi p19101,

    I think your problem relates to June 2011 CTP, you can refer readme here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26660 , it will ok after your uninstall it.

    ---------------------------

    We recommend installing the Microsoft Entity Framework and SQL Server Tools for Data Framework June 2011 CTP in a non-production environment to avoid any risk associated with installing and uninstalling pre-release software.

    If the SQL Server Tools for Data Framework CTP is uninstalled, existing functionality installed with Visual Studio 2010 (such as the Entity Designer) will no longer be available.

    Solution

    1. Locate the Visual Studio 2010 installation DVD and insert it into your computer. If you are using an Express SKU of Visual Studio and don’t have the installation media, you can obtain new media here

    2. Launch an administrative-level command prompt and execute one of the following commands. These commands restore versions of the EF Tools files that were initially shipped with Visual Studio 2010.

      With Ultimate, Pro, or other non-Express SKUs:
      [DVD drive letter]:\WCU\EFTools\ADONETEntityFrameworkTools_enu.msi USING_EXUIH=1

      With C# Express, VB Express, and Visual Web Developer Express SKUs:
      [DVD drive letter]:\[VBExpress, VCSExpress, or VWDExpress]\WCU\EFTools\ADONETEntityFrameworkTools_enu.msi USING_EXUIH=1

    3. To update the EF Tools with what shipped with Visual Studio Service Pack 1, there are two options:

      • To run an update only for EF Tools, create a DVD with Visual Studio Service Pack 1 and execute the following command from an administrative-level command prompt. This update will only take a few minutes to complete.

        msiexec /update [DVD drive letter]:\VS10sp1-KB983509.msp /package {14DD7530-CCD2-3798-B37D-3839ED6A441C}

      • To avoid creating a DVD, reapply SP1. Launch the Uninstall/Change programs applet in the Control Panel, double-click on Microsoft Visual Studio 2010 Service Pack 1, and then choose the option to “Reapply Microsoft Visual Studio Service Pack 1.” This approach will take longer since all of SP1 will be applied, not just the EF Tools file updates.

    ---------------------------

    Have a nice day.


    Alan Chen[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.

    Monday, November 7, 2011 7:02 AM
    Moderator
  • This is a very commonly reported issue.  The bottom line is you have to make a choice for now...either you can have everything included in the June CTP (enums, TVF's, TPT query improvements, spatial data types, etc.) OR everything that's come out since then (SQL migrations, 4.2, etc.) but unfortunately you can't have both yet.  The June CTP involves changes to the core framework (e.g. the System.Data assembly itself) which can only be changed as part of a new version of .NET (hence the reason for that funky target framework approach to work around the many problems they had trying to get a preview out).  Long story short, what that means is we're going to have to wait for .NET 4.5 to come out before we get the stuff from the June CTP but they will continue to update the rest of Entity Framework (the DbContext API, etc.) out-of-band from the core .NET framework.  The ADO.NET Team Blog and the Entity Framework Design Blog (as well as some of the individual blogs from folks on that team like Arthur Vickers) go into great detail on these issues.

    Sorry to be the bearer of bad news...

    -Brian

    Thursday, November 10, 2011 9:59 PM

All replies

  • Hi p19101,

    I think your problem relates to June 2011 CTP, you can refer readme here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26660 , it will ok after your uninstall it.

    ---------------------------

    We recommend installing the Microsoft Entity Framework and SQL Server Tools for Data Framework June 2011 CTP in a non-production environment to avoid any risk associated with installing and uninstalling pre-release software.

    If the SQL Server Tools for Data Framework CTP is uninstalled, existing functionality installed with Visual Studio 2010 (such as the Entity Designer) will no longer be available.

    Solution

    1. Locate the Visual Studio 2010 installation DVD and insert it into your computer. If you are using an Express SKU of Visual Studio and don’t have the installation media, you can obtain new media here

    2. Launch an administrative-level command prompt and execute one of the following commands. These commands restore versions of the EF Tools files that were initially shipped with Visual Studio 2010.

      With Ultimate, Pro, or other non-Express SKUs:
      [DVD drive letter]:\WCU\EFTools\ADONETEntityFrameworkTools_enu.msi USING_EXUIH=1

      With C# Express, VB Express, and Visual Web Developer Express SKUs:
      [DVD drive letter]:\[VBExpress, VCSExpress, or VWDExpress]\WCU\EFTools\ADONETEntityFrameworkTools_enu.msi USING_EXUIH=1

    3. To update the EF Tools with what shipped with Visual Studio Service Pack 1, there are two options:

      • To run an update only for EF Tools, create a DVD with Visual Studio Service Pack 1 and execute the following command from an administrative-level command prompt. This update will only take a few minutes to complete.

        msiexec /update [DVD drive letter]:\VS10sp1-KB983509.msp /package {14DD7530-CCD2-3798-B37D-3839ED6A441C}

      • To avoid creating a DVD, reapply SP1. Launch the Uninstall/Change programs applet in the Control Panel, double-click on Microsoft Visual Studio 2010 Service Pack 1, and then choose the option to “Reapply Microsoft Visual Studio Service Pack 1.” This approach will take longer since all of SP1 will be applied, not just the EF Tools file updates.

    ---------------------------

    Have a nice day.


    Alan Chen[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.

    Monday, November 7, 2011 7:02 AM
    Moderator
  • This is a very commonly reported issue.  The bottom line is you have to make a choice for now...either you can have everything included in the June CTP (enums, TVF's, TPT query improvements, spatial data types, etc.) OR everything that's come out since then (SQL migrations, 4.2, etc.) but unfortunately you can't have both yet.  The June CTP involves changes to the core framework (e.g. the System.Data assembly itself) which can only be changed as part of a new version of .NET (hence the reason for that funky target framework approach to work around the many problems they had trying to get a preview out).  Long story short, what that means is we're going to have to wait for .NET 4.5 to come out before we get the stuff from the June CTP but they will continue to update the rest of Entity Framework (the DbContext API, etc.) out-of-band from the core .NET framework.  The ADO.NET Team Blog and the Entity Framework Design Blog (as well as some of the individual blogs from folks on that team like Arthur Vickers) go into great detail on these issues.

    Sorry to be the bearer of bad news...

    -Brian

    Thursday, November 10, 2011 9:59 PM