Skip to content

Nancy Sample does not work on mono #20

Open

Description

@johnjelinek
$ 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?

Activity

  1. johnjelinek commented on Jan 15, 2015

    @johnjelinek
    Author

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

  2. adamralph commented on Jan 15, 2015

    @adamralph
    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.

  3. johnjelinek commented on Jan 16, 2015

    @johnjelinek
    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!

  4. adamralph commented on Jan 16, 2015

    @adamralph
    Contributor

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

  5. johnjelinek commented on Jan 16, 2015

    @johnjelinek
    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" notifications@github.com 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)
    .

  6. adamralph commented on Jan 16, 2015

    @adamralph
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions