For several months we've had the feature in scripts, which allows to reference nuget packages
#r "nuget: Coroutine, 2.1.5"
Log.Info("Hello, World!"); //you can use Coroutine classes in that script
The support has not been extended and you can reference assemblies in 2 other ways now.
Important! This method of referencing assemblies is available only inside Script.csx
which is equivalent of your Program.cs
in "normal" C#
Syntax is very similar.
#r "assemblyPath: D:\Work\EAExile\EAExileAgent.Shared.dll"
Log.Info("Hello, World!"); //you can use EAExileAgent classes in that script
This method of referencing assemblies allows you to reference those assemblies which are either:
Assembly.Load
or via any other means, but they are already part of AssemblyLoadContext/AppDomainHistorically, EA referenced A LOT of assemblies by default, more than 300 assemblies. This allows users to save some type on pre-configuring these dependencies on each and every C# action/BT node/etc, but this is not a good way long-term. Gradually, I'll be de-linking more and more default assemblies and will include a better auto-completion techniques which would allow to easily include those libraries which are needed for your script. In the future, this will make upgrading the program easier for everyone
#r "assemblyName: Grpc.Net.Client"
Log.Info("Hello, World!"); //you can use Grpc.Net.Client classes in that script