Silverlight project
A separate project is required for the Silverlight component of a Visual Studio Tools integration that uses custom rendering. You can include this project in an existing solution for your Visual Studio Tools integration, or you can use a separate solution.
Creating the Web Client add-in project
Use the following procedure to create a new Visual Studio project for the Silverlight component of a Microsoft Dynamics GP add-in.
Start Visual Studio.
If it isn't already running, start Visual Studio.
Create a new project.
In the File menu, point to New and choose Project.
Select the project type.
Choose either a Visual Basic project or a Visual C# project. Under the type you have selected, choose Dynamics GP.
Choose the Microsoft Dynamics GP Web Client Add-in template.
In the list of available templates, choose the Microsoft Dynamics GP Web Client Add-in project template.
Warning: If the Microsoft Dynamics GP templates are not listed, you may need to register them manually. Refer to Template registration for details about doing this.
Specify the name and location of the project.
Click OK to create the project.
Referencing web client assemblies
The Silverlight project must reference the following assemblies that are part of the web client:
- Microsoft.Dynamics.GP.Web.Silverlight
- Microsoft.Dynamics.GP.Web.UI.Silverlight
- Microsoft.Dynamics.GP.Web.UI.Silverlight.Controls
These assemblies are found in the Microsoft.Dynamics.GP.Web.Silverlight.xap file that is located in the "ClientBin" folder of the Microsoft Dynamics GP installation on the web client server machine. To reference these assemblies in your Silverlight project, you must extract them from the .xap file and then re-reference them in the Silverlight project. To do this, complete the following procedure.
Locate the Microsoft.Dynamics.GP.Web.Silverlight.xap file.
This file is found in the ClientBin folder of the Microsoft Dynamics GP installation on the web client server machine.
Make a copy of the file.
Copy the Microsoft.Dynamics.GP.Web.Silverlight.xap file to a location where you have write privileges.
Add the .zip file extension.
Add the .zip file extension to the copy of the .xap file so that the file has the name Microsoft.Dynamics.GP.Web.Silverlight.xap.zip.
Open the .zip archive.
You will see the assemblies that are contained in the .xap file.
Copy the needed assemblies from the .zip archive.
Copy the following assemblies from the archive into a location where you will be able to access them from the Silverlight project:
• Microsoft.Dynamics.GP.Web.Silverlight
• Microsoft.Dynamics.GP.Web.UI.Silverlight
• Microsoft.Dynamics.GP.Web.UI.Silverlight.Controls
Re-reference the assemblies in the Silverlight project.
When you view the references for the Silverlight project, you will see that the three assemblies are referenced, but that the reference path is incorrect. You must delete the references for these three assemblies, and then re-add the references to the three assemblies that you just extracted from the .zip archive.
Set the Copy Local property for each assembly to False.
In Visual Studio, you must set the Copy Local property to False for each of the three referenced assemblies. This is important, because it prevents an additional copy of the assemblies from being included in the .xap file for your Visual Studio Tools solution.
Warning: If there are multiple copies of these assemblies in the .xap files for the web client, the web client will not work properly.