Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Ironpython in Visual Studio Code

I trying to use IronPython in Visual Studio Code. How do I point Visual Studio Code to my IronPython (C:\Program Files (x86)\IronPython 2.7\ipy.exe). I've searched the forums and was unsuccessful. I've tried changing visual studio code settings to point to the ipy.exe to no avail

"python.pythonPath": "C:\Program Files (x86)\IronPython 2.7\ipy.exe"

When I type the code below I get an error stating: Unable to import 'clr'

import clr
clr.AddReference('Microsoft.Office.Interop.Excel')
like image 800
Charlie P Avatar asked Feb 05 '26 10:02

Charlie P


1 Answers

As of the Python extension version 2020.5.0, this fix

allows the user to manually enter the path to a Python Interpreter, and i was able to successfully use IronPython as an interpreter in VS Code (to run files)

like image 124
Thomas Vetterli Avatar answered Feb 08 '26 16:02

Thomas Vetterli