# Invoke code error at line -3

**URL:** <https://forum.uipath.com/t/invoke-code-error-at-line-3/843960>\
**Category:** Studio\
**Tags:** designer-canvas, bug, studio, microsoft-office365, system, activities\
**Created:** [January 28, 2025, 9:03pm UTC](https://forum.uipath.com/t/invoke-code-error-at-line-3/843960 "2025-01-28T21:03:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [January 28, 2025, 11:47pm UTC](https://forum.uipath.com/t/invoke-code-error-at-line-3/843960/3 "2025-01-28T23:47:04Z")

</div>

Hi,

The following topic will help you. It may be necessary to edit xaml file with text editor directly.

> [@Reading xml - xmlDocument](https://forum.uipath.com/t/reading-xml-xmldocument/563495):
>
> I am having a problem when trying to read an xml through invoke code, I have the following script DocumentXML = New System.Xml.XmlDocument() DocumentXML.Load(Path) But it generates the following error Invoke Code: No compiled code to run error BC31051: Namespace or type ‘System.Xml.XPath’ has already been imported. At line -2 I don’t quite understand what I should do

Regards,

---

_[View the full topic](https://forum.uipath.com/t/invoke-code-error-at-line-3/843960)._
