Closed Xemrox closed 2 years ago
Hi,
We already support using statements, for example, in this repository, I am using System.Text.RegularExpressions;
in commit-lint.csx file. although I'm not sure why you couldn't do that! can you provide an example?
Also, you can add external assemblies or scripts using #r
and #load
keywords:
I wasn't aware of the #r
and #load
within csscript.
Here is a broken example which can be fixed by adding a #r "System.Linq"
using System.Linq;
private var test = new [] {"a", "b", "c"};
private var test2 = test.First();
Details
Hello,
while writing a new csx for
husky exec
I tried to useSystem.Linq
and failed to do so. This results propably from the static assembly list here: https://github.com/alirezanet/Husky.Net/blob/07f36179c589c825595b97116fa6fe82ab5514ab/src/Husky/Cli/ExecCommand.cs#L37-L39 How about we create a mechanism like the following in a csx file:Which hints the execution to include that particular assembly.
Greetings Xemrox