Compartilhar via


Building and deploying the Silverlight component

After most of the code has been added to the Silverlight component for your Visual Studio Tools integration, you will want to build and deploy it so it can be tested. The build process creates a .xap file that you will deploy to a web client installation.

Web client extension information

In the Microsoft Dynamics GP web client, you can view information about the Silverlight components that have been loaded. To do this, choose About Microsoft Dynamics GP from the Help menu. In the Additional menu for the About Box, choose About Web Client. A window listing the client extensions will be displayed.

We recommend that you add the ExtensionInformation attribute to the GPWCAddIn class for the Silverlight component of your integration to configure the name that is displayed in this window. The following C# example shows how the ExtensionInformation attribute is used to specify the name for the Silverlight component of the Salesperson Analysis sample:

namespace SalespersonAnalysisSL
{
    [ExtensionInformation("Salesperson Analysis")]
    public class GPWCAddIn : IWCCustomAddIn
    {

Optimizing the .xap file size

When you build the Silverlight component (.xap file) for your Visual Studio Tools integration, all of the assemblies that you referenced in your project that don't have the CopyLocal property set to False will be included in the .xap file. You can optimize the size of the .xap file by not include assemblies that are already included in the .xap file used by the Microsoft Dynamics GP web client. A smaller .xap file will load more quickly on each web client machine.

Using the technique described in Referencing web client assemblies, you can view the set of assemblies that are included in the .xap file for the Microsoft Dynamics GP web client. Your project doesn't need to include any of the assemblies that you see in the Microsoft Dynamics GP web client .xap file.

Building and deploying

To build the Silverlight component, complete the following procedure:

  1. Set the solution configuration.

    If you're building a test version of the integration, set the solution configuration to "Debug". If you are building a final version of the integration, set the solution configuration to "Release".

  2. Build the solution.

    Choose Build Solution from the Build menu.

  3. Verify there were no build warnings.

    If there were build warnings, fix them and build again.

  4. Copy the .xap to the ClientBin folder.

    Open the "Debug" or "Release" folder for your project and find the .xap file that was built. Copy the .xap into the \WebClient\ClientBin folder in the Microsoft Dynamics GP installation on the web client server.

    Be sure that you have also copied the Visual Studio Tools assembly for your integration into the AddIns folder for the Microsoft Dynamics GP installation on the web client server.

  5. Start the Microsoft Dynamics GP web client.

    When Microsoft Dynamics GP web client starts, your Visual Studio Tools add-in will be loaded on the server. The Silverlight .xap assembly will be transferred to the web client machine and loaded into the browser. Verify that your integration is working properly.