Compartir a través de


Create and deploy web resources using the Developer Toolkit

 

Applies To: Dynamics CRM 2013

Web resources are virtual files that are stored in the Microsoft Dynamics CRM database and that you can retrieve by using a unique URL address. More information: Web resources for Microsoft Dynamics CRM 2013.

For the Developer Toolkit, Silverlight (XAP) web resources are handled differently than other web resources because the .xap file is the compiled output of a Silverlight application project that includes many types of files.

In This Topic

Work with Silverlight web resources

Work with other web resources

Work with Silverlight web resources

When you use the New Visual Studio Solution Template for Dynamics CRM 2013 project template option to create a new solution, a Silverlight application project is created. More information: Create a new Developer Toolkit project.

The Developer Toolkit allows for the inclusion of multiple Silverlight application projects. The procedure to add a new Silverlight web resource consists of either adding a new or Silverlight application project or an existing Silverlight XAP file.

Create and deploy a new Silverlight web resource

  1. In the Visual Studio solution explorer, right-click the solution and select Add and then select New Project.

  2. In the Add New Project dialog box, select the Silverlight Application template, specify a name for the project and then click OK.

  3. In the New Silverlight Application dialog box, clear the Host Silverlight application in a new Web site check box, and then click OK.

  4. In the CrmPackage project right-click References and select Add Reference.

  5. In the Add Reference dialog box, select the Projects tab and select the Silverlight application project you created. Click Add to add it to the Selected projects and components list and then click OK.

  6. Right-click the new reference you added in the previous step and select Properties.

  7. Specify the Description, Display Name, and Unique Name properties you want to use when you create the Silverlight web resource.

  8. When you are ready to deploy your Silverlight web resource, right-click the CrmPackage project and select Deploy from the context menu.

Note

When you deploy an update to an existing web resource you must publish customizations before you’ll see the changes in the application.

Add and deploy an existing Silverlight web resource

  1. In the CRMPackage project, right-click the WebResources folder, and then click Add Existing Item.

  2. In the Add Existing Item – CrmPackage dialog box, select the XAP file of the Silverlight applications that you want to add.

  3. In the WebResources folder, right-click the Silverlight application, and then click Properties.

  4. In the Properties, specify the Microsoft Dynamics CRM metadata attributes. This includes the Description, Display Name, Silverlight version, and Unique Name, that you want to use when you create the Silverlight web resource.

  5. To deploy the Silverlight web resource, right-click the CrmPackage project and select Deploy from the shortcut menu.

Add an existing Silverlight web resource to the project

  1. In the CRM Explorer, expand the Web Resources folder and the Silverlight (XAP) to select the Silverlight web resource.

  2. Right-click the Silverlight web resource and select Add to Packaging Project from the shortcut menu.

Work with other web resources

The web resource types other than Silverlight web resources are added to the CrmPackage project.

Create a new web resource

  1. In the CRMPackage project, right-click the WebResources folder and in the shortcut menu select Add and then New Item.

  2. In the Add New Item – CrmPackage dialog box select one of the following file templates:

    • HTML Page

    • Icon File

    • JScript File

    • Style Sheet

    • XML File

    • XSLT File

    Note

    To add PNG, GIF or JPG format image web resources, you must follow these steps To Add an Existing File as a New Web Resource.

  3. Right-click the new web resource you added and select Properties in the shortcut menu.

  4. In Properties, specify the Description, Display Name, and Unique Name properties you want to use when you create the web resource.

Add an existing file as a new web resource

  1. In the CRMPackage project, right-click the WebResources folder and in the shortcut menu select Add, and then select Add Existing Item.

  2. Navigate to the item you want and add it.

The item will be added to a sub folder based on the type of file.

Add an existing web resource to the project

  1. In the CRM Explorer, expand the Web Resources folder and subfolders to select the web resource.

  2. Right-click the web resource and select Add to Packaging Project from the shortcut menu.

Note

When you add an existing web resource to the project, the file name extension is appended to the File Name. If the Unique Name of our web resource already includes the file name extension the Developer Toolkit will still add the file name extension that results in a duplicate file name extension in the name. For example, if your existing web resource unique name is file.js, the file name specified in the CrmPackage will be file.js.js. This doesn’t affect the functionality of the web resource in the solution. You can rename the file if you want to.

See Also

Developer Toolkit for Microsoft Dynamics CRM 2013
Web resources for Microsoft Dynamics CRM 2013
Install or uninstall the Developer Toolkit
Developer toolkit features
Create a new Developer Toolkit project
Deploy a solution using the developer toolkit
Create and deploy plug-ins using the Developer Toolkit
Create and deploy workflow libraries using the Developer Toolkit
Create and deploy XAML workflows using the Developer Toolkit