GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dragan/scriptcs: Write C# apps with a text editor, nuget and the power of Roslyn!

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

349 Commits
349 Commits

Folders and files

NameName
Last commit message
Last commit date
.nuget
.nuget
 
 
build
build
 
 
common
common
 
 
docs
docs
 
 
src
src
 
 
test
test
 
 
tools/xunit
tools/xunit
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
ScriptCs.sln
ScriptCs.sln
 
 
build.cmd
build.cmd
 
 

Repository files navigation

scriptcs

Why should you care?

Write C# apps with a text editor, nuget and the power of Rosyln!

Note: Roslyn is a pre-release CTP and currently an unsupported technology. As such there may be changes in Roslyn itself that could impact this project. Please bear that in mind when using scriptcs

  • More on why I developed this [here] (http://codebetter.com/glennblock/2013/02/28/scriptcs-living-on-the-edge-in-c-without-a-project-on-the-wings-of-roslyn-and-nuget/)
  • Check out our goals and rodmap [here] (https://github.com/scriptcs/scriptcs/wiki/Project-goals-and-roadmap)

Pre-reqs

  • Install scriptcs from Chocolatey cinst scriptcs or
  • Build the project from the source and put scriptcs.exe in your path.

Quick start

  • Open a cmd prompt as admin
  • run scriptcs -install scriptcs.webapi
  • create a server.csx with your favorite editor. Paste the text below into the file and save (notice no namespaces & no top level class).
public class TestController : ApiController {
  public string Get() {
    return "Hello world!";
  }
}

var webApi = Require<WebApi>();
var server = webApi.CreateServer("http://localhost:8080");
server.OpenAsync().Wait();

Console.WriteLine("Listening...");
Console.ReadKey();
server.CloseAsync().Wait();
  • run scriptcs server.csx

This will launch a web api host with a sample controller, which you can access from the browser.

How it works

scriptcs relies on Roslyn for loading loose C# script files. It will automatically discover nuget packages local to the app and load the binaries.

Docs

  • Referencing other scripts from your script
  • Debugging overview & How To

Contributing

  • Read our Contribution Guidelines.
  • List of all contributors to date. Thanks!

Credits

  • Special thanks to @filip_woj for being the inspiration behind this with his Roslyn Web API posts.
  • Thanks to the Roslyn team who helped point me in the right direction.

Coordinators

  • Glenn Block (@gblock)
  • Justin Rusbatch (@jrusbatch)
  • Filip Wojcieszyn (@filip_woj)

Community

Want to chat? In addition to Twitter, you can find us on Google Groups and JabbR!

License

Apache 2 License

About

Write C# apps with a text editor, nuget and the power of Roslyn!

scriptcs.net

Resources

Readme
License

Contributing

Contributing
Activity

Stars

4 stars

Watchers

4 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.