Reputation: 2424
I found out that the problem is this part : this:_a650.argument1="this is a test" Does anyone know what does this expression in XAML file mean within Activity tag?
If I take this out this:_a650.argument1="this is a test" then I can open the workflow file in a workflow designer with no problem, but when it is there I get the follwoing error message: Workflow Designer encountered problems with your document Please check the document for invalid content,namespace, references or reference loops. could not find member argument1 in type _a650 Any ideas?
<Activity mc:Ignorable="sap sads" x:Class="{x:Null}" this:_a650.argument1="this is a test"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
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=mscorlib"
xmlns:s1="clr-namespace:System;assembly=System"
xmlns:s2="clr-namespace:System;assembly=System.Core"
xmlns:s3="clr-namespace:System;assembly=System.ServiceModel"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:this="clr-namespace:"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="argument1" Type="InArgument(x:String)" />
</x:Members>
<sap:VirtualizedContainerService.HintSize>526.4,369.6</sap:VirtualizedContainerService.HintSize>
<mva:VisualBasic.Settings>Assembly references and imported namespaces for internal implementation</mva:VisualBasic.Settings>
<Sequence sap:VirtualizedContainerService.HintSize="486.4,329.6">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If Condition="[2 = 2]" sap:VirtualizedContainerService.HintSize="464,204.8" />
</Sequence>
</Activity>
Upvotes: 1
Views: 2234
Reputation: 51711
Change the x:Class={x:Null}
attribute to _a650
. XAML should open fine then.
<Activity mc:Ignorable="sap" x:Class="_a650" this:_a650.argument1="this is a test" ... >
The expression this:_a650.argument1="this is a test" together with the Property definition inside Members declare an IN argument of type String (with "this is a test" as its default value) belonging to a _a650
type.
<x:Property Name="argument1" Type="InArgument(x:String)" />
The answer to this question is related to one of your other questions Visual Studio 2010 - Workflow Designer encountered problems on SO. Since, the arguments have to be declared as members of a type but the "root" activity has not been named to derive the type from; a random type name (like _a650) is generated and used.
The "root" activity name, however, is not updated and so upon XAML serialization x:Class
is still generated as {x:Null}
. This results in a namespace error when this same XAML is opened in Workflow Designer as the XAML parser is unable to find any x:Class
declared to be of _a650
type.
Upvotes: 1