Can open any .xaml file

Hello all,

Can someone please let me know, how I can solve this issue. It happens with all the .xaml file I have

Error: System.Exception: The type “Microsoft.IdentityModel.Tokens.Configuration.LKGConfigurationCacheOptions” in the assembly “Microsoft.IdentityModel.Tokens, Version=6.14.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” could not be loaded.
bei System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
bei System.Reflection.RuntimeAssembly.GetExportedTypes()
bei System.Activities.Presentation.View.ImportDesigner.GetUniqueNamespacesInAssembly(Assembly assembly, AssemblyContextControlItem assemblyContextItem)
bei System.Activities.Presentation.View.ImportDesigner.UpdateAvailableNamespaces(Assembly assembly, AssemblyContextControlItem assemblyContextItem)
bei System.Activities.Presentation.View.ImportDesigner.GetAvailableNamespaces()
bei System.Activities.Presentation.View.ImportDesigner.OnContextChanged()
bei System.Activities.Presentation.View.ImportDesigner.OnContextChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
bei System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
bei System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.Activate(Object item)
bei System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
bei System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
bei MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
bei MS.Internal.Data.DataBindEngine.Run(Object arg)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233054

Thanks for the help

Hi @mauriciorojas201888 ,
Can you create new project in studio?
regards,

Hi

The error message indicates that UiPath is unable to load the type “Microsoft.IdentityModel.Tokens.Configuration.LKGConfigurationCacheOptions” in the assembly

Better try to restart the machine and open studio as admin
Or if that doesn’t work, install the latest version of studio and give a try. That’s should solve this

Cheers @mauriciorojas201888

Hello Nguyen,

Thanks for the help. Yes, I can open a new project and add activities.

Regards,

What is your version of Studio?
That files .xaml is same version
Have you tried reinstall Studio

Did u try with this approach
@mauriciorojas201888

4

Hello Palaniyappan

I have installed UiPath again and run it as administrator. However it did not work.

In the error logs that I have posted I have seen that it references the Tokenkey, which is found in
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35

When I uninstalled everything and installed it again it started to work. But when I closed everything and reopened it, I got the same error.

This happens with every file I am trying to open

Fine
Try installing the latest version or just reinstall the studio
@mauriciorojas201888

Hello Nguyen

The version I am using is the Statios 2023.10.0

How can I know the version of the .xaml files?

Yes, I have installed again the Studio. But at the end I got the same issue.

I have founf this post with a similar issue, but it is not clear to me. How can I check that Information

My local Studio is Community and if I check the https://cloud.uipath.com >> admin >> licenses I am also on the Community

Subscription expires:

  1. May 2024

Hi Palaniyappan

I have done that. I think I am already using the last Community version 2023.10.0

@mauriciorojas201888

Please try to clear the temporary files and the go to .nuget folder in your userprofile folder and rename the package folder and then try to reopen. thsi ensures dependencies are redownloaded again

cheers

Hi Anil,

I have deleted all the cache file under …\UiPath.cache

About the .nutget you mean this folder?

NuGetResolveResults

if so, I have just renamed and I still getting the same error.

Thanks for your help

I would recommend to then reinstall studio and give a try
@mauriciorojas201888

@mauriciorojas201888

C:\Users\Username\.nuget - tis is the folder

cheers