As much as I didn’t want to use python for this - it seems to work well and is simple enough to implement.
Below example works for me and allows to use .NET Framework dlls in Julia:
using PyCall
(dll_folder, dll_file) = splitdir(raw"C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Collections.dll")
py"""
import sys
sys.path.append($dll_folder)
"""
clr = pyimport_conda("clr", "pythonnet")
clr.AddReference(splitext(dll_file)[1]);
Collections = pyimport("System.Collections");
myQ = Collections.Queue()
myQ.Enqueue("Hello");
myQ.Enqueue("World");
myQ.Enqueue("!");
while myQ.Count > 0
println(myQ.Dequeue())
end
Output:
Hello
World
!