A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/79588662/addreference-method-in-clr-pythonnet-is-not-found below:

visual studio 2022 - AddReference Method in CLR - PythonNet is not found

Trying to add System assembly in a python code:

clr.AddReference(assembly_name)

where assembly name is Sytem, but in this **AddReference ** is attribute is not found under clr. Also in PythonNet clr is present at two different location at pythonnet and C:\Users\pythonnet\src\runtime\Resources\clr.

Both of them does not contain any reference to AddReference

[enter image description here](https://i.sstatic.net/IYDT60rW.png)

How to add C# reference library in Python code with Python 3.11 and .NET version 8 using PythonNET?

  1. I tried setting up the user environment variable named PYTHONNET_PDLL - C:\User\AppData\Local\Microsoft\WindowsApps\python.exe - But this didn't had any affect

  2. Tried using set_runtime function to set the assembly but that also didn't work enter image description here


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4