UiPath Studio throws OutOfMemoryException when I publish a library project which contains about 250 xaml files.
Windows task manager shows that UiPath uses over 3GB memory.
I think UiPath cannot use over 4GB memory because it is a 32-bit system.
Do anyone have a idea how to avoid this problem?
I know I can avoid the problem if I divide the library project into smaller projects.
But I don’t want to divide it because xaml files have dependencies between each other and I already use the library for many robots.
Sorry, I haven’t.
Publish sometimes succeed after restarting Studio.
So, I make it through now.
But I know it won’t work if I add more xaml files to the project.
@alexg I made a sample project which causes OutOfMemoryException.
It contains 250 xaml files which are all the same content.
the file size is under 6 Kbyte.
COMPILER: Compiling [56/80] - ‘C:\Users\robouser01\Documents\UiPath\Common.Activities\common\test061\Test.xaml’
COMPILER: Compilation of ‘C:\Users\robouser01\Documents\UiPath\Common.Activities\common\test061\Test.xaml’ completed (787 ms)
COMPILER: Compiling [57/80] - ‘C:\Users\robouser01\Documents\UiPath\Common.Activities\common\test065\Test.xaml’
Unexpected error has occurred during the library compilation process:
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
at System.Reflection.Internal.NativeHeapMemoryBlock.DisposableData…ctor(Int32 size)
at System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Boolean isFileStream, Int64 start, Int32 size)
at System.Reflection.PortableExecutable.PEReader…ctor(Stream peStream, PEStreamOptions options, Int32 size)
at Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
at UiPath.ActivityCompiler.Compiler.DependencyHelper.<>c.b__1_1(Type s)