Today we released our first public preview of Blazor, a new experimental .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly. Blazor enables full stack web development with the stability, consistency, and productivity of .NET. While this release is alpha quality and should not be used in production, the code for this release was written from the ground up with an eye towards building a production quality web UI framework.
In this release we've laid the ground work for the Blazor component model and added other foundational features, like routing, dependency injection, and JavaScript interop. We've also been working on the tooling experience so that you get great IntelliSense and completions in the Razor editor. Other features that have been demonstrated previously in prototype form, like live reload, debugging, and prerendering, have not been implemented yet, but are planned for future preview updates. Even so, there is plenty in this release for folks to start kicking the tires and giving feedback on the current direction. For additional details on what's included in this release and known issue please see the release notes.
Let's get started!
Help & feedback
Your feedback is especially important to us during this experimental phase for Blazor. If you run into issues or have questions while trying out Blazor please let us know!
- File issues on GitHub for any problems you run into or to make suggestions for improvements.
- Chat with us and the Blazor community on Gitter if you get stuck or to share how blazor is working for you.
Also, after you've tried out Blazor for a while please let us know what you think by taking our in-product survey. Just click the survey link shown on the app home page when running one of the Blazor project templates:

Get started
To get setup with Blazor:
- Install the .NET Core 2.1 Preview 1 SDK.
- Install the latest preview of Visual Studio 2017 (15.7) with the ASP.NET and web development workload.
- Note: You can install Visual Studio previews side-by-side with an existing Visual Studio installation without impacting your existing development environment.
- Install the ASP.NET Core Blazor Language Services extension from the Visual Studio Marketplace.
To create your first project from Visual Studio:
- Select File -> New Project -> Web -> ASP.NET Core Web Application
- Make sure .NET Core and ASP.NET Core 2.0 are selected at the top.
-
Pick the Blazor template

- Press Ctrl-F5 to run the app without the debugger. Running with the debugger (F5) is not supported at this time.
If you're not using Visual Studio you can install the Blazor templates from the command-line:
dotnet new -i Microsoft.AspNetCore.Blazor.Templates
dotnet new blazor -o BlazorApp1
cd BlazorApp1
dotnet run
Congrats! You just ran your first Blazor app!
Building components
When you browse to the app, you'll see that it has three prebuilt pages: a home page, a counter page, and a fetch data page:

These three pages are implemented by the three Razor files in the Pages folder: Index.cshtml, Counter.cshtml, FetchData.cshtml. Each of these files implements a Blazor component. The home page only contains static markup, but the counter and fetch data pages contain C# logic that will get compiled and executed client-side in the browser.
The counter page has a button that increments a count each time you press it without a page refresh.

Normally this kind of client-side behavior would be handled in JavaScript, but here it's implemented in C# and .NET by the Counter component. Take a look at the implementation of the Counter component in the Counter.cshtml file:
@page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button @onclick(IncrementCount)>Click me</button>
@functions {
int currentCount = 0;
void IncrementCount()
{
currentCount++;
}
}
Each Razor (.cshtml) file defines a Blazor component. A Blazor component is a .NET class that defines a reusable piece of web UI. The UI for the Counter component is defined using normal HTML. Dynamic rendering logic (loops, conditionals, expressions, etc.) can be added using Razor syntax. The HTML markup and rendering logic are converted into a component class at build time. The name of the generated .NET class matches the name of the file.
Members of the component class are defined in a @functions block. In the @functions block you can specify component state (properties, fields) as well as methods for event handling or for defining other component logic. These members can then be used as part of the component's rendering logic and for handling events.
Note: Defining components in a single Razor file is typical, but in a future update you will also be able to define component logic in a code behind file.
Each time an event occurs on a component (like the onclick event in the Counter component), that component regenerates its render tree. Blazor will then compare the new render tree against the previous one and apply any modifications to the browser DOM.
Routing to components
The @page directive at the top of the Counter.cshtml file specifies that this component is a page to which requests can be routed. Specifically, the Counter component will handle requests sent to /counter. Without the @page directive the component would not handle any routed request, but it could still be used by other components.
Routing requests to specific components is handled by the Router component, which is used by the root App component in App.cshtml:
<!--
Configuring this here is temporary. Later we'll move the app config
into Program.cs, and it won't be necessary to specify AppAssembly.
-->
<Router AppAssembly=typeof(Program).Assembly />
Using components
Once you define a component it can be used to implement other components. For example, we can add a Counter component to the home page of the app, like this:
@page "/"
<h1>Hello, world!</h1>
Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />
<Counter />
If you build and run the app again (live reload coming soon!) you should now see a separate instance of the Counter component on the home page.

Component parameters
Components can also have parameters, which you define using public properties on the component class. Let's update the Counter component to have an IncrementAmount property that defaults to 1, but that we can change to something different.
@page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button @onclick(IncrementCount)>Click me</button>
@functions {
int currentCount = 0;
public int IncrementAmount { get; set; } = 1;
void IncrementCount()
{
currentCount += IncrementAmount;
}
}
The component parameters can be set as attributes on the component tag. In the home page change the increment amount for the counter to 10.
@page "/"
<h1>Hello, world!</h1>
Welcome to your new app.
<Counter IncrementAmount="10" />
When you build and run the app the counter on the home page now increments by 10, while the counter page still increments by 1.

Layouts
The layout for the app is specified using the @layout directive in _ViewImports.cshtml in the Pages folder.
@layout MainLayout
Layouts in Blazor are also also built as components. In our app the MainLayout component in Shared/MainLayout.cshtml defines the app layout.
@implements ILayoutComponent
<div class='container-fluid'>
<div class='row'>
<div class='col-sm-3'>
<NavMenu />
</div>
<div class='col-sm-9'>
@Body
</div>
</div>
</div>
@functions {
public RenderFragment Body { get; set; }
}
Layout components implement ILayoutComponent. In Razor syntax interfaces can be implemented using the @implements directive. The Body property on the ILayoutComponent interface is used by the layout component to specify where the body content should be rendered. In our app the MainLayout component adds a NavMenu component and then renders the body in the main section of the page.
The NavMenu component is implemented in Shared/NavMenu.cshtml and creates a Bootstrap nav bar. The nav links are generated using the built-in NavLink component, which generates an anchor tag with an active CSS class if the current page matches the specified href.
The root component
The root component for the app is specified in the app's Program.Main entry point defined in Program.cs. This is also where you configure services with the service provider for the app.
class Program
{
static void Main(string[] args)
{
var serviceProvider = new BrowserServiceProvider(configure =>
{
// Add any custom services here
});
new BrowserRenderer(serviceProvider).AddComponent<App>("app");
}
}
The DOM element selector argument determines where the root component will get rendered. In our case, the app element in index.html is used.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>BlazorApp1</title>
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
</head>
<body>
<app>Loading...</app> <!--Root component goes here-->
<script src="css/bootstrap/bootstrap-native.min.js"></script>
<script type="blazor-boot"></script>
</body>
</html>
Bootstrapping the runtime
At build-time the blazor-boot script tag is replaced with a bootstrapping script that handles starting the .NET runtime and executing the app's entry point. You can see the updated script tag using the browser developer tools.
<script src="_framework/blazor.js" main="BlazorApp1.dll" entrypoint="BlazorApp1.Program::Main" references="Microsoft.AspNetCore.Blazor.dll,netstandard.dll,..."></script>
As part of the build Blazor will analyze which code paths are being used from the referenced assemblies and then remove unused assemblies and code.
Dependency injection
Services registered with the app's service provider are available to components via dependency injection. You can inject services into a component using constructor injection or using the @inject directive. The latter is how an HttpClient is injected into the FetchData component.
@page "/fetchdata"
@inject HttpClient Http
The FetchData component uses the injected HttpClient to retrieve some JSON from the server when the component is initialized.
@functions {
WeatherForecast[] forecasts;
protected override async Task OnInitAsync()
{
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("/sample-data/weather.json");
}
class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF { get; set; }
public string Summary { get; set; }
}
}
The data is deserialized into the forecasts C# variable as an array of WeatherForecast objects and then used to render the weather table.
<table class='table'>
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
Hosting with ASP.NET Core
The Blazor template creates a client-side web application that can be used with any back end, but by hosting your Blazor application with ASP.NET Core you can do full stack web development with .NET.
The "Blazor (ASP.NET Core Hosted)" project template creates a solution with three projects for you: 1. a Blazor client project, 2. an ASP.NET Core server project, and 3. a shared .NET Standard class library project.
To host the Blazor app in ASP.NET Core the server project has a reference to the client project. Blazor-specific middleware makes the Blazor client app available to browsers.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseResponseCompression();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc(routes =>
{
routes.MapRoute(name: "default", template: "{controller}/{action}/{id?}");
});
app.UseBlazor<Client.Program>();
}
In the standalone Blazor app the weather forecast data was a static JSON file, but in the hosted project the SampleDataController provides the weather data Using ASP.NET Core.
The shared class library project is referenced by both the Blazor client project and the ASP.NET Core server project, so that code can be shared between the two projects. This is a great place to put your domain types. For example, the WeatherForecast class is used by the Web API in the ASP.NET Core project for serialization and in the Blazor project for deserialization.
Build a todo list
Let's add a new page to our app that implements a simple todo list. Add a Pages/Todo.cshtml file to the project. We don't have a Blazor component item template in Visual Studio quite yet, but you can use the Razor View item template as a substitute. Replace the content of the file with some initial markup:
@page "/todo"
<h1>Todo</h1>
Now add the todo list page to the nav bar. Update Shared/Navbar.cshtml to add a nav link for the todo list.
<li>
<NavLink href="/todo">
<span class='glyphicon glyphicon-th-list'></span> Todo
</NavLink>
</li>
Build and run the app. You should now see the new todo page.

Add a class to represent your todo items.
public class TodoItem
{
public string Title { get; set; }
public bool IsDone { get; set; }
}
The Todo component will maintain the state of the todo list. In the Todo component add a field for the todos in a @functions block and a foreach loop to render them.
@page "/todo"
<h1>Todo</h1>
<ul>
@foreach (var todo in todos)
{
<li>@todo.Title</li>
}
</ul>
@functions {
IList<TodoItem> todos = new List<TodoItem>();
}
Now we need some UI for adding todos to the list. Add a text input and a button at the bottom of the list.
@page "/todo"
<h1>Todo</h1>
<ul>
@foreach (var todo in todos)
{
<li>@todo.Title</li>
}
</ul>
<input placeholder="Something todo" />
<button>Add todo</button>
@functions {
IList<TodoItem> todos = new List<TodoItem>();
}
Nothing happens yet when we click the "Add todo" button, because we haven't wired up an event handler. Add an AddTodo method to the Todo component and register it for button click using the @onclick attribute.
@page "/todo"
<h1>Todo</h1>
<ul>
@foreach (var todo in todos)
{
<li>@todo.Title</li>
}
</ul>
<input placeholder="Something todo" />
<button @onclick(AddTodo)>Add todo</button>
@functions {
IList<TodoItem> todos = new List<TodoItem>();
void AddTodo()
{
// Todo: Add the todo
}
}
The AddTodo method will now get called every time the button is clicked. To get the title of the new todo item add a newTodo string field and bind it to the value of the text input using the @bind attribute. This sets up a two-way bind. We can now update the AddTodo method to add the TodoItem with the specified title to the list. Don't forget to clear the value of the text input by setting newTodo to an empty string.
@page "/todo"
<h1>Todo</h1>
<ul>
@foreach (var todo in todos)
{
<li>@todo.Title</li>
}
</ul>
<input placeholder="Something todo" @bind(newTodo) />
<button @onclick(AddTodo)>Add todo</button>
@functions {
IList<TodoItem> todos = new List<TodoItem>();
string newTodo;
void AddTodo()
{
if (!String.IsNullOrWhiteSpace(newTodo))
{
todos.Add(new TodoItem { Title = newTodo });
newTodo = "";
}
}
}
Lastly, what's a todo list without check boxes? And while we're at it we can make the title text for each todo item editable as well. Add a checkbox input and text input for each todo item and bind their values to the Title and IsDone properties respectively. To verify that these values are being bound, add a count in the header that shows the number of todo items that are not yet done.
@page "/todo"
<h1>Todo (@todos.Where(todo => !todo.IsDone).Count())</h1>
<ul>
@foreach (var todo in todos)
{
<li>
<input type="checkbox" @bind(todo.IsDone) />
<input @bind(todo.Title) />
</li>
}
</ul>
<input placeholder="Something todo" @bind(newTodo) />
<button @onclick(AddTodo)>Add todo</button>
@functions {
IList<TodoItem> todos = new List<TodoItem>();
string newTodo;
void AddTodo()
{
if (!String.IsNullOrWhiteSpace(newTodo))
{
todos.Add(new TodoItem { Title = newTodo });
newTodo = "";
}
}
}
Build and run the app and try adding some todo items.

Publishing and deployment
Now let's publish our Blazor app to Azure. Right click on the project and select Publish (if you're using the ASP.NET Core hosted template make sure you publish the server project). In the "Pick a publish target" dialog select "App Service" and "Create New".

In the "Create App Service" dialog pick a name for the application and select the subscription, resource group, and hosting plan that you want to use. Tap "Create" to create the app service and publish the app.

Your app should now be running in Azure.

You can mark that todo item to build your first Blazor app as done! Nice job!
For a more involved Blazor sample app check out the Flight Finder sample on GitHub.

Summary
This is the first preview release of Blazor. Already you can get started building component-based web apps that run in the browser with .NET. We invite you to try out Blazor today and let us know what you think about the experience so far. You can file issues on Github, take our in-product survey, and chat with us on Gitter. But this is just the beginning! We have many new features and improvements planned for future updates. We hope you enjoy trying out this initial release and we look forward to sharing new improvements with you in the near future.

Very exciting! I hope to see a lot more news about Blazor this year.
Some feedback on the article.
I would refrain from putting too much loogic in the HTML. Like this for example:
Todo (@todos.Where(todo => !todo.IsDone).Count())
In my opinion it would be better to bind it to a field, then initialize it on component load (if you have such events yet?).
Then update the counter whenever you make a change to it.
However that’s just my personal preference. I guess the ultimate solution would be if Blazor had something like a “Computed property”, as exists in Vue.
Sidenote: The article text on this blog is quite small. Had to increase the font size to not get a headache.
> In my opinion it would be better to bind it to a field, then initialize it on component load
Not a bad idea, and yes, Blazor components do have an OnInit event
> I guess the ultimate solution would be if Blazor had something like a “Computed property”, as exists in Vue.
No need for Blazor to do anything here. You can just have a computed property on your component class in C#.
> No need for Blazor to do anything here. You can just have a computed property on your component class in C#.
Nice. I guess my low knowledge of C# became obvious from my comment. I am however actively trying to learn it, and Blazor (if it becomes a real thing) will definitely be a driving force for me! 🙂
How about debugging support?
It’s coming soon, but not available yet in this release.
Awesome work, guys! Congrats on the release!!
This could take off fast. Can components be created/integrated into existing asp.net mvc 5 project?
Blazor itself has no coupling to any particular backend. Think of Blazor like you would any other client-side JavaScript framework, like Angular or React, but written in .NET. You can write your server pieces using whatever framework or language you want. You could write your server-side logic using ASP.NET MVC or ASP.NET Web API or really anything for that matter (Node, Python, PHP, etc). That said, we provide some nice integration with ASP.NET Core that makes it really easy to host Blazor apps with an ASP.NET Core backend. That’s what the “Blazor (ASP.NET Core hosted)” template sets up for you.
Death to JavaScript! Hail .NET! 🙂
Great work, team! Please allow the ability to easily incorporate and add this to native scenarios as you can in Ooui:
https://github.com/praeclarum/Ooui/issues/74#issuecomment-362813308
Then we’ll truly be talking about build-once-run-anywhere… and they said it couldn’t be done!
Death to JavaScript! Hail .NET! 🙂
I think it’s worth saying that our goal with Blazor isn’t to bring “death to JavaScript”. Our goal is simply to make web development easier, more productive and more fun by providing a full stack web development offering with .NET. WebAssembly has made it possible for anyone to build web apps in their language of choice (Rust, Go, Java, etc.). I don’t think this will spell the end of JavaScript anymore than managed languages brought an end to native development in C/C++. For many, JavaScript will continue to be their preferred platform and I think there is a lot we can learn from tremendous progress that has been made by the JavaScript community. Our job with Blazor is to try make web development even better.
Ah but that is where the confusion lies. In my example above, I prove that the same code and view can be used in both a “native” application and a “web” application. So which is it? A “web application” or a “native application”? It is an application, fundamentally. The only difference is where it is *hosted.* It might be better and more useful to proclaim it a “web-hosted” .NET application and a “native-hosted” .NET application.
What’s been frustrating in this journey since Silverlight is that somehow MSFT fell into this false notion of “web applications” and then… everything else. In concept and reality, this is not the case (as, again, the sample above proves), and has led to the very expensive bifurcation — by way of time, money, and resources — within the .NET ecosystem that we have experienced in the last 6-7 years. The promise of Silverlight was write-once, run everywhere. The idea was to have one codebase in one language (or framework of languages) and from that being able to share code between all known deployment boundaries, thereby saving overall total cost of ownership.
Silverlight’s approach — and the approach we are once again witnessing here in Blazor/Ooui seven years later — allowed code reuse between these tiers and, as such, reduced the necessary code to develop quality .NET solutions and therefore the amount of bugs and maintenance costs associated with them. But, instead, the guidance/prescription/direction since that time and until now has been unfortunately to saddle a completely incompatible language and ecosystem in JavaScript with .NET, thereby nearly doubling the cost of said solutions.
Now don’t get me wrong, I am in agreement with you that JavaScript is a completely valid way of developing applications. Maybe TOO valid, as it’s been kicking .NET’s tail so much so that MSFT has been forced to make the embarrassing recommendation to use it for “web applications” thereby leading to the very expensive pairing as described above. But now, .NET developers and the organizations that employ them can save time, money, and resources by working strictly in .NET (just like they do by working strictly JS) and leverage that developed, encapsulated code in ALL tiers — much like what JavaScript has been enjoying for sometime now, and Silverlight allowed many moons ago.
So, in short (I got a little ranty I know OOPS! LOL), I would say that your job with Blazor is to make *.NET application* development better by making it less expensive — regardless of whether it’s hosted in a web browser or native client (because now it can be hosted in both!). I know that’s not the political thing to say here because you are in “web development”, but it is the business-minded thing to say, and as such have made .NET very relevant once again by those who actually count the beans and run a technology development business (such as myself). And for that, we thank you. 🙂
I feel like this is too good to be true. I really think that WebAssembly is the future of the web and combining with my favorite language is awesome. I can’t wait to see a production ready version of Blazor, meanwhile I’ll play around this. Thank you.
Gran trabajo chicos!
You can find additional information about Blazor at https://learn-blazor.com/. If you like to contribute content and/or samples, don’t hesitate to send pull requests.
Any ideas if this would work with F# directly, or would the usual F# -> C# stuff be necessary and sadly more complicated than just writing in C# directly?
Your Blazor app gets compiled into a normal .NET assembly and then run in the browser using a WebAssembly based .NET runtime, so it shouldn’t really matter which language you used to create that assembly. You should be able to write your classes and referenced libraries in F# (it would be great for someone in the F# community to try this). The Razor syntax (.cshtml), however, is based on HTML + C# and there really isn’t any plan to change that.
Impressive work!!!
I wonder if it will be possible in the future to see not just CSharp and .NET Standard in the brower, but also XAML Standard?
Keep doing that great work!
Blazor is based on .NET, HTML and CSS so that it can be used by a broad audience of web developers. There are other efforts though to provide a XAML based model. For example, checkout https://github.com/praeclarum/Ooui.
Any plans to implement XAML as an alternative to HTML?
Not for Blazor, but there are other folks in the community working on it. Take a look at https://github.com/praeclarum/Ooui.
Great stuff!
This… Is… Awesome.
Spent 4 continuous hours on a plane ride from Chicago to LA today that flew by playing with this. Love every bit of this.
Have already started thinking about a comprehensive UI component framework built around this, along the lines of Angular Material, etc.
One question – will we be able to build and distribute shared component libraries like we would through npm? I don’t see a way to add cshtml components to a .net core dll but that would be ideal. I also wasn’t able to get one Blazor project that referenced another one to see the other’s components, so I’m not clear how this would work short of referencing the same cshtml files in each project.
And one suggestion – it would be great if we could build components via templates like we do in Xaml and have the RenderTree builder delegate be something we could define in the abstract as a resource in the cshtml file, similar to a Xaml DataTemplate. For instance I’d like to make a ListView and give it a property that would be a Razor template to apply to each item, and have a template selector mechanism that could pick the template based on the (now strongly typed!) bound data in the list. I know I could build this with @foreach but templates would make things much more elegant and extensible. If I’m not mistaken Angular has something like this. DataContext-based binding would also be great (maybe necessary?) for this to work.
Finally, with just a few hours of playing around it’s immediately obvious to me that this WILL allow tremendous code reuse between web and mobile because it is MVVM FRIENDLY. I already made a custom Button component with an ICommand Command property and thus can use this with the same View Models as my WPF and Xamarin apps. So no one should underestimate what this project means for cross platform happiness.
> will we be able to build and distribute shared component libraries like we would through npm?
Yes, you can sort of do this today, but it requires a number of less than ideal workarounds. For example dealing with static assets is difficult. You also need to use the @addTagHelper directive to get the library components to show up in the tooling. We will be working on improving the component library experience for our next Blazor update.
> it would be great if we could build components via templates like we do in Xaml and have the RenderTree builder delegate be something we could define in the abstract as a resource in the cshtml file, similar to a Xaml DataTemplate
Great suggestion! Template based components is something we plan to look at.
So in a nutshell is this like a CLR built to run via WebAssembly that specifically targets Razor?
So C# running as MSIL in a CLR that runs on JavaScript in the browser?
Cool idea but the description sounds like one of those songs where you keep adding a new bit each verse.
I look forward to playing with it!
Pretty much! Blazor runs on a WebAssembly based implementation of .NET in the browser. Blazor itself is just a bunch of normal .NET assemblies that then get executed by the WebAssembly based .NET runtime.
Hi Daniel;
For building Mobile Hybrid app, we generally use JS and Phonegap to do so. I personally welcome Blazor to do all the client side in .Net.
My question is, can we now build our Mobile apps using Blazor and Bootstrap for managing the UI on Mobile? If yes, can we still use Phonegap library to talk to ?
Secondly, can we still use third party JS Compoents, i.e. Telerik jQuery components in our Blazor app?
This sounds like 10 years ago when Silverlight came to market. 🙂
Looking forward to your answers.
Thanks!
..Ben
We haven’t tried mobile hybrid scenarios out yet, but conceptually it seems like it should work and I think you should be able to use JavaScript interop to call the PhoneGap libraries. It certainly would be a fun experiment to try out. Feel free to chat with us about it more on Gitter.
Hi Daniel
Great to see the power of c# coming straight to web browser. certain suggestions keeping Angular in mind:
1. Single UI for Desktop, Web, Mobile.
2. Progressive Web Apps support .
Regards,
I would like to know what is the max version of .net standard that can be targeted by Blazor / webassembly compiler / runtime. Are there a set of APIs currently not supported… Where can one learn more about client side constraints of this amazing inversion?
We will support .NET Standard 2.0 with some limitations as imposed by the browser. For example, you can’t open a socket or arbitrarily access the file system from the browser. APIs that cannot be supported will throw PlatformNotSupportedExceptions. The exact limitations are still being worked out, but we do plan to document them eventually (https://github.com/mono/mono/issues/7697).
This webassembly runtime is dope 🙂 it opens door to so many possibilities… It is presented in the context of ASP, however significance of running CIL on the client (in the browser) is bonkers !
There is more dotnet innovation posted in this “web” blog series than under dotnet blog. Totally adding to my favorites.
Hi. im having some trouble with the final publishing step.
it publishes ok to https://blazordemojg.azurewebsites.net/ , but this is the error.
Application ‘MACHINE/WEBROOT/APPHOST/BLAZORDEMOJG’ with physical root ‘D:\home\site\wwwroot\’ failed to start process with commandline ‘dotnet .\BlazorDemo.dll’, ErrorCode = ‘0x80004005 : 80008081.
reboot
yeah, i restarted the azurewebsites app service, to no avail. this is probably a dotnet core issue rather than blazor. thanks anyway
Pro tip: Be sure not to include a hyphen in your project name. Took me over an hour of diagnostics to discover this isn’t supported (will generated odd .g.i.cs errors)
+10 – Thanks for this – you just saved me hours of wondering what the heck is the problem ;0
Did you guys study script# and reasoned why blazor would not have the same fate?
https://github.com/nikhilk/scriptsharp
Yup, we are familiar with Script# and other similar C# to JS transpilation technologies. Blazor is fundamentally different in that it runs on a real .NET runtime implemented in WebAssembly. This means that the normal .NET ecosystem (libraries, tools, etc.) can be used by Blazor apps, which is a big advantage. WebAssembly also has the potential to improve your application performance.
Hello Dan;
Back in the day, I did lots of Silverlight and WPF development. I loved it mainly because I was using MSFT tools and framework to build powerful web apps. Things changed and the concept of users had to install Silverlight runtime for the browser went away, so “Silverlight” running in browser died.
But Windows 8 was born from the Silverlight technology and it proved it was a great technology.
Now I’m starting to build Native mobile app using Xamarin and it is EXACTLY like building Silverlight app and approach again.
Now that Blazor is coming to life, why don’t you guys take the same concept of Silverlight/Xamarin style of development and then run it with .Net (Web Assembly) as it is now the engine of Blazor? This way users don’t need to install any runtime like Silverlight, yet we can use Xamarin/Silverlight/Windows style development in Blazor and deliver powerful “Browser Desktop” apps?
This way with one style we build Windows, Native Mobile and Browser application.
Hope this helps!
..Ben
For Blazor we want to appeal to a broad web developer audience, so we’re sticking to standard web technologies like HTML and CSS. But there are other efforts to bring a XAML based model to WebAssembly. For example, the Ooui.wasm project (https://github.com/praeclarum/Ooui) is a Xamarin Forms implementation for WebAssembly.
Daniel, roughly when do you think MSFT is going to commit to go with Blazor as a “Microsoft Product” like they did with SignalR that MSFT officially called it as one of their product?
I need to build a sophisticated Browser Desktop app that I much rather to use C# and .Net than try to do it with JS.
As of now, how does Blazor look & feel in the eyes of Product managers?
Thanks!
..Ben
@Ben, we don’t know yet if or when Blazor will become a product. For now, you shouldn’t plan on using Blazor for any production applications. The experimental phase is currently scheduled to go through the beginning of May after which we will see where we are at. There are lots of ways that you can let us know that you’d like Blazor to become a product:
– Install Blazor and try it out
– Build something cool with Blazor and share it with the community
– Fill out the in-product survey
– Star the Blazor repo on GitHub
– Share Blazor with other web devs who you think might be interested