Skip to content

Error <The name 'Require' does not exist> when trying the sample for webapi server #6

Open

Description

@farmas

Following the sample, I am running into the following error when running the .csx file for the webapi server:

C:\dev\temp\scriptcs2> scriptcs server.csx
ERROR: Roslyn.Compilers.CompilationErrorException: C:\dev\temp\scriptcs2\server.csx(7,14): error CS7012: The name 'Require' does not exist in the current context (are you missing a reference to assembly 'ScriptCs.Contracts, Version=0.7.0.0, Culture=neutral, PublicKeyToken=null'?)
at Roslyn.Scripting.CommonScriptEngine.CompilationError(DiagnosticBag localDiagnostics, DiagnosticBag diagnostics)
at Roslyn.Scripting.CommonScriptEngine.Compile(String code, String path, DiagnosticBag diagnostics, Session session, Type delegateType, Type returnType, CancellationToken cancellationToken, Boolean isInteractive, Boolean isExecute, CommonCompilation& compilation, Delegate& factory)
at Roslyn.Scripting.CommonScriptEngine.CompileSubmission[T](String code, Session session, String path, Boolean isInteractive)
at ScriptCs.Engine.Roslyn.RoslynScriptEngine.Execute(String code, Session session)

Cheers!

Activity

  1. glennblock commented on Aug 16, 2013

    @glennblock
    Contributor

    Ugh that sounds like something is seriously broken.

    -----Original Message-----
    From: "Federico Silva Armas" notifications@github.com
    Sent: ‎8/‎15/‎2013 11:44 PM
    To: "scriptcs/scriptcs-webapi" scriptcs-webapi@noreply.github.com
    Subject: [scriptcs-webapi] Error <The name 'Require' does not exist> whentrying the sample for webapi server (#6)

    Following the sample, I am running into the following error when running the .csx file for the webapi server:
    C:\dev\temp\scriptcs2> scriptcs server.csx
    ERROR: Roslyn.Compilers.CompilationErrorException: C:\dev\temp\scriptcs2\server.csx(7,14): error CS7012: The name 'Require' does not exist in the current context (are you missing a reference to assembly 'ScriptCs.Contracts, Version=0.7.0.0, Culture=neutral, PublicKeyToken=null'?)
    at Roslyn.Scripting.CommonScriptEngine.CompilationError(DiagnosticBag localDiagnostics, DiagnosticBag diagnostics)
    at Roslyn.Scripting.CommonScriptEngine.Compile(String code, String path, DiagnosticBag diagnostics, Session session, Type delegateType, Type returnType, CancellationToken cancellationToken, Boolean isInteractive, Boolean isExecute, CommonCompilation& compilation, Delegate& factory)
    at Roslyn.Scripting.CommonScriptEngine.CompileSubmissionT
    at ScriptCs.Engine.Roslyn.RoslynScriptEngine.Execute(String code, Session session)
    Cheers!
    —
    Reply to this email directly or view it on GitHub.

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