Compile error Studio 2020.6

Hello,

I’m having an issue when compiling a library with UiPath Studio 2020.6

System.AggregateException: One or more errors occurred. —> UiPath.ActivityCompiler.Exceptions.UiPathLocalizedException: Unable to create activity builder for document. Reason was 'Cannot create unknown type ‘{http://schemas.microsoft.com/netfx/2009/xaml/activities}Catch({http://schemas.microsoft.com/netfx/2009/xaml/servicemodel}CommunicationException)’

when I compile with mi old Studio 2019.6, it compiles perfectly.

Maybe a dependence is lost with the new installation or similar. The Studio doesn’t shows any error until compilation. Thank you in advance.

full error:
Se ha producido un error inesperado durante el proceso de compilación de la biblioteca:
System.AggregateException: One or more errors occurred. —> UiPath.ActivityCompiler.Exceptions.UiPathLocalizedException: Unable to create activity builder for document. Reason was ‘Cannot create unknown type ‘{http//schemas.microsoft.com/netfx/2009/xaml/activities}Catch({http//schemas.microsoft.com/netfx/2009/xaml/servicemodel}CommunicationException)’.’. —> System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http//schemas.microsoft.com/netfx/2009/xaml/activities}Catch({http//schemas.microsoft.com/netfx/2009/xaml/servicemodel}CommunicationException)’.
en System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)
en System.Xaml.XamlWriter.WriteNode(XamlReader reader)
en System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
en System.Xaml.XamlServices.Load(XamlReader xamlReader)
en UiPath.ActivityCompiler.CompilerV2.ActivityBuilderLoader.LoadFromString(String content)
— Fin del seguimiento de la pila de la excepción interna —
en UiPath.ActivityCompiler.CompilerV2.ActivityBuilderLoader.LoadFromString(String content)
en UiPath.ActivityCompiler.CommandLine.ProgramExtensions.<>c__DisplayClass2_2.b__6()
en System.Lazy1.CreateValue() en System.Lazy1.LazyInitValue()
en System.Lazy1.get_Value() en UiPath.ActivityCompiler.CompilerV2.LibraryFactory.<>c__DisplayClass8_0.<Build>b__1(Int32 _) en System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.b__1()
en System.Threading.Tasks.Task.InnerInvoke()
en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
en System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )
— Fin del seguimiento de la pila de la excepción interna —
en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
en System.Threading.Tasks.Task.Wait()
en System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) en System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action1 body)
en UiPath.ActivityCompiler.CompilerV2.LibraryFactory.Build(LoggingScope scope, GenerateLibraryRequest generateLibraryRequest)
en UiPath.ActivityCompiler.CommandLine.ProgramExtensions.<>c__DisplayClass3_0.b__0(LoggingScope documentsScope)
en UiPath.ActivityCompiler.Logging.LoggingScope.Execute(Action1 action) en UiPath.ActivityCompiler.Logging.LoggingManager.ExecuteCompilerV2DocumentsCompiler(LoggingScope parent, Action1 action)
en UiPath.ActivityCompiler.CommandLine.ProgramExtensions.ExecuteCompilerV2DocumentsCompiler(LoggingScope csharpCompilerScope, GenerateLibraryRequest libraryRequest, LibraryFactory libraryFactory)
en UiPath.ActivityCompiler.CommandLine.ProgramExtensions.<>c__DisplayClass2_0.b__0(LoggingScope csharpCompilerScope)
en UiPath.ActivityCompiler.Logging.LoggingScope.Execute(Action1 action) en UiPath.ActivityCompiler.Logging.LoggingManager.ExecuteCompilerV2(LoggingScope parent, Action1 action)
en UiPath.ActivityCompiler.CommandLine.ProgramExtensions.ExecuteCompilerV2(LoggingScope scope, CompilerOptions programArgs, List1 documents) en UiPath.ActivityCompiler.CommandLine.Program.<>c__DisplayClass4_1.<RunCompiler>b__0(LoggingScope compilerScope) en UiPath.ActivityCompiler.Logging.LoggingScope.Execute(Action1 action)
en UiPath.ActivityCompiler.Logging.LoggingManager.ExecuteRunCompiler(LoggingScope parent, Action1 action) en UiPath.ActivityCompiler.CommandLine.Program.RunCompiler(LoggingScope mainScope, CompilerOptions programArgs) en UiPath.ActivityCompiler.CommandLine.Program.RunCompilerWithFile(LoggingScope parentScope, StudioOptions opts) en UiPath.ActivityCompiler.CommandLine.Program.<>c__DisplayClass2_1.<Main>b__2(StudioOptions opts) en CommandLine.ParserResultExtensions.MapResult[T1,T2,TResult](ParserResult1 result, Func2 parsedFunc1, Func2 parsedFunc2, Func2 notParsedFunc) en UiPath.ActivityCompiler.CommandLine.Program.<>c__DisplayClass2_0.<Main>b__0(LoggingScope scope) ---> (Nº de excepción interna 0) UiPath.ActivityCompiler.Exceptions.UiPathLocalizedException: Unable to create activity builder for document. Reason was 'Cannot create unknown type '{http//schemas.microsoft.com/netfx/2009/xaml/activities}Catch({http//schemas.microsoft.com/netfx/2009/xaml/servicemodel}CommunicationException)'.'. ---> System.Xaml.XamlObjectWriterException: Cannot create unknown type '{http//schemas.microsoft.com/netfx/2009/xaml/activities}Catch({http//schemas.microsoft.com/netfx/2009/xaml/servicemodel}CommunicationException)'. en System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType) en System.Xaml.XamlWriter.WriteNode(XamlReader reader) en System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter) en System.Xaml.XamlServices.Load(XamlReader xamlReader) en UiPath.ActivityCompiler.CompilerV2.ActivityBuilderLoader.LoadFromString(String content) --- Fin del seguimiento de la pila de la excepción interna --- en UiPath.ActivityCompiler.CompilerV2.ActivityBuilderLoader.LoadFromString(String content) en UiPath.ActivityCompiler.CommandLine.ProgramExtensions.<>c__DisplayClass2_2.<ExecuteCompilerV2>b__6() en System.Lazy1.CreateValue()
en System.Lazy1.LazyInitValue() en System.Lazy1.get_Value()
en UiPath.ActivityCompiler.CompilerV2.LibraryFactory.<>c__DisplayClass8_0.b__1(Int32 _)
en System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.b__1()
en System.Threading.Tasks.Task.InnerInvoke()
en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
en System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )<—

—> (Nº de excepción interna 1) UiPath.ActivityCompiler.Exceptions.UiPathLocalizedException: Unable to create activity builder for document. Reason was ‘Cannot create unknown type ‘{http//schemas.microsoft.com/netfx/2009/xaml/activities}Catch({http//schemas.microsoft.com/netfx/2009/xaml/servicemodel}CommunicationException)’.’. —> System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http//schemas.microsoft.com/netfx/2009/xaml/activities}Catch({http//schemas.microsoft.com/netfx/2009/xaml/servicemodel}CommunicationException)’.
en System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)
en System.Xaml.XamlWriter.WriteNode(XamlReader reader)
en System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
en System.Xaml.XamlServices.Load(XamlReader xamlReader)
en UiPath.ActivityCompiler.CompilerV2.ActivityBuilderLoader.LoadFromString(String content)
— Fin del seguimiento de la pila de la excepción interna —
en UiPath.ActivityCompiler.CompilerV2.ActivityBuilderLoader.LoadFromString(String content)
en UiPath.ActivityCompiler.CommandLine.ProgramExtensions.<>c__DisplayClass2_2.b__6()
en System.Lazy1.CreateValue() en System.Lazy1.LazyInitValue()
en System.Lazy1.get_Value() en UiPath.ActivityCompiler.CompilerV2.LibraryFactory.<>c__DisplayClass8_0.<Build>b__1(Int32 _) en System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.b__1()
en System.Threading.Tasks.Task.InnerInvoke()
en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
en System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )<—

Hello,

i have a similar problem, did you find a solution?

Kind regards

Yes, I found the solution.

The issue with publishing is specific to library only and it works fine when used with Process

Also its specific only with version 2019.10.3 and above where UiPath introduced the New compiler for library.

As an workaround you can use the legacy complier by changing the Development.json under C:\Program Files (x86)\UiPath\Studio\Profiles

value to changed
{ “name”: “UseLegacyLibraryCompiler”, “value”: true }

After this change you should be able to publish the package.

If you compile with Studio 21.4.3 or later, the issue is fixed (you can see it in releases notes):

2021.4.3 - UiPath Release Notes

  • A library compilation error no longer occurs when you try to publish a library created in a previous version of Studio that contains a Try Catch activity which catches a System.ServiceModel.CommunicationException exception. The issue occurred for libraries created in Studio versions starting with 2019.10.5.

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