When you are working with CRM 2011 Online Beta and want to generate typed classes
using CRMSvcUtil you need to first generate a device ID and device password.
There are some specific rules you must follow when generating these. To help make
that easier the SDK includes a helper class named DeviceManager.cs. In order to use
this helper class you still have to create your own program that calls its helper
methods. To make that easier I have created a simple program that calls those
methods for you and placed it on MSDN code Gallery. You can download the source
code and executable from the following link http://tinyurl.com/24jooe7
Once you download and run this utility it will generate a device ID and device
password for the machine that you run it from. The output from this is specific to
the machine you run it from and is not intended to be shared on multiple machines
(devices). The output should look something like the following:
When running CRMSvcUtil you will pass this either on the command line or in the
config file. From my experience the config file approach is more reliable. I’ve
encountered times when passing on command line didn’t work but config file did.
The following is an example of what the config file would look like:
<add key="deviceid" value="11f61111111notreal" />
<add key="devicepassword" value="uiD111111I%v0notreal" />
The file would be named crmsvcutil.exe.config and must be in the same folder as
You would then run crmsvcutil with a command line that looks like
crmsvcutil.exe /url:https://<CRM Online URL>/XRMServices/2011/Organization.svc /out:GeneratedEntities.cs
If you want to try the commandline approach instead of using the config file you
would add the following to your command above:
This should create a file called GeneratdEntities.CS after it runs successfully.
If for some reason you have trouble you might want to try clearing your cached
device ID and device password. The device manager utility stores the device ID and
password in %USERPROFILE%\LiveDeviceID\LiveDevice.xml
Hopefully by the time we get past beta they can figure out a way we don't have to
mess with the device stuff and it's just handled for us by the utility.