Because .csx
is intended for scripting without a whole project involved, it has support for a few directives that aren't necessary when you're working in the context of a project.
For example, there an #r
directive to load a DLL, and a #load
directive to load another .csx
file. See the example at https://learn.microsoft.com/en-us/archive/msdn-magazine/2016/january/essential-net-csharp-scripting.
In a C# project, all the C# files included in the project are automatically loaded, and there are directives in the project file to include nuget packages, dlls, etc.