Sep
24
2009
Here’s a quick gotcha. If you’re going through the walkthroughs for using the CRM 4.0 Online Web Services, you might run into a runtime error when you reference the sample dll if you’re deving on an x64 workstation. The error will look like: “An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0×8007000B)”
That’s because the helper dll’s that Microsoft provides to help with Passport authentication are x86 dlls. To fix this issue, stop using these helper dll’s, or target x86 in your build settings. The steps to do this are:
1. In Visual Studio, right-click your project and click “Properties”.
2. In the “Build” tab, set your “Platform Target” to “x86″.
-Phil
Feb
20
2008
A quick lunch break “gotcha” post before I forget:
Have you ever tried to create a new instance of a crm entity via the SDK only to find that none of your custom attributes (or custom entities for that matter) are showing up in your intellisense? What’s worse, you get a compiler error when try to build because your “new_” prefixed attribute isn’t a recognized member of the class (something like: ’<CrmSdk>.<entity>’ does not contain a definition for ‘new_<custom_attribute>’)?
Well, if you added the web reference to the SDK before you added/published your customizations in CRM, you’ll need to “Update Web References” in Visual Studio before it will compile.

To do this:
- Go to the Solution Explorer in Visual Studio and expand your project.
- Right-click your “App_WebReferences” or your specific web reference to the CRM SDK and select “Update Web References.”
-p