Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace aliasing causes an exception to be thrown #826

Closed
bchavez opened this issue Sep 6, 2014 · 4 comments · Fixed by #1000
Closed

Namespace aliasing causes an exception to be thrown #826

bchavez opened this issue Sep 6, 2014 · 4 comments · Fixed by #1000
Assignees
Milestone

Comments

@bchavez
Copy link

bchavez commented Sep 6, 2014

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

https://groups.google.com/forum/m/?fromgroups#!topic/scriptcs/7YiOeeGgaZw

@filipw filipw added P1 labels Sep 6, 2014
@filipw filipw self-assigned this Sep 6, 2014
@filipw
Copy link
Member

filipw commented Sep 6, 2014

thanks for reporting

@bchavez
Copy link
Author

bchavez commented Sep 11, 2014

I can also report that ScriptCS v0.9.0 is not affected by this bug. Although, 0.9.0 has some some strange behavior recursively walking \bin directories.

@glennblock
Copy link
Contributor

@bchavez as a workaround, does it work if you fully qualify the reference?

@glennblock
Copy link
Contributor

Brian I submitted a fix several weeks ago to not recursively walk dirs
which was merged into Dev.

On Sat Jan 24 2015 at 10:28:19 PM Brian Chavez notifications@github.com
wrote:

Hi @glennblock https://github.com/glennblock , unfortunately, no, the
fully qualified reference doesn't work either.

var inline = PreMailer.Net.PreMailer.MoveCssInline(layout, true);
File.WriteAllText("Layout.Inline.html", inline.Html);

Produces error:

error CS0103: The name 'PreMailer' does not exist in the current context

I'm using latest version on choco v0.12


Reply to this email directly or view it on GitHub
#826 (comment).

@adamralph adamralph changed the title Namespace Aliasing Namespace aliasing causes an exception to be thrown Mar 27, 2015
@adamralph adamralph added this to the v0.15 milestone Mar 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants