I can't compile my packaged because the computer run out of RAM

I can’t compile my packaged because the computer run out of RAM

Hi @KingQuestions

What is the error message you are getting?

Just guessing here, but many people have issues compiling their package because their project folder contains too many large files. The size limit of a project is 30mb, I believe, so make sure your project folder is under that size before you publish.

1 Like

Hi @KingQuestions

How much RAM do you have in your machine? And usually how much of it is in use?

@ClaytonM

the library is only 3mb

Unexpected error has occurred during the library compilation process:
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
ved System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
ved System.Reflection.Internal.NativeHeapMemoryBlock.DisposableData…ctor(Int32 size)
ved System.Reflection.Internal.StreamMemoryBlockProvider.ReadMemoryBlockNoLock(Stream stream, Boolean isFileStream, Int64 start, Int32 size)
ved System.Reflection.PortableExecutable.PEReader…ctor(Stream peStream, PEStreamOptions options, Int32 size)
ved Microsoft.CodeAnalysis.ModuleMetadata.CreateFromStream(Stream peStream, PEStreamOptions options)
ved Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
ved UiPath.ActivityCompiler.Compiler.DependencyHelper.<>c.b__1_1(Type s)
ved System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() ved System.Linq.Enumerable.<ConcatIterator>d__591.MoveNext()
ved System.Linq.Enumerable.d__641.MoveNext() ved System.Linq.Enumerable.<ConcatIterator>d__591.MoveNext()
ved System.Linq.Enumerable.d__641.MoveNext() ved System.Collections.Generic.List1…ctor(IEnumerable1 collection) ved System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
ved UiPath.ActivityCompiler.Compiler.XamlCompiler.<>c__DisplayClass8_1.b__5()
ved UiPath.ActivityCompiler.Logging.LoggingScope.Execute()
ved UiPath.ActivityCompiler.Logging.LoggingManager.ExecuteDocumentCompiler(Action action, XamlCompilerOptions options, WorkflowDocument wfDocument, Int32 index)
ved UiPath.ActivityCompiler.Compiler.XamlCompiler.<>c__DisplayClass8_0.b__2()
ved UiPath.ActivityCompiler.Logging.LoggingScope.Execute()
ved UiPath.ActivityCompiler.Logging.LoggingManager.ExecuteDocumentsCompiler(Action action)
ved UiPath.ActivityCompiler.Compiler.XamlCompiler.Compile()
ved UiPath.ActivityCompiler.CommandLine.Program.<>c__DisplayClass4_1.b__2()
ved UiPath.ActivityCompiler.Logging.LoggingScope.Execute()
ved UiPath.ActivityCompiler.Logging.LoggingManager.ExecuteXamlCompiler(Action action)
ved UiPath.ActivityCompiler.CommandLine.Program.<>c__DisplayClass4_1.b__0()
ved UiPath.ActivityCompiler.Logging.LoggingScope.Execute()
ved UiPath.ActivityCompiler.Logging.LoggingManager.ExecuteRunCompiler(Action action)
ved UiPath.ActivityCompiler.CommandLine.Program.RunCompiler(CompilerOptions programArgs)
ved UiPath.ActivityCompiler.CommandLine.Program.RunCompilerWithFile(StudioOptions opts)
ved UiPath.ActivityCompiler.CommandLine.Program.<>c.b__2_2(StudioOptions opts)
ved CommandLine.ParserResultExtensions.MapResult[T1,T2,TResult](ParserResult1 result, Func2 parsedFunc1, Func2 parsedFunc2, Func2 notParsedFunc)
ved UiPath.ActivityCompiler.CommandLine.Program.<>c__DisplayClass2_0.b__0()

I encountered exactly the same issue. Have you solved it?

I made a sample project and attached it here.

this library is under 1.5mb.

We have encountered the same issue, We have created a new library to test what caused this error for us and it seems that with around 40 xaml files there is no problem (regardles of the filesize 4kb-112kb tested) but when we have 60 of the files we do encounter the outofmemory error.

During publishing of the library we looked at the task manager to see if we ran out of RAM but this does not seem to be hapening still 0.5-1 GB of 8GB RAM left, so we don’t realy run out of memory on the RAM part.