XamlStyler
XamlStyler copied to clipboard
Error in StylerPackage on Workflow xaml
NullReferenceException when saving a Workflow xaml (Workflow foundation).
Create a workflow and save.
Thanks for the bug report! Are you able to isolate the XAML snippet causing this issue and share it?
Also, can you share some versioning information to help us debug?
Version Info (please complete the following information):
- OS: [e.g. Windows 10 (1903), MacOS (10.15) , Ubuntu (19.10), etc.]
- Visual Studio: [e.g., VS2019 (16.4.1), VS for Mac (8.3.11), etc.]
- XAML Styler: [e.g., Extension (3.2001.0), Console (3.1912.0), etc.]
Almost forgot about this...
OS: Windows 10.0.18363 VS: Microsoft Visual Studio Enterprise 2019, Version 16.7.4 XAML Styler: Extension 2.2008.4
This is a workflow document (and this is just one of them failing).
<Activity mc:Ignorable="sap sap2010 sads" x:Class="TPG.FN.Workflow.FacnavStartUpWorkFlow" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-namespace:TPG.FN.Workflow" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities" xmlns:p="http://schemas.microsoft.com/netfx/2009/xaml/servicemodel" xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <x:Members> <x:Property Name="FileName" Type="InArgument(x:String)" /> <x:Property Name="PlatformType" Type="OutArgument(x:String)" /> </x:Members> sap2010:ExpressionActivityEditor.ExpressionActivityEditorC#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor> sap2010:WorkflowViewState.IdRefTPG.FN.Workflow.FacnavStartUp_1</sap2010:WorkflowViewState.IdRef> <TextExpression.NamespacesForImplementation> <sco:Collection x:TypeArguments="x:String"> <x:String>System</x:String> <x:String>System.Collections.Generic</x:String> <x:String>System.Data</x:String> <x:String>System.Linq</x:String> <x:String>System.Text</x:String> </sco:Collection> </TextExpression.NamespacesForImplementation> <TextExpression.ReferencesForImplementation> <sco:Collection x:TypeArguments="AssemblyReference"> <AssemblyReference>Microsoft.CSharp</AssemblyReference> <AssemblyReference>System</AssemblyReference> <AssemblyReference>System.Activities</AssemblyReference> <AssemblyReference>System.Core</AssemblyReference> <AssemblyReference>System.Data</AssemblyReference> <AssemblyReference>System.Runtime.Serialization</AssemblyReference> <AssemblyReference>System.ServiceModel</AssemblyReference> <AssemblyReference>System.ServiceModel.Activities</AssemblyReference> <AssemblyReference>System.Xaml</AssemblyReference> <AssemblyReference>System.Xml</AssemblyReference> <AssemblyReference>System.Xml.Linq</AssemblyReference> <AssemblyReference>mscorlib</AssemblyReference> <AssemblyReference>TPG.FN.Workflow</AssemblyReference> </sco:Collection> </TextExpression.ReferencesForImplementation> <StateMachine sap2010:WorkflowViewState.IdRef="StateMachine_1"> <StateMachine.InitialState> <State x:Name="__ReferenceID0" DisplayName="Host Machine Start" sap2010:WorkflowViewState.IdRef="State_2"> <State.Exit> <p:Send sap2010:WorkflowViewState.IdRef="Send_1" OperationName="GetPlatformDefinition" ProtectionLevel="None" ServiceContractName="TPG.FN.Workflow.IPlatformService" TokenImpersonationLevel="Impersonation"> <p:Send.Endpoint> <p:Endpoint AddressUri="http://localhost:49700/Facnav/"> <p:Endpoint.Binding> <p:WSHttpBinding Name="wsHttpBinding" /> </p:Endpoint.Binding> </p:Endpoint> </p:Send.Endpoint> <p:Send.EndpointAddress> <InArgument x:TypeArguments="x:Uri"> <mca:CSharpValue x:TypeArguments="x:Uri">new Uri("http://localhost:49700/Facnav/PlatformService", UriKind.Absolute)</mca:CSharpValue> </InArgument> </p:Send.EndpointAddress> <p:SendMessageContent DeclaredMessageType="local:PlatformDefinitionRequest"> <InArgument x:TypeArguments="local:PlatformDefinitionRequest"> <mca:CSharpValue x:TypeArguments="local:PlatformDefinitionRequest">new PlatformDefinitionRequest()</mca:CSharpValue> </InArgument> </p:SendMessageContent> </p:Send> </State.Exit> <State.Transitions> <Transition DisplayName="Lots of stuff" sap2010:WorkflowViewState.IdRef="Transition_1"> <Transition.To> <State x:Name="__ReferenceID1" DisplayName="Monitor Service Started" sap2010:WorkflowViewState.IdRef="State_1" IsFinal="True" /> </Transition.To> <Transition.Action> <WriteLine sap2010:WorkflowViewState.IdRef="WriteLine_1" Text="Lots of stuff finished" /> </Transition.Action> <Transition.Condition>True</Transition.Condition> </Transition> </State.Transitions> </State> </StateMachine.InitialState> <x:Reference>__ReferenceID0</x:Reference> <x:Reference>__ReferenceID1</x:Reference> sads:DebugSymbol.Symbold2hDOlxnbG9iZS1kZXY0XEZOXEV4cGVyaW1lbnRhbFxGQUMgU0lNXFRQRy5GTi5FeHBlcmltZW50YWwuU2ltXFRQRy5GTi5Xb3JrZmxvd1xGYWNuYXZTdGFydFVwV29ya0Zsb3cueGFtbAkuA1YSAgEBMAdRDwIBBEkPSY8BAgECMgtEFAIBCk4jTicCAQhMD0xoAgEGPBE8lgECAQ5BEUGFAQIBC0xNTGUCAQc=</sads:DebugSymbol.Symbol> </StateMachine> sap2010:WorkflowViewState.ViewStateManager sap2010:ViewStateManager <sap2010:ViewStateData Id="Send_1" sap:VirtualizedContainerService.HintSize="255,86" /> <sap2010:ViewStateData Id="State_1" sap:VirtualizedContainerService.HintSize="196,107"> sap:WorkflowViewStateService.ViewState <scg:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">290,242.5</av:Point> <av:Size x:Key="ShapeSize">196,107</av:Size> <x:Boolean x:Key="IsPinned">False</x:Boolean> <x:Double x:Key="StateContainerWidth">182</x:Double> <x:Double x:Key="StateContainerHeight">71.039999999999964</x:Double> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="WriteLine_1" sap:VirtualizedContainerService.HintSize="210,62" /> <sap2010:ViewStateData Id="Transition_1" sap:VirtualizedContainerService.HintSize="430,507"> sap:WorkflowViewStateService.ViewState <scg:Dictionary x:TypeArguments="x:String, x:Object"> <av:PointCollection x:Key="ConnectorLocation">147,205 147,312.05 290,312.05</av:PointCollection> <x:Int32 x:Key="SrcConnectionPointIndex">39</x:Int32> <x:Int32 x:Key="DestConnectionPointIndex">49</x:Int32> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="State_2" sap:VirtualizedContainerService.HintSize="326,472"> sap:WorkflowViewStateService.ViewState <scg:Dictionary x:TypeArguments="x:String, x:Object"> <av:Point x:Key="ShapeLocation">50,80</av:Point> <av:Size x:Key="ShapeSize">194,125</av:Size> <x:Boolean x:Key="IsPinned">False</x:Boolean> <x:Double x:Key="StateContainerWidth">180</x:Double> <x:Double x:Key="StateContainerHeight">89.040000000000077</x:Double> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="StateMachine_1" sap:VirtualizedContainerService.HintSize="614,636"> sap:WorkflowViewStateService.ViewState <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">False</x:Boolean> <av:Point x:Key="ShapeLocation">270,2.5</av:Point> <x:Double x:Key="StateContainerWidth">600</x:Double> <x:Double x:Key="StateContainerHeight">600</x:Double> <av:PointCollection x:Key="ConnectorLocation">300,77.5 300,142 244,142</av:PointCollection> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="TPG.FN.Workflow.FacnavStartUp_1" sap:VirtualizedContainerService.HintSize="654,716" /> </sap2010:ViewStateManager> </sap2010:WorkflowViewState.ViewStateManager> </
@trivli, is it solved with #453?