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

Nancy Sample does not work on mono #20

Open
johnjelinek opened this issue Jan 15, 2015 · 6 comments
Open

Nancy Sample does not work on mono #20

johnjelinek opened this issue Jan 15, 2015 · 6 comments

Comments

@johnjelinek
Copy link

$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Oct 22 10:09:38 BST 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           normal
    SIGSEGV:       altstack
    Notification:  kqueue
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            sgen

I had to rename packages.config to scriptcs_packages.config to do scriptcs -install.

$ scriptcs start.csx
(12,94): error CS0246: The type or namespace name `CustomRouteDescriptionProvider' could not be found. Are you missing an assembly reference?
(17,15): error CS0246: The type or namespace name `PathProvider' could not be found. Are you missing an assembly reference?
/Users/jjelinek/Projects/restsharp-webapi-auth/start.csx(14,45): error CS0246: The type or namespace name `Bootstrapper' could not be found. Are you missing an assembly reference?
@johnjelinek
Copy link
Author

I think the rename step is because of this commit: scriptcs/scriptcs@0b4acc0

@adamralph
Copy link
Contributor

@johnjelinek if you are using the latest nightly build, then yes, it has the renamed file system artifacts but it doesn't do the rename automatically. In that version, you can do the renaming by doing:-

scriptcs start.csx -Modules migrate

Note that we are taking another direction with this now and we anticipate that the 'migrate' module will be removed in 0.13 (and in a forthcoming nightly) and instead scriptcs will detect and auto-migrate for you (it will only make copies of the current artifacts instead of renaming, just in case they are being used for something else, e.g. a regular .NET solution).

As for the actual problem you are raising here, nothing springs to mind right now and I don't have time to investigate right now but if it is blocking you, you could try and use the Nancy script pack instead https://www.nuget.org/packages/ScriptCs.Nancy/ which, AFAIK, does work on Mono.

@johnjelinek
Copy link
Author

I rolled back to v0.12 before that rename was required. Problem still exists. I decided to just do dev on Windows :/ -- neither webapiselfhost / nancy worked for me on mono. The script pack does work though on mono :) Thanks!

@adamralph
Copy link
Contributor

0.12 works without the scriptcs_ prefix, so if you still needed it then your roll back must have failed.

@johnjelinek
Copy link
Author

I didn't need to rename for v0.12. Had the same error though when running.
On Jan 16, 2015 12:39 AM, "Adam Ralph" [email protected] wrote:

0.12 works without the scriptcs_ prefix, so if you still needed it then
your roll back must have failed.


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

@adamralph
Copy link
Contributor

OK. We'll investigate the problem with the sample on Mono. Thanks for raising it.

I'm glad the script pack works though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants