Error Saving File: Cannot convert 'String' to 'ILocalResource'

Hello everyone,

I am building a web scraper, and I’m stuck trying to save the HTML content of a webpage to a local text file.

My Goal:

I have the HTML content in a string variable named pageHtml`` and the desired file path in a string variable namedfullFilePath`. I want to save the content to the file.

The Problem:

I am using the Write Text File activity from the UiPath.System.Activities package. Even though this is a core system activity, I keep getting a validation error that seems related to modern design: BC30512: Option Strict On disallows implicit conversions from ‘String’ to ‘ILocalResource’.

What I’ve Tried:

  • Using the Write Text File activity from UiPath.System.Activities.
  • Ensuring the UiPath.Classic.Activities package is installed.
  • Using Invoke Code and Invoke Power Shell as alternatives, but they also failed.
  • I’ve confirmed the “Use Local File” option still gives the error.
    My Environment: UiPath Studio Version:
    Studio 2026.0.181-cloud.21801 - 11/20/2025
    Enterprise License
    Pro
    User-mode Installation
    License Provider: Orchestrator
    Activation ID:
    Microsoft Windows 11 Pro 64-bit
    8.0.15

Could someone please help me understand why this is happening and how I can save this file correctly?

Thank you!

Hi Jerry,

The later UiPath activities use iResource data types which allow them to work on cross platform projects and handle local files aswell as cloud based files from the integration service.

If you Google it you will find plenty of topics and resources explaining how to use an iLocalResource

You need to use the static class LocalResource to build one from a path.

Its something like LocalResource.FromPath(“Path”)

You can also usually switch the input mode for the property/argument of the activity using the plus menu or pressing the ‘Use Local File’ to change it to a simple string input.

The documentation for that page might already explain all this, did you check that?