I have a Library project where my workflows resides in subfolders
Example:
/Core/Activity1
/Core/Activity2
Since today I get compilation error when publishing the library.
''Unexpected error has occurred during the library compilation process:
System.AggregateException: One or more errors occurred. —> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
The problem occures if /Core/Activity1 do a ‘Invoke Workflow File’ of /Core/Activity2
I guess this is a bug in some resent update. Anyone have an idea how can I get around this problem without changing my folder structure?
I’m using
Studio 2019.10.3 - 1/20/2020
Community License
EXE Installer
Microsoft Windows 10 Enterprise 64-bit
.NET Framework Version 4.7.2 or later
but the error shows like the key mentioned is not the one in the dictionary variable
is it so
kindly check that once if any collection variable is accessed along that workflow with a key value pair
Cheers @Brasse2873
This error is not linked to your workflow but it is caused by the compilation process. It seems sub-folders are not supported in library - although this limitation is not documented - although this is not unusual in UiPath Hard to say if this is bug or feature
If you check the output panel you will see there a warning in preprocess phase.
I did a quick test now:
I put WF1 and WF2 in a subfolder, WF1 invokes WF2 using relative path - compilation failed.
After removing the invoke of WF2 from WF1 the compilation finished.
My test showed that the library worked fine in runtime. I moved the code so there were no code where ‘Invoke Workflow file’ pointed at. Test was done from orchestrator and from studio.
What is the difference/advantages between the legacy library compiler and the modern library compiler other than the disadvantage of not being able to organize the XAMLs in it’s respective folders?
By using the legacy compiler, what impact does it have on the existing Jenkins build etc for CI/CD? Any changes required there as well? Please advise.
@Teja_G This issue is fixed in Studio 2019.10.4.
By using the new library compiler a library compile time should be faster, also the load time of compiled activities should be faster.
It shouldn’t have any impact on existing Jenkins builds for CI/CD unless you use “UiPath.ActivityCompiler.CommandLine.exe” in your builds. By default the command line application will compile a library using the legacy compiler unless you specify the flag ‘-useCSharpCompiler true’ to use the new compiler.
TL:DR; The compiler compiles commented out code (disable activity), as a reason why publishing a library using 2019.10 throws errors the The given key was not present in the dictionary error message. hth
One note, if someone has somehow gotten to the bottom of this thread and is reading this without having a resolution. Not sure if this should be recorded as an issue or not, but in my case, my compilation issues were due to one file, having an invoke workflow activity to an external file system file. I know this isn’t legit when building a library, but what was interesting is that the invoke workflow activity was commented out. The only highlight here, whether it’s right or wrong to compile it, is that it’s different than previous versions. I don’t see anywhere in any of the comments of this specific scenario. The commented out code was there before i upgraded to 2019.10. Figured i’d share.
I am currently using UiPath Studio 2020.4.3 Enterprise and I am still facing the same issues. Is this bug still not fixed? Is this behavior fixed in any newer version? I really unlikely want to use one of the two supposed workarounds.