How to: Deploy Content and Resource Items

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.

NoteNote

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

To add content or resource items

  1. On the Solution Explorer toolbar, click the Logical View dropdown list and select File View.

  2. Select the Client node, and then on the Project menu click Add Existing Item.

  3. In the Add Existing Item – Client dialog box, locate the content or resource that you wish to add, and then click Add.

    The file is added beneath the Client node.

To deploy content or resource items

  1. On the Solution Explorer toolbar, click the Logical View dropdown list and select File View.

  2. Expand the Client node and select the file that you wish to deploy.

  3. In the Properties window, select the Build Action property and set it to Content.

  4. Select the Copy to Output Directory property and set it to Copy Always.

    The file will be deployed with your application.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft