I am creating a library of actions in Visual Studio 11 beta (although I repeated all my steps in VS2010 with the same result), focusing on the .NET 4.0 platform.
When I started to enter arguments using the Workflow constructor, I noticed the message "Enter VB expression" in the "Default value" field. I am not sure how to change the language context from VB to C #.
To create a project, I followed these steps:
Go to File New and select Project ...
In the Installed Templates section of the New Project dialog box, select Visual C # Workflow strong> Action Library
Name the project as usual and click OK.
And thatβs basically it. I noticed that the Activity1.xamldefault file was expecting VB to be used in the default value fields. I deleted it and then did the following to create a new action:
Right-click the project and select Add New Item ...
In the Add New Item dialog box, go to Installed Elements Visual C # Workflow Activity
Name the action and click OK.
It was the same result, Default Value fields expect a VB expression.
XAML, Microsoft.VisualBasic.Activities VisualBasic.Settings, , , ; , , . XAML:
<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)" />
</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>