Blazor 0.9.0 experimental release now available

Daniel Roth

Daniel

Blazor 0.9.0 is now available! This release updates Blazor with the Razor Components improvements in .NET Core 3.0 Preview 3.

New Razor Component improvements now available to Blazor apps:

  • Improved event handling
  • Forms & validation

Checkout the ASP.NET Core 3.0 Preview 3 announcement for details on these improvements. See also the Blazor 0.9.0 release notes for additional details.

Note: The Blazor templates have not been updated to use the new .razor file extension for Razor Components in this release. This update will be done in a future release.

Get Blazor 0.9.0

To get started with Blazor 0.9.0 install the following:

  1. .NET Core 3.0 Preview 3 SDK (3.0.100-preview3-010431)
  2. Visual Studio 2019 (Preview 4 or later) with the ASP.NET and web development workload selected.
  3. The latest Blazor extension from the Visual Studio Marketplace.
  4. The Blazor templates on the command-line:

    dotnet new -i Microsoft.AspNetCore.Blazor.Templates::0.9.0-preview3-19154-02
    

You can find getting started instructions, docs, and tutorials for Blazor at https://blazor.net.

Upgrade to Blazor 0.9.0

To upgrade your existing Blazor apps to Blazor 0.9.0 first make sure you’ve installed the prerequisites listed above.

To upgrade a Blazor 0.8.0 project to 0.9.0:

  • Update the Blazor packages and .NET CLI tool references to 0.9.0-preview3-19154-02.
  • Update the remaining Microsoft.AspNetCore.* packages to 3.0.0-preview3-19153-02.
  • Remove any usage of JSRuntime.Current and instead use dependency injection to get the current IJSRuntime instance and pass it through to where it is needed.

Give feedback

We hope you enjoy this latest preview release of Blazor. As with previous releases, your feedback is important to us. If you run into issues or have questions while trying out Blazor, file issues on GitHub. You can also chat with us and the Blazor community on Gitter if you get stuck or to share how Blazor is working for you. After you’ve tried out Blazor for a while please let us know what you think by taking our in-product survey. Click the survey link shown on the app home page when running one of the Blazor project templates:

Blazor survey

Thanks for trying out Blazor!

Daniel Roth
Daniel Roth

Principal Program Manager, ASP.NET

Follow Daniel   

32 Comments
Avatar
Sven Glöckner 2019-03-08 00:34:19
Thanks for this great announcement. I guess it's not long to have v1.0 ;) 
Avatar
Przemysław Kamiński 2019-03-08 05:51:42
Better minimise assembly size and increase performance. You will do that before v1.0 or 2/3/4? 😂😂
Avatar
Baran Ozdemir 2019-03-08 06:20:43
Thanks Dan, I updated my experiental projects to the latest version, it is great to see we are getting forms and validation.
Avatar
Chipo Hamayobe 2019-03-08 13:21:15
Thanks Daniel for the update. Any timetable yet on when we will see a non-experimental release? 
Avatar
Baran Ozdemir 2019-03-09 03:57:59
Hi Dan,  I am getting this error when i restore nuget packages when I build the solution on Azure DevOps pipeline.  The nuget command failed with exit code(1) and error(NU1202: Package Microsoft.AspNetCore.Blazor.Cli 0.9.0-preview3-19154-02 is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2). Package Microsoft.AspNetCore.Blazor.Cli 0.9.0-preview3-19154-02 supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0)   Errors in D:\a\1\s\Web.Customer.csproj NU1202: Package Microsoft.AspNetCore.Blazor.Cli 0.9.0-preview3-19154-02 is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2). Package Microsoft.AspNetCore.Blazor.Cli 0.9.0-preview3-19154-02 supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0))     Packages failed to restore
Avatar
Daniel Smith 2019-03-09 09:10:23
Are there plans to eventually have a nice experience when right clicking the project in Visual Studio and choosing Add?  At the moment, the two top level options are Razor Page and Controller, both of which produce an error ("There are no scaffolders supported for this item"). It would also be great if the Add > New Item dialog defaulted to an appropriate file type, and for the template file to at least have an empty @functions section.  Or when code behind files are implemented, if the New Item dialog could create the markup and nested code behind that would be even better :-)
Avatar
Eric Blankenburg 2019-03-13 03:53:49
I downloaded 0.9 the day it was release. It's so easy to develop a single page app compared to Angular 7 and React. Compiling and running the code is also much faster than Angular. When are you going to remove the "experimental" designation and decidate to releasing it as a product?
Avatar
Martin Kremer 2019-03-13 05:15:07
Does ist work with the VS 2019 RC or just with the VS 2019 Preview (4 or later)?
Matt O
Matt O 2019-03-13 07:20:22
I forsee this spelling the end to all other SPA frameworks in existence! This is going to be awesome!
Avatar
Peter Vunk 2019-03-13 08:20:47
Looking forward to start using Blazor 0.9! Already using Blazor 0.7 in internal production builds, with custom grid and custom drop down list, both are super easy to build using open source examples for Blazor 0.7! Web apps are stable and fast to load. Blazor is awesome! Saving me weeks of development time. Leaps and bounds ahead of React and Angular in terms of ease of learning, speed of development, and ease of customization! Keep up the excellent work!
Avatar
David Bond 2019-03-14 00:40:26
We have been using the experimental Blazor builds for a while and we are now ready to start work on our new UI using Blazor in parallel with our production UI.  Very excited to be able to develop full stack using C#. Thank you all, and do keep up the great work!
Jan Hjørdie
Jan Hjørdie 2019-03-14 02:19:58
Will Blazor end up as a real project ?It looks very promising, but will not invest time in it if it just stay in as experimental
Avatar
Colin Mills 2019-03-14 03:29:23
Template app crashes on startup. What am I doing wrong? Can see this in event viewer: "Could not find inprocess request handler. Captured output from invoking hostfxr: No executable found matching command "dotnet-blazor". " I can see the blazor nugets are installed on the project. Do I need something else?
Avatar
Carl Philipp Bickmeier 2019-03-14 07:35:49
I had some smal problems proting my 0.7 project to 0.8... but when I try to port 0.8 to 0.9 it does not work at all... I have to use a controller to load some data adhoc and until 0.8 I was able to add the aspnet.core.mvc nuget. When adding this nuget to a 0.9 project it does not start and reports "rcz generate exited with code 1"... what am I doing wrong? Is it still possible to use controllers in 0.9? And if yes, how can I do that?
Avatar
Carl Philipp Bickmeier 2019-03-14 09:16:32
In Blazor 0.8 the wwwRoot folder moved from the app project to the server project... when I create a new project with blazorhostet template under blazor 0.9 the wwroot folder is back in the client... is that correct?
Avatar
almir tuca 2019-03-19 02:50:08
With this new version, do we need to restart the app each time html is changed in order to see the changes?
Ben Hayat
Ben Hayat 2019-03-19 10:48:00

Hi Dan;

Since Blazor's status (the client side technlogy running in WA) is still considered as "Experimental", my question is, what hurdle does Microsoft need to pass [successfully] to change the status to "Go" status, that we know we are going to be getting the real client Blazor?

Thanks!
..Ben

Avatar
Christian Andersen 2019-03-24 06:33:31
I am quite new to Microsoft web development and therefore my problem might be a problem that is not a problem for others. Anyway, after I upgraded to version 0.9 from version 0.8 I got at a weird error which took me quite some time to solve. I have made a rest crud interface to use Elasticsearch as "data storage" and search engine for the application. When I call the "GetAll()" function and the list which I return it worked fine with version 0.8 but now i have to limit the size of the list to a limited amount. I am not sure where this error lies if it's a .Net Core 3.0 error, me having to configure the server correct or a Blazor problem.I get this error in the browser when the call is done: Failed to load resource: the server responded with a status of 500 (Internal Server Error) When I call the URL directly I get some kind of binary result on the browser screens something like this: !�������@�Q��j�dxF��{��GD�WV I had problems finding this bug, during my many years of software development I experienced "too long lists" problems but I did not expect this could happen during a release. Is there's something I can configure in order to be able to receive lager lists?   I am using the Client Server solution template from visual studio and it seems that after the upgrade the size of the list which I return to 
Avatar
Christian Andersen 2019-03-24 06:34:56
I am quite new to Microsoft web development and therefore my problem might be a problem that is not a problem for others. Anyway, after I upgraded to version 0.9 from version 0.8 I got at a weird error which took me quite some time to solve. I have made a rest crud interface to use Elasticsearch as "data storage" and search engine for the application. When I call the "GetAll()" function to return the list, it worked fine with version 0.8 but now I have to limit the size of the list to a limited amount to avoid this problem. I am not sure where this error lies if it's a .Net Core 3.0 error, me having to configure the server correct or a Blazor problem.I get this error in the browser when the call is done: Failed to load resource: the server responded with a status of 500 (Internal Server Error) When I call the URL directly I get some kind of binary result on the browser screens something like this: !�������@�Q��j�dxF��{��GD�WV I had problems finding this bug, during my many years of software development I experienced "too long lists" problems but I did not expect this could happen during a release. Is there's something I can configure in order to be able to receive lager lists?   I am using the Client Server solution template from visual studio and it seems that after the upgrade the size of the list which I return to 
Ben Hayat
Ben Hayat 2019-03-25 03:04:17

Is there a plan to "sort of" bypass the current Mono VM and compile C#/.Net directly to Wasm code, so we won't have Mono VM running inside of Wasm VM? Having the legacy Mono in this solution, will hurt the acceptance of Blazor. Mono needs to be put to sleep. :-)

Avatar
Premchand Peddakotla 2019-03-27 18:12:30
I was playing with 0.9.0-preview3-19154-02 version of Microsoft.AspNetCore.Blazor.Server. I create a project using Asp.Net Core hosted with Client, Server and Shared project. On the server project, I am authenticating the user with AAD and its working fine. I got all the claims and user information after authenticating with AAD. Now I want to use that user information on the client side such as display the login user information on the page. But the problem is, HttpContextAccessor is coming as null to the client project. I have registered the IHttpContextSevices on the server project using the syntax below services.AddHttpContextAccessor();services.AddSingleton<HttpContextAccessor>(); services.AddHttpClient();services.AddScoped<HttpClient>(); And I injected IHttpContextAccessor in the client project. But IHttpContextAccessor is coming as null. Let me know if I am missing anything on the client project?
Avatar
anonymous 2019-03-29 07:41:39
This comment has been deleted.
Chris Herridge
Chris Herridge 2019-03-29 07:42:14
I'm really enjoying Blazor, so much so i've started working on a set of libraries for assisting with some of the more complex workloads i've seen in MVC.. For example a controller method that returns async IAsyncEnumerable<T> ... being automatically wrapped in such a way it streams (chunked, with progress, status and cancelling) down to the client. I've also been working on the concept of conversational MVC actions. For example public async Task<string> ConversationTest(MyP1Class){ //perhaps do some processing on the inputs, then find you need to confirm something with the user //so you can go: var alertResult = await Alert("Title", "alert", "A message about the issue you've just found, server side.", new ButtonBase[] {new ButtonBase() { Title= "Ok", Position= ButtonPosition.Primary},new ButtonBase() { Title= "Cancel", Position= ButtonPosition.Secondary}}); This then holds the original request, uses sigr to go back to the client, do some UI data capture (in a modal dialog). Get info back from UI and release the server thread. These are all just concepts at the moment, but if anyone's interested in joining me with this. Come say hi: https://github.com/cherridge/IntelligentServices
Avatar
James Heffer 2019-04-05 00:59:16
If you need help with learning how to use Blazor, you can join the Blazor Discord server by clicking this link here: https://discord.gg/Xg9ja5s... This is an ever growing community of like minded coders :) 
Camble
Camble . 2019-04-05 02:11:24
The brief survey link takes you to a ReSharper survey.
מוטי דר.
מוטי דר. 2019-04-06 12:13:05
Hey, How or where can I hosting my blazor website? I can not find any place. Do i need cloud or virtual server? Do I need windows with iis? Today I'm hosting it in my computer, but u know.. need 24/7 availability. tx Moti
Avatar
Jeffrey Gordon 2019-04-09 06:03:56
This is really cool. Leaning between this and React/Node-Express for next version of my product. Brief Survet takes me to feedback for Resharper. My only "complaint" is memory usage and slow start up on mobile devices. It's still in preview, I bet you folks are still working out performance :)
Avatar
Jeffrey Gordon 2019-04-09 06:04:18
This is really cool. Leaning between this and React/Node-Express for next version of my product. "Brief Survey" link takes me to feedback for Resharper. My only "complaint" is browser memory usage (which isn't a deal-breaker all things considered) and slow start up on mobile devices (which is, 5 seconds of "loading" isn't acceptable). It's still in preview, I bet you folks are still working out performance :)
Yordan Yanakiev
Yordan Yanakiev 2019-04-10 15:24:12
Good lords. I can't wait for this thing. I really need the full stack client side right now !This project if goes into the right direction of possibility of bringing full stack RIA into browser and behind it can live a pure C# - well the possibilities are mind blowing.
Mohammad M
Mohammad M 2019-04-12 08:23:42
Nice to see progress on Blazor. I really believe this will have a great impact on .NET development. However can't you guys inform us which version of Entity Framework Core goes along with this version (0.9.0). I can't get this version to work on any EF Core versions.
Avatar
Mohammad Komaei 2019-04-16 23:36:58
Please show us how to start (F5) a blazor project with vscode. It give us error : A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'E:\Projects\Blazorr\bin\Debug\netstandard2.0'.Failed to run as a self-contained app. If this should be a framework-dependent app, add the E:\Projects\Blazorr\bin\Debug\netstandard2.0\Blazorr.runtimeconfig.json file specifying the appropriate framework.The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.The program '[9964] Blazorr.dll' has exited with code -2147450749 (0x80008083).