Namespace Aliasing

14 views
Skip to first unread message

Brian Chavez

unread,
Sep 5, 2014, 7:20:30 PM9/5/14
to scri...@googlegroups.com
Hi there,

By default, System.IO namespace is added to every script.

Problem is I have an assembly that defines Fluent.IO.Path that conflicts with System.IO.Path.

So, I'd need to write something like this:

using Path=Fluent.IO.Path;

However, when I try to run my script, I get the following error:
"error CS0246: The type or namespace name 'Path' could not be found (are you missing a using directive or an assembly reference?)"

Any help would be great.

Running scriptcs in debug mode, I can confirm the assembly is being found and loaded.

Thank you,
Brian

Filip W

unread,
Sep 6, 2014, 4:38:59 AM9/6/14
to Brian Chavez, scri...@googlegroups.com
Hi

This is a bug in the Roslyn Engine. The fix is fairly simple, I’ll push it this weekend. Could you open an issue on github for tracking purposes?

In the meantime, you can use the mono engine as a workaround:
scriptcs myscript.csx -modules mono

It is not affected by the bug.

cheers
filip

Brian Chavez

unread,
Sep 6, 2014, 4:49:48 AM9/6/14
to scri...@googlegroups.com
https://github.com/scriptcs/scriptcs/issues/826

Glad it wasn't just me :)

Thank you,
Brian

Reply all
Reply to author
Forward
0 new messages