GithubHelp home page GithubHelp logo

isabella232 / razor.vscode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aspnet/razor.vscode

0.0 0.0 0.0 791 KB

[Archived] This repo has been migrated. Please use the https://github.com/aspnet/AspNetCore repo instead.

License: Apache License 2.0

Batchfile 0.05% Shell 0.95% PowerShell 0.68% TypeScript 22.50% C# 75.56% HTML 0.07% JavaScript 0.19%

razor.vscode's Introduction

Razor.VSCode

This GitHub project has been archived. Ongoing development on this project can be found in https://github.com/aspnet/AspNetCore.

The Razor syntax provides a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content. This repo contains the tooling to enable Razor in Visual Studio Code. The Razor tooling ships as part of the Visual Studio Code C# extension.

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.

Get started

To use the Razor tooling for Visual Studio Code:

Disabling the Razor tooling

To disable the Razor tooling in Visual Studio Code:

  • Open the Visual Studio Code User Settings: File -> Preferences -> Settings
  • Search for "razor"
  • Check the "Razor: Disabled" checkbox

Building from source

Win/Linux/Mac Prerequisites:

Linux/Mac Prerequisites:

  • Mono (5.18.1 or later)

Clone the repo and restore Git submodules by running the following:

git clone https://github.com/aspnet/Razor.VSCode.git
cd Razor.VSCode
git submodule update --init --recursive

This repo uses the same set of build tools as the other ASP.NET Core projects. The developer documentation for building is the authoritative guide. Please read this document and check your PATH setup if you have trouble building or using Visual Studio Code

To build at the command line, run build.cmd or build.sh from the solution directory.

Run in Visual Studio Code

To run the built Razor tooling in Visual Studio Code:

  • Ensure you've run build.cmd or build.sh.

  • Ensure the installed dotnet from running the build script is on your path.

  • In the client directory run the following:

    npm install
    npm run compile
    
  • Open the solution folder in Visual Studio Code

  • Set the "razor.devmode" setting to true in the Visual Studio Code Workspace settings (File -> Preferences -> Settings -> Workspace Settings)

  • Run in the debugger (F5) using the Extension launch profile

  • A new Visual Studio Code instance will open as an Extension Development Host

  • Try out Razor tooling features in Pages/Index.cshtml or any other Razor file

    • NOTE: there may be a delay while the Razor Language Service starts up. See the Razor Log and OmniSharp log in the output window (View -> Output) to see the current status

Run all extension tests

To run all extension tests:

  • Close all instances of Visual Studio Code

  • From the client directory run:

    npm test
    

razor.vscode's People

Contributors

akshita31 avatar danroth27 avatar mkartakmsft avatar ntaylormullen avatar seangwright avatar sikebe avatar stevesanderson avatar stevesandersonms avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.