Add references to .NET Framework DLL libraries in GoLang app
Javonet enables software developers to instantly integrate several programming languages. Javonet is available for Windows, Linux and Mac operating systems as a downloadable package for supported programming languages. This article lists getting started sections for supported technologies.
Javonet allows you to reference and use modules or packages written in (Java/Kotlin/Groovy/Clojure, C#/VB.NET, Ruby, Perl, Python, JavaScript/TypeScript) like they were created in your technology.
Javonet allows to use any library from all supported technologies. As with any regular application, necessary libraries need to be referenced.
// use Activate only once in your app
Javonet.Activate("your-license-key")
// create called runtime context
calledRuntime, _ := Javonet.InMemory().Clr()
// set up variables
libraryPath := resourcesDirectory + "/TestClass.dll"
// load custom library
calledRuntime.LoadLibrary(libraryPath)
The argument is a relative or full path to .NET Framework DLL.
If the .NET Framework DLL has dependencies on other .NET Framework DLL, the latter needs to be added first.
After referencing the .NET Framework DLL any objects stored in this package can be used.
Use static classes, create instances, call methods, use fields and properties and much more.
Was this article helpful?