Office365 Classic Activities not showing up

Hi everyone,

I have a problem with UiPath Studio on my local machine where after an upgrade to Microsoft Office 365 activities 2.2.7, code using the classic activities is not readable or adjustable anymore. I get the exception “Document is invalid” whenever trying to open code using the classic activities.

On remote desktop, using the same version of Studio, it is still possible to adjust the workflows and the Office 365 - classic activities do show up.

I have reinstalled UiPath Studio on my machine and I have also deleted the packages and let them be reinstalled again.

What is a solution for this problem?

Did you use a previous version of the package earlier? If so, it can be that the versions are not compatible and you would have to reconfigure the activities. Or use the previous version.

It mostly is only a problem occuring on my local machine. Therefore I am looking for a solution that solves it for my own machine and without having to change the actual dependencies which works on other machines with the same Studio version.

To clarify, do you have the same code on the remote machine? Same version of Office 365 Activities?

Yes

Maybe some additional info:
If I try to open the activities I get the following message:

‘The invocation of the constructor on type ‘UiPath.MicrosoftOffice365.Activities.Office365ApplicationScope’ that matches the specified binding constraints threw an exception.’ Line number ‘125’ and line position ‘36’. Row: 125, Column: 36

1 Like

Can you check the log files from path %localappdata%\UiPath\Logs, if they contain a more detailed message? Most likely it would be included in the Studio log file.

12:13:31.8305 => [ERROR] [UiPath.Studio.Project] [1] → Error details: System.Xaml.XamlObjectWriterException: ‘The invocation of the constructor on type ‘UiPath.MicrosoftOffice365.Activities.Office365ApplicationScope’ that matches the specified binding constraints threw an exception.’ Line number ‘125’ and line position ‘36’.
—> System.IO.FileNotFoundException: Could not load file or assembly ‘ConnectionClient, Version=1.4.5.0, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
File name: ‘ConnectionClient, Version=1.4.5.0, Culture=neutral, PublicKeyToken=null’
at UiPath.MicrosoftOffice365.Activities.Utilities.ActivityInitializer.CreateWithTokenCache(String cacheFilename)
at UiPath.MicrosoftOffice365.Activities.Office365ApplicationScope…ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
— End of inner exception stack trace —
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object args)
at System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
at System.Activities.Presentation.Xaml.ErrorTolerantObjectWriter.XamlFragment.WriteTo(XamlWriter writer, Boolean parentHasError)
at System.Activities.Presentation.Xaml.ErrorTolerantObjectWriter.ActivityFragment.WriteTo(XamlWriter writer, Boolean parentHasError)
at System.Activities.Presentation.Xaml.ErrorTolerantObjectWriter.XamlFragment.WriteTo(XamlWriter writer, Boolean parentHasError)
at System.Activities.Presentation.Xaml.ErrorTolerantObjectWriter.ActivityFragment.WriteTo(XamlWriter writer, Boolean parentHasError)
at System.Activities.Presentation.Xaml.ErrorTolerantObjectWriter.XamlFragment.WriteTo(XamlWriter writer, Boolean parentHasError)
at System.Activities.Presentation.Xaml.ErrorTolerantObjectWriter.CompleteLoad()
at System.Activities.Presentation.Xaml.ErrorTolerantObjectWriter.WriteEndObject()
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at Microsoft.Activities.Presentation.Xaml.WorkflowDesignerXamlHelper.DeserializeString(String text, DeserializationMode mode, IList1& loadErrors, Dictionary2& sourceLocations)
at Microsoft.Activities.Presentation.Xaml.WorkflowDesignerXamlHelper.DeserializeString(String text, IList1& loadErrors, Dictionary2& sourceLocations)
at System.Activities.Presentation.WorkflowDesigner.Load()
12:13:31.8305 => [ERROR] [UiPath.Studio.Project] [1] System.IO.InvalidDataException: Document is invalid
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.InitRootActivity(WorkflowDesigner designer, String filename)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.BuildInternal(DesignerEventsSubscriber eventsSubscriber, String workflowId, String fileName)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.Build(DesignerEventsSubscriber eventsSubscriber, String workflowId, String fileName)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerWrapper.Load(String fileName)
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.<>c__DisplayClass7_0.<b__0>d.MoveNext(), HResult -2146233087

Did you already try deleting/renaming the nuget packages folder (%userprofile%\.nuget\packages)?

Yes I tried that before.

I have solved it now.

I used the Nuget Packet Manager in Visual Studio to Clear All NuGet Storage and after the packages were installed again. And now it does seem to be working.

Downside is that you will need to install all packages using that feed again, also outside UiPath ofcourse. For the future readers of this post.

@ivkali

To resolve the “Document is invalid” issue with classic activities in UiPath Studio after an Office 365 activities upgrade:

  1. Ensure that you have the correct versions of UiPath Studio, Office 365 activities, and other dependencies.
  2. Clear the NuGet cache to prevent conflicts in package installations.
  3. If the issue persists, consider downgrading the Office 365 activities package to a previous version that was working for you, and report the issue to UiPath support for a long-term solution.

cheers…!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.