Share via


How to: Deploy Content and Resource Items

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

Content and resource items in a LightSwitch project are not deployed with the application by default. You can deploy these items by changing some properties for the file.

Note

Content and resource items should only be deployed for desktop clients. Web clients cannot access external resources.

To add content or resource items

  1. In Solution Explorer, open the context menu for the DesktopClient node and choose Add Existing Item.

  2. In the Add Existing Item – DesktopClient dialog box, locate the content or resource that you wish to add, and then choose the Add button.

    The file is added beneath the Client node.

To deploy content or resource items

  1. In Solution Explorer, expand the DesktopClient node and choose the file that you wish to deploy.

  2. In the Properties window, choose the Build Action property drop-down list and choose Content.

  3. Select the Copy to Output Directory property drop-down list and choose Copy Always.

    The file will be deployed with your application.

See Also

Deploying LightSwitch Applications
Deployment: Distributing and Maintaining Your Application