It depends on your UiPath.System.Activities, which version have you referenced?
or we would do: importing namespace: UiPath.Platform.ResourceHandling and creating an IRessource by: LocalResource.FromPath("c:\abc.def.txt")
UiPath.Platform.ResourceHandling
LocalResource.FromPath("c:\abc.def.txt")