When using VB Workflow projects in Visual Studio 2012 RC, you may receive a System.InvalidCastException while editing expressions. The Exception message would be similar to the following:
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file
After closing the exception, IntelliSense will stop working in your VB expressions. However, you can still successfully author and run your Workflows. Highlighting and expression validation will continue to work.
This situation can also occur with C# projects if you target .NET Framework 4.
The following KB article addresses this issue (includes Hotfix information):
Alternatively, you can download and install the "July 2012 Update for Microsoft Visual Studio 2012 RC" which includes a number of fixes besides the above fix:
Of course, we have fixed this problem for the RTM release.
Please let us know if you have any questions in this regard.