Unable to call Classes from Namespace after adding Activities .NET6

Hello All,

Recently I had some issues with migrating a .NET4.6.1 activity package to .NET6, fortunately I was able to solve my issues. However I have ran into a completely different issue, which I must admit caught me off-guard.

The problem I am facing is that I cannot call a Class from within the Namespace of the uploaded Package. This problem only appears in the .NET6 package, the .NET4.6.1 works perfectly fine. If I remove the Activities from the Package, I can call the Class from the Namespace just fine and it works as intended. However, as soon as I add at least 1 Activity to the package, the Namespace seems to be uncallable.

An example of that would be (Please ignore the errors and the simplicity of the Class, this example is just an example) :


I am not sure why this is happening as I mentioned previously it works perfectly fine with .NET4.6.1 and with .NET6 if no Activities are added. I saw some Visual Studio problems being solved by @DeanMauro, maybe you could help a fellow enthusiast out? Thank you!


Can you add the namespace in imports tab?

Hi Konrad,

Yes, I am able to add the Namespace in both .NET6 and .NET4.6.1, however in .NET6 if any activities are added to the same package it seems that the Namespace become empty.

After some more testing/troubleshooting I have found that the issue is a bit different than I initially thought, although similar in some aspects.

It appears that the Namespace can be called and functions properly, but UiPath does not show a context menu for that Namespace, please find a .NET6 example below:

Without Activities:

With Activities:

As you can see Without the Activities added to the Package, UiPath successfully shows the context menu for the Namespace that comes with the package.
However, after adding the Activities to the Package, you can see that there is no context menu for the Namespace, but the Assign below works perfectly fine.

At this point I’m really stumped and have no idea what could be causing this, I’ll try to look more into it, but it seems like the issue that is causing this might be related to the “System.Activities” library.

After testing the code bit by bit I have come to the conclusion that the snippet of code below is causing all of the issues I am having, with it removed the Namespace is available in the context menu.

foreach (Worksheet sheet in Workbook.Worksheets)

And to be even more exact this part of the code above:


Can someone from @uipath please look into this and let me know if this problem can be solved by changing the code or is this a UiPath related issue?

Just reiterate the problem I am having is not being able to see the Context Menu for the specific Namespace, yet it works if I type it out from my own memory.

I have found a way to fix the problem by changing how the Worksheets are looped through:

for (int i = 1; i < Workbook.Worksheets.Count + 1; i++)

However, this is still a very strange reason for the Namespace not showing a Context Menu in UiPath and I have no idea why it was happening.

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