Visual Studio Solution Starters and Templates for CCAUII

This is an update of an article I wrote in 2010, that is now up to date with the current solution starter package.

Picking though the examples and documentation for UII to figure out how to setup your first ( or 10th ) hosted control, adapter, or CTI adapter is a bit of a pain. Not to mention a bit time consuming… most of the time in the CCF Days, I would just grab another control I had written and use it as the ‘boiler plate’ for doing what ever I needed to do.

As we put together internal and partner training for CCA\UII for CRM 4, I took the time to create a few project starters for things that I do a lot, such as Creating Hosted Controls, or Search controls and CTI adapters. Those of you that have attended the CCA training events will have seen one of them already as we use templates in module 3 of the training. 

I had made prior versions of these templates available to folks via a VSI file on sky drive,  the major issue with this delivery channel is that I don’t have a clear idea as to how valuable they are to folks or a means to keep folks up to date as a fix and publish updates.

To address that, I have made these solution starters available via the Visual Studio Gallery for folks to use, the limitation is that you must be doing development on Visual Studio 2010 or newer to utilize these templates.  This will also allow me to keep things up to date as necessary

You can download them from the Visual Studio Extensions manager by searching for UII , CCA or CRM or by clicking here.

Change Log:

Ver 2.0 – 6/15/12

  • Updated Default sizing on WPF Controls to use “design” sizing vs actual sizing in the templates.
  • Agent Desktop Template :
    • Major updates to the connection manager in the agent desktop to support office 365 and token renewal  - in general this can be patched into your desktop by copying the CrmConnect folder to your project from a new desktop project built from the template. ( Updating namespaces as necessary )
    • Added sorting of organizations when choosing orgs.
    • Added a cancel link on the splash screen.
  • CTI Starter Solution
    • Added all created projects to a sub solution folder to support multiple CTI projects in one base solution.

 

What templates are provided

I am providing 8 project templates and 6 item templates for use with UII

Project and Item Templates:

  • UII Application Adapter Control
    • This provides a base project template for creating an application adapter
  • UII Web Application Adapter Control
    • This provides a base project template for creating an web adapter. Note: this is not a HAT control,  the Web Application Project type creates a HAT control
  • UII Windows Form Hosted Control
    • This provides a base project template for creating an winform hosted control with the session, doaction handlers, and context handers prewired.
  • UII WPF Hosted Control
    • This provides a base project template for creating an wpf hosted control with the session, doaction handlers, and context handers prewired.
  • UII Windows Form Customer Search Control
    • This provides a base project template for creating an winform hosted control with the session, doaction handlers, context, session creation, and search logic handers prewired. It also supplies a base customer payload class.
  • UII WPF Customer Search Control
    • This provides a base project template for creating an wpf hosted control with the session, doaction handlers, context, session creation, and search logic handers prewired. It also supplies a base customer payload class.

Project Only Templates:

  • UII Baseline Agent Desktop
    • As the name implies, it is a baseline agent desktop shell, with 5 hosting areas, a hidden area , a CrmConnection manager, about window, and splash screen.  It supports all methods of login to CRM including federated.   This desktop is functioning standalone, and provides code level documentation as to what it is doing.
  • UII CTI Starter Solution
    • This solution lays out all the base components necessary to create a CTI adapter for UII.
    • Within this solution:
      • The BaseCitConnector project is the communication layer for talking to the downstream CTI solution. This control is setup to talk to the CTI solution via polling, however it can be adapted to whatever you need.
      • The BaseCitDesktopManager is the Interface layer that UII uses to manage events between UII and the BaseCTIConnector, it is also the control that instances the AgentState and CallState Manager Classes in the next assembly.
      • The BaseCtiStateManagers are the translators for CTI => CCA and places where you can add extended functionality beyond the core control set we offer.

How to install it.

You can download them from the Visual Studio Extensions manager by searching for UII , CCA or CRM or by clicking here.

When you begin the install you will be presented with a window that looks like this:

image

You will notice that the message “This extension does not contain a digital signature” is present.

This is normal, as I have not signed this package.

Push Install to complete the install,  after which you will be presented with a dialog that looks like this:

image

You can verify that everything went fine by opening up VS and Clicking the “New Project”. Under Visual C# you will see a area called UII

In that section you will see 10 project templates that looks like this ( if you also have HAT Installed, otherwise you will see only 8 )

image

 

Important Notes..

I have provided the templates in Visual C# only. You will not find them in the VB.net area of Visual Studio

All of the templates configured with “local” references to the UII framework directory, which means you will need to update the References Paths to point to the UII Install Directory \ Framework directory.

To Do that,

Right click on the project in the solution explore and choose “properties”:

image

then choose the “Reference Paths” from the project areas:

image

Next, Click the … button next the folder box, and Navigate to your UII Install Directory. If you used the default install that’s going to be C:\Program Files\Microsoft Uii\Framework

Once you have selected the folder, click “Add Folder” under the Folders box.

That should fix all the reference problems and you should be good to go.

I hope folks find this useful, Please post comments on the Gallery site , MSDN forums , codeplex or as comments here.

Happy coding.