Deployment Considerations (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 ADO.NET 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 a conceptual model is generated by the Entity Data Model Wizard, a connection string is created in the application configuration file. Model and mapping files can be embedded as application resources or they can be copied to the output directory. By default, they are deployed as embedded application resources. Use the Metadata Artifact Processing property of the Entity Designer file to select one of these options. For more information, see How to: Copy Model and Mapping Files to the Output Directory.

• Ensure that the model and mapping information (expressed in conceptual schema definition language (CSDL), store schema definition language (SSDL), and mapping specification language (MSL)) is deployed together with the application and in the location specified by the connection string. For more information, see Connection Strings.

• When you embed model and mapping information as application resources, you must recompile and redeploy the application every time the conceptual model 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.