I'm creating an Activity Library in Visual Studio 11 Beta (although I've repeated all my steps in VS2010 with the same result), targeting the .NET 4.0 framework.
As I started entering arguments via the Workflow Designer, I noticed the "Enter a VB Expression" message in the Default Value box. I'm not sure how to change the language context from VB to C#.
To create the project, I followed these steps:
Go to File> New and select Project...
In the Installed> Templates section of the New Project dialog window, select Visual C#> Workflow> Activity Library
Name the project, as usual, and click OK
And that's basically it. I noticed then that the default Activity1.xaml
file was expecting VB in the default values fields. I deleted it and then followed these steps to create a new Activity:
Right-click on the project and select Add> New Item...
In the Add New Item dialog window, navigate to Installed> Visual C# Items> Workflow> Activity
Name the Activity and click OK
It was the same result, the Default Value fields are expecting a VB expression.
When I look at the XAML code, I can clearly see the Microsoft.VisualBasic.Activities
namespace listed and a VisualBasic.Settings
element, but I'm not sure what to do to change it; everytime I try, I just end up screwing things up. Here's the XAML code being generated:
<Activity mc:Ignorable="sads sap" x:Class="THINKImport.CustomerAddOrderAdd"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:local="clr-namespace:THINKImport.THINKWebReference"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
xmlns:s="clr-namespace:System;assembly=System.Core"
xmlns:s1="clr-namespace:System;assembly=System"
xmlns:s2="clr-namespace:System;assembly=System.ServiceModel"
xmlns:s3="clr-namespace:System;assembly=mscorlib"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:t="clr-namespace:THINKImport"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="user_login_data" Type="InArgument(local:user_login_data)" />
<!--Removed the other properties for brevity-->
</x:Members>
<sap:VirtualizedContainerService.HintSize>440,440</sap:VirtualizedContainerService.HintSize>
<mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
</Activity>