Deployment Considerations (Entity Framework)

This topic provides information about deploying applications that use the ADO.NET Entity Framework for data access. For more information about the Entity Framework, see Getting Started (Entity Framework).

The Entity Framework provides a set of tools that integrate with and make it easier to develop in Visual Studio. For more information, see Entity Data Model Tools. This topic does not describe how to use specific technologies to deploy an Entity Framework–based application.

Visual Studio provides facilities for distributing and deploying applications, such as ClickOnce deployment. For more information, see Deploying Applications and Components in the Visual Studio documentation.

The following considerations apply when you deploy an application that uses the Entity Framework:

  • The Entity Framework is a component of the .NET Framework starting with the .NET Framework 3.5 Service Pack 1 (SP1). You must ensure that the .NET Framework 3.5 SP1 or a later version is installed when deploying an Entity Framework–based application.

  • When an Entity Data Model (EDM) is generated by the Entity Data Model Wizard, EDM connection strings are created in the application configuration file. By default, model and mapping files are deployed as embedded application resources. Use the Metadata Artifact Processing property of the Entity Designer file to control whether model and mapping files are deployed as embedded resources. For more information, see Deployment Tasks with the Entity Designer.

  • Ensure that the model and mapping files (.csdl, .ssdl, .msl) are deployed with the application and in the location specified by the EDM connection string. For more information, see Connection Strings (Entity Framework).

  • When you embed EDM model and mapping files as application resources, you must recompile and redeploy the application every time the EDM is updated.

  • Because the Entity Framework is a component of the .NET Framework, it can be redistributed with your application as permitted by the .NET Framework license agreement. For more information, see Redistributing the .NET Framework.

See Also

Other Resources

Programming Guide (Entity Framework)