WCF RIA Services V1.0 (and V1.0 SP1) included a feature called “Live IntelliSense.”  Live IntelliSense is a feature that you probably didn’t even know about, but you might also take it for granted.  Some people do know about the feature though as it’s caused a few problems, and those affected have had to disable it.

What is Live IntelliSense?

The easiest way to define the feature is by giving an example of how it applies.  Imagine the following steps are followed when using RIA Services:

  1. Add a new DomainService class - call it CustomerService
  2. Within CustomerService, add a method: public IQueryable<Customer> GetCustomers() { … }
  3. Without building, open up a file within your Silverlight project and either A) start typing code, or B) open the Data Sources window
  4. You will find that CustomerContext is available, with a GetCustomersQuery method available (Live IntelliSense did this for you)
  5. Use GetCustomersQuery and then build
  6. Go back into CustomerService and rename GetCustomers to GetActiveCustomers
  7. Without building, go back into your Silverlight project and you should see a build error stating that GetCustomersQuery cannot be found (Live IntelliSense did this for you)
  8. Change the code to reference GetActiveCustomersQuery, and continue working

Why is it being deprecated?

The primary reason for deprecating this feature is performance within Visual Studio.  RIA Services Live IntelliSense would kick in any time you changed context from your Web project to a Silverlight project.  With a RIA Services link between those two projects, a background compilation would kick off to update IntelliSense to match what your Web project’s Domain Services exposed.  When working in a large solution, this background compilation could take seconds and slow you down.

Additionally, we’ve seen a few reports where IntelliSense could get out of sync with what’s on disk vs. what’s in memory, and this has led to confusing issues where developers have had to restart Visual Studio to get things back into a normal state.

In situations where developers have been adversely impacted by the performance hit or recurrent out-of-sync bugs have hit them, we’ve encouraged them to disable the feature.

How do you disable it?

The Live IntelliSense feature checks a registry key value to determine whether or not to activate itself.  The key value is located at:

On a 32-bit machine:
HKEY_LOCAL_MACHINE\SOFTWARE \Microsoft\WCFRIAServices\v1.0\DisableLiveIntelliSense

On a 64-bit machine:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\WCFRIAServices\v1.0\DisableLiveIntelliSense

When that key value exists, as a dword with the value of 1, Live IntelliSense is disabled.  If the key is missing or has a value other than 1 (or a different value type), Live IntelliSense is active.

When is it being deprecated?

We will remove this feature when WCF RIA Services V1.0 SP2 is released.  In fact, with the SP2 Preview that we released for MIX11, we put the registry key in place by default, disabling the feature by default.  We have now removed the feature entirely, so the final release of SP2 will omit Live IntelliSense completely.

How will I be affected?

Review the workflow outlined above.  You will now have to build your solution at the places where you were able to proceed in your Silverlight project without building.  We expect this will be less of a nuisance than the constant performance hit you have been paying.  Since the Preview of SP2 at MIX11, we’ve not heard a single report of problems being caused by the feature being disabled by default, so that seems like a good indication to me that it’s okay to deprecate the feature.