Up Cocktail overview

Getting started

Last modified on August 22, 2012 18:01

CocktailLet's get started with Cocktail. We'll discuss prerequisites, how to acquire the source from the Cocktail Project on CodePlex, and how to explore Cocktail through the sample applications. 


Cocktail is designed for XAML business application development in WPF 4 and Silverlight 4 or 5. You'll need:

Cocktail works just fine with SQL Server or any Entity-Framework-friendly relational database. You only need Silverlight 4 or 5 if you intend to write a Silverlight applications.  


1. Register to download Cocktail and receive the required DevForce Express product key via email.
   Note: Existing DevForce customers should use their current key rather than the DevForce Express key.

2. Click Cocktail to download Cocktail from the registration Thank you page.


3. Click the recommended download.


Unblock the zip file to satisfy Windows Security; if you neglect this step, you won't be able to read the help file and Visual Studio will pester you about "unsafe" assemblies downloaded from the web.

4. Right-click the zip file and select Properties.

5. Click the Unblock button at the bottom of the dialog as shown:


6. Unzip it into the directory of your choice and examine its contents.

Zip file contents

The zip file high-level items are as follows:


Install DevForce

Cocktail applications depend upon DevForce for entity model definition, persistence, and client-side model services.

If you're already a DevForce developer with DevForce installed on your machine you can skip these instructions. 

If you are not yet a DevForce developer, you're in for a treat. The installer included with the zip gives you a perpetual free trial of DevForce which is more than sufficient to explore Cocktail and its sample applications.

You do have to actually install DevForce which adds a Visual Studio extension, PostSharp AOP, and some custom Visual Studio templates.

Don't worry. DevForce installs and uninstalls quickly and cleanly.

1. Register online to get your free product key; it's emailed to you immediately.

2. Double-click DF2010.Setup...exe and follow its brief instructions. You'll need to enter the product key that was emailed to you.

Important: You must install DevForce after installing Silverlight 4 or 5. If you don't, Cocktail and application projects won't find the DevForce Silverlight libraries. If Cocktail won't build and the complaint is about missing "IdeaBlade..." assemblies, you may have installed DevForce before Silverlight 4 or 5. The easiest resolution is to reinstall DevForce.

Explore Cocktail

Documentation for Cocktail is right here in the Document Resource Center where you'll also find loads of information about the DevForce component of a Cocktail application.

Ease into Cocktail with the Happy Hour Tutorial, a Silverlight application that you build from scratch by following short lessons on Cocktail development.

Or dive deeply into the TempHire reference application. "TempHire" has most of the features you'll need in a production application.

Both "Happy Hour" and "TempHire" are located in the src/samples directory.


Ask questions in our community forum and get real answers from our support engineers, our MVPs, and from developers just like you.

Cocktail proper

The most important Cocktail artifacts are located in the bin, doc, and src whose high level structure is as follows:


Build the code

You can build the Cocktail libraries independently and start referencing them in your own WPF and Silverlight applications.

  1. Navigate to the folder where you downloaded the source code.
  2. Navigate to the "src" directory.
  3. Open Cocktail.sln in Visual Studio.
  4. Press Ctrl-Shift-B or use the Build menu to build the solution
  5. Navigate to the src/Bin folder (at the same level as Cocktail.sln) and locate the assemblies you need under the Desktop and Silverlight directories for the respective platforms.

These are the assemblies you built. The "official" assemblies, shipped in the zip file, are in the top-level bin directory

Cocktail in source control

The Cocktail project uses Subversion as the underlying source control system. Maintaining your own working copy is a good way to stay current with the Cocktail project as it evolves.

This source package is much smaller than the zip file because it excludes the 30 Mb DevForce.setup.exe file which you only need once in order to install DevForce.

URL: https://cocktail.svn.codeplex.com/svn
Username: <your codeplex user name>
Password: <same as your website password>

TortoiseSVN is a popular free Subversion client that we use at IdeaBlade to obtain the source code. It integrates directly into Windows Explorer.


Cocktail is also available as a NuGet package and the source code is published to SymbolSource.org.

To install Cocktail, run one of the following commands in the Package Manager Console depending on your platform.



Tags: Cocktail
Created by DevForce on January 13, 2012 17:11

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade