Go to file
Ryan Nowak 211561a6a6 Implement 2-phase compilation
This is a working (all tests passing) implementation of the two-phase
compilation system we will need for component discovery.

This builds on top of work we've doing in Razor, including the Razor
SDK, MSBuild tasks, and CLI/server.

This currently *does* discovery components during the build process, but
it doesn't use that data for anything yet.

It works like this:
1. Generate class declarations (structure only, no method bodies)
2. Compile a 'temp' assembly using the .cs files and output of 1.
3. Do component discovery using the 'temp' assembly
4. Generate class definitions (including method bodies)
5. Compile the 'real' assembly using the .cs files and output of 4.
2018-03-14 11:23:40 +00:00
build
samples Implement 2-phase compilation 2018-03-14 11:23:40 +00:00
src Implement 2-phase compilation 2018-03-14 11:23:40 +00:00
test Implement 2-phase compilation 2018-03-14 11:23:40 +00:00
tooling Get rid of RazorCompiler 2018-03-14 11:23:40 +00:00
.appveyor.yml
.gitignore
.travis.yml
Blazor.sln
BlazorTooling.sln
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Directory.Build.props
LICENSE.txt
README.md
THIRD-PARTY-NOTICES.txt
global.json
nuget.config
version.props

README.md

Blazor

An experimental web UI framework using C#/Razor and HTML, running in the browser via WebAssembly

Gitter

Blazor is a .NET web framework that runs in any browser. You author Blazor apps using C#/Razor and HTML.

Blazor uses only the latest web standards. No plugins or transpilation needed. It runs in the browser on a real .NET runtime (Mono) implemented in WebAssembly that executes normal .NET assemblies. It works in older browsers too by falling back to an asm.js based .NET runtime.

Blazor will have all the features of a modern web framework, including:

  • A component model for building composable UI
  • Routing
  • Layouts
  • Forms and validation
  • Dependency injection
  • JavaScript interop
  • Live reloading in the browser during development
  • Server-side rendering
  • Full .NET debugging both in browsers and in the IDE
  • Rich IntelliSense and tooling
  • Ability to run on older (non-WebAssembly) browsers via asm.js
  • Publishing and app size trimming

Note: Blazor is an experimental project. It's not (yet) a committed product. This is to allow time to fully investigate the technical issues associated with running .NET in the browser and to ensure we can build something that developers love and can be productive with. During this experimental phase, we expect to engage deeply with early Blazor adopters like you to hear your feedback and suggestions.

To see Blazor in action, check out Steve Sanderson's prototype demo at NDC Oslo last year. You can also try out a simple live Blazor app.

Getting Started

We are still very early in this project. There isn't yet anything you can download nor any project template you can use. Most of the planned features aren't implemented yet. Even the parts that are already implemented aren't yet optimized for minimal payload size. If you're keen, you can clone the repo, build it, and run the samples and tests.

Build

Prerequisites:

Run dotnet build Blazor.sln from the solution directory.

Run tests

Run dotnet test test/<dir>/<project>.Test.csproj

Run end-to-end tests

Prerequisites:

  • Install selenium-standalone (requires Java 8 or later)
    • npm install -g selenium-standalone
    • selenium-standalone install
  • Chrome

Run selenium-standalone start

Run dotnet test test\Microsoft.AspNetCore.Blazor.E2ETest\Microsoft.AspNetCore.Blazor.E2ETest.csproj

Run all tests

Install prerequisites for E2E tests

Run dotnet test test\AllTests.proj

Build VS Tooling

Prerequisites:

  • Visual Studio 2017 15.6 (or newer)
  • Visual Studio extension development features (install via Visual Studio Installer)

Open a VS Developer Command Prompt

Run the following instructions from the solution directory.

msbuild BlazorTooling.sln /t:Restore
msbuild BlazorTooling.sln

Use VS Tooling

To install the Tooling following prerequisites must be installed first:

  • Visual Studio 2017 15.6 (or newer)
  • Workload: ASP.NET and web development

Contributing

There are lots of ways that you can contribute to Blazor! Read our contributing guide to learn about our development process and how to propose bug fixes and improvements.

Still got questions?

Check out our FAQ or open an issue.