System.Windows.Forms not available?

In the Imports tab at the bottom if UIPath Studio I’m attempting to import System.Windows.Forms to get a better version of the FolderDialog than the one that is built in.

When I type System.Windows.Forms in ‘Enter or Select namespace’, the only option I have is System.Windows.Forms.Integration.

How can I get System.Windows.Forms? In the Invoke Code activity, it auto fills when I type System.Windows.Forms.FileDialog, so I’m confused.

1 Like

Hi,

What version of Studio are you using? And what packages (and versions) do you have in your project?

I just tried in 2018.4.3 and it’s working fine.

Regards
Silviu

2019.1.0 on Windows 10

That project were it worked fine was created in a previous version of Studio. I tried in a new project and I faced the same issue.

I had to manually edit the xaml file to make it work in the new project.
Add an Assembly Reference to System.Windows.Forms.
<AssemblyReference>System.Windows.Forms</AssemblyReference> in <TextExpression.ReferencesForImplementation> collection.

12 Likes

@Silviu I am also working on a project where system.windows.forms namespace is no longer available. Can you provide specific instructions on how to manually edit the xaml file. I’m unfamiliar with that process. Thanks!

Hi @Barrybo,

The xaml file is basically just a text file with a XML structure. You can open it in Notepad or your preferred text editor and do the changes mentioned in the previous post. Save the file in the text editor and then open it again in UiPath Studio. Now you should have the namespace available.

2 Likes

Thanks @Silviu this was super helpful

1 Like