I have created a test package with Visual Studio 2022 using the .NET 6 Class Library and I simply cannot see the package in the “Manage Packages” part of UiPath Studio.
What I have tried so far:
Added “Activities” to the ID of the package
Tried changing “Compatibility Mode” (Package can be seen on legacy)
Tried reducing the dependencies to a minimum (Hence only one activity in the package)
Tried using .NET 5
Tried adding the dependencies to the Nuget Package
I could really use some help as I am getting quite desperate, it seems like I have been googling different solutions for ages now and there is no solid documentation from UiPath on how to build a .NET 6 package from scratch, only porting an older Framework version to 6
I have followed the guide step by step and still fail to have the package visible in UiPath Windows Compatibility.
I have tried using both .net6.0 and .net6.0-windows Target Frameworks, but it didn’t seem to do much.
When using the Legacy Compatibility I can see the newly created package.
The problem I have is that my initial package is not based on the UiPath Activity Creator, but rather a simple Class Library.
I am now able to see the package in the UiPath Studio by using the built in Publish function in VS. The problem that I face now is that the package is red and an error is displayed “Resolved, but found empty”
Have you by any chance encountered this error before? The publish function for 4.6.1 works fine with the same Class Library.
EDIT:
After some investigation I found that the error I am getting is:
NU1202: Package Config 1.0.0 is not compatible with net6.0-windows7.0 (.NETCoreApp,Version=v6.0). Package Config 1.0.0 supports: net (.NETFramework,Version=v0.0)
Looks like it has something to do with the .NET version not attaching to the .dll to put it in layman terms.
If I follow this documentation and use Nuget Package Explorer the Package is not visible in UiPath Studio, if I repeat all of the same steps and use the Publish functionality within VS I can see the package, but there is an error saying it’s empty.
I am pretty sure I am making a mistake while creating a package through Nuget Package Explorer, I find the explanation in the documentation you provided not very intuitive. I am talking about this step in particular:
Right-click each of the three folders added in the previous step and select Add Existing File to load the external assembly (.dll) files required for each one. The files are located in a subfolder with the framework name located in the \bin\Release folder of each project:
net461 - MathSquareOfSum.dll and MathSquareOfSumWindows.dll
net6.0 - MathSquareOfSum.dll
net6.0-windows - MathSquareOfSum.dll and MathSquareOfSumWindows.dll
I assume that after building the solution I should add the corresponding .dlls to their respective folders, for example:
MathSquareOfSum.dll in the 4.6.1 release folder goes to the 4.6.1 package folder;
MathSquareOfSumWindows.dll in the 4.6.1 release folder goes to the 4.6.1 package folder;
MathSquareOfSum.dll in the 6.0 release folder goes to the 6.0 package folder; and so on…
Could you confirm if I understood that part correctly?
I have found the solution to the problem I was having and I have some suggestions to the “Migrating Activities to .NET 6” documentation. Maybe you could guide me on how to create a suggestion ticket or create one yourself @marian.platonov
The solution to the problem was to add the .NET 6 and .NET 4.6.1 dependencies to the Nuget Package via Nuget Package Explorer Metadata as seen in the pictures below:
After adding these dependencies I was able to see and use my package in both “Windows” and “Windows-Legacy” Compatibilities in UiPath.