Create an account


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 19,919
» Latest member: yopif65649
» Forum threads: 22,383
» Forum posts: 23,223

Full Statistics

Online Users
There are currently 1119 online users.
» 1 Member(s) | 1113 Guest(s)
Applebot, Baidu, Bing, Google, Yandex, yopif65649

 
  Make the most of your monthly Azure Credits
Posted by: xSicKxBot - 03-06-2019, 03:11 PM - Forum: C#, Visual Basic, & .Net Frameworks - No Replies

Make the most of your monthly Azure Credits

Angelos Petropoulos

Angelos

If you weren’t aware, Visual Studio subscribers have free monthly Azure credits, that are ideal for experimenting with and learning about Azure services. When you activate this benefit, it creates a separate Azure subscription with a monthly credit balance that renews each month while you remain an active Visual Studio subscriber. If the credits run out before the end of the month the subscription is suspended until more credits are available. No surprises, no cost, and no credit card required for any of it!

The table below shows you how many Azure credits you get based on your type of Visual Studio subscription:

Visual Studio subscription type Monthly Azure Credits Activate Credits
Visual Studio Professional (standard subscription) $50 activate
Visual Studio Test Professional $50 activate
MSDN Platforms $100 activate
Visual Studio Enterprise (standard subscription) $150 activate
Visual Studio Enterprise (BizSpark) $150 activate
Visual Studio Enterprise (MPN) $150 activate

Now that you know how many Azure Credits you get every month for free, you are probably wondering what you can spend it on! We have put together the following simple table to help you get going:

Azure Service Tier Estimated Monthly Cost
App Service Shared $9.49
Storage General Purpose V2 (1GB) $1.06
SQL Single DB (5DTUs, 2GB) $4.90
CosmosDB 1GB $23.61
Functions Dynamic First 1M executions free
(up to 400K GB-s)
Monitor Application Insights First 1GB free
Key Vault Standard $0.03 (per 10k operations)
Service Bus Basic $0.05 (per 1M operations)
Redis Basic (C0: 250MB Cache) $16.06

Hopefully, you found this information helpful and you are on your way to make use of your Azure credits. If you are interested in the cost of an Azure service you didn’t see in the table above, try the Azure price calculator. If you have any questions or problems just leave us a comment below.

Angelos Petropoulos

Print this item

  Mobile - The Weekender: Atypical Edition
Posted by: xSicKxBot - 03-06-2019, 03:11 PM - Forum: New Game Releases - No Replies

The Weekender: Atypical Edition

This week’s update is a bit wordier than usual, mainly because the usual format didn’t seem to fit what limited information, I have to share this time around. Before we get on to the main event, one bit of news I will share because it came in my Inbox today.

Feral Interactive are currently hard at work porting Tropico over to iPhone. Things seem to be coming a long well, because yesterday they shared a few screenshots over twitter. We really enjoyed Tropico when we reviewed it last year, and hopefully iPhone users will get to enjoy it soon as well.

Meanwhile, in the world of el presidente mobile games…

Out Now


There’s actually nothing definitive I want to highlight this week. Perhaps I’ve not been as in-touch as I normally would have been (had some days off), but nothing seems to have jumped out at me.

A few of the other sites seem to be talking about Immortal Rogue, which to be fair does look good and will be going on our ‘To Do’ list. The only thing is, according to the App Store page the game was released at the end of January. Google Play doesn’t give me enough information to determine when that version was released, so it’s possible this week marks the appearance of that version.


On our end, I’ve got people reviewing Knights of the Card Table, Wars Across the World and the digital adaptation of the Gem Rush board game.

Addendum: This completely slipped our mind, but Shieldwall Chronicles from PT favourites Wave Light Games released on iOS today. We’ve got this on our review list as well, so stay tuned!

Updates


Star Traders: Frontiers has updated again this week with lots of tweaks and balances – if you’re interested, they’re actually working towards the eventual release of Carrier-class ships in the game, with accompanying fighters. Again, even if you don’t use Steam, we highly recommend keeping an eye on the official Steam page, because a lot of information as to the current road-map and what goes in every update is posted there.

Other than that, Evolution has had a few updates and tweaks since launch. A lot of major issues, especially on Android, have been solved one way or another (the minimum specs for Android devices has been raised for the moment, for example), and they’re working through the rest of the outstanding issues as well.

Sales


Elder Signs: Omens (iPhone, iPad & Android): $0.99


A previous candidate on our Best Board Games list, Elder Signs is now down to a buck on iOS, a little bit more on Android. Note that there’s different app entries for the iPhone and the iPad version of the game, so make sure you buy the right one.

Crashlands (iOS & Android) (Review): $4.99


One of our favourite action RPGS and Diablo-like games is enjoying a small reduction, if you’ve yet to give It a try yourself. Please note that it has been cheaper in the past, typically $3.99 but in 2017 went as low as $2.99.

Cat Lady: The Card Game (iOS & Android): $0.99


This is a simple and engaging card game adapted from a physical game of the same name. It’s down to just a buck – not the most ‘serious’ of experience, but good for some casual fun.

Wars Across the World (iOS Universal): $0.99


A more serious war game, the base game for this is currently down to just a buck, although we’re unclear as to how much content you actually get. At the time of writing there’s ten IAPs consisting of individual scenarios. We’ve actually got a review in progress if you want to wait, but so far, our reviewer has been quite impressed with what he’s played.

Seen anything else you liked? Played any of the above? Let us know in the comments!

Print this item

  New Godot 3.1 Tutorial Series! Creating a Complete 2D Game Step by Step
Posted by: xSicKxBot - 03-06-2019, 03:11 PM - Forum: Game Development - No Replies

New Godot 3.1 Tutorial Series! Creating a Complete 2D Game Step by Step

We just published a brand new 18 part text tutorial series over on DevGa.me, Getting Started with Godot Step by Step Tutorial Series.  This tutorial walks you through theEBookCoverA4Format entire game creation process using Godot 3.1, from creating your initial project, to publishing your game with details step by step instructions and screen shots.  Even better it’s got professional quality art assets from Game Developer Studios and is completely open source!

The tutorial consist of:

Getting Started with Godot


Setup and Project Creation


Creating your Title Screen


Playing Background Music


Global Data via Autorun


Creating a Simple UI


Creating the Main Game Scene


Creating Parallax Clouds


Creating the Player


Handling Input


Add a Scene Animation


Creating Bullets


Creating the Enemies


Configuring the Collisions


Populating the Game World


Adding Shooting to the Game


Making Things Explode


The Final Code


Building your Game for Windows

If you need more detailed information on any subject we cover, be sure to check our existing Godot 3 Tutorial series, that goes into much more technical detail.  There will be a step by step video version available shortly.  There is also a 70pg PDF version of this tutorial available for Patreons.

Programming Art Design


Print this item

  News - Epic Game Of Thrones Season 8 Battle Scene Teased, And It Sounds Brutal
Posted by: xSicKxBot - 03-06-2019, 07:07 AM - Forum: Lounge - No Replies

Epic Game Of Thrones Season 8 Battle Scene Teased, And It Sounds Brutal

We've known for a while now that Game of Thrones Season 8 will have an epic battle scene, and now the producers have shared more details about it. Speaking to Entertainment Weekly, episode director Miguel Sapochnik, who previously directed the Battle of the Bastards episode, confirmed this new episode will feature a battle between familiar living characters and the Night King and his army. The showdown has been teased since the show's beginning, and now it's finally coming.

In the episode, which chronicles the Battle of Winterfell, familiar characters like Jon Snow, Daenerys Targaryen, Sansa Stark, Arya Stark, and Brienne of Tarth are outnumbered as they fight against the supernatural foes. According to EW, it's the "longest consecutive battle sequence ever committed to film." At 40 minutes, the Helm's Deep battle from The Lord of the Rings: Two Towers was the longest battle sequence that Sapochnik said he could find in cinema history.

Co-executive producer Bryan Cogman spoke about the epic battle scene, calling it unprecedented for TV or film.

"What we have asked the production team and crew to do this year truly has never been done in television or in a movie," he explained. "This final face-off between the Army of the Dead and the army of the living is completely unprecedented and relentless and a mixture of genres even within the battle. There are sequences built within sequences built within sequences. [Showrunners David Benioff and Dan Weiss wrote] an amazing puzzle and Miguel came in and took it apart and put it together again. It's been exhausting but I think it will blow everybody away."

Filming the episode took 11 weeks of night shoots. According to the report, up to 750 people worked all night for almost three months in sub-freezing temperatures and enduring cold rain, mud, and heavy wind.

Maisie Williams, who plays Arya Stark, told EW that "nothing can prepare you for how physically draining" it was filming the battle scene. "It's night after night, and again and again, and it just doesn't stop," she said. "You can't get sick, and you have to look out for yourself because there's so much to do that nobody else can do… there are moments you're just broken as a human and just want to cry."

The actor who plays Ser Jorah Mormont, Iain Glen, said filming the battle was the "most unpleasant experience I've had on Thrones."

"A real test, really miserable. You get to sleep at seven in the morning and when you wake in the midday you're still so spent you can't really do anything, and then you're back," he added. "You have no life outside it. You have an absolute f**ked bunch of actors. But without getting too method [acting] about it, on screen it bleeds through to the reality of the Thrones world."

The entire interview at EW is incredibly in depth and fascinating--check it out here.

Game of Thrones Season 8 premieres on April 14 on HBO--you can see the latest footage here. While the main show is ending, a prequel series is in development.

Print this item

  News - Tickets For EGX 2019, The UK’s Biggest Games Show, Are On Sale Now
Posted by: xSicKxBot - 03-06-2019, 07:07 AM - Forum: Nintendo Discussion - No Replies

Tickets For EGX 2019, The UK’s Biggest Games Show, Are On Sale Now


EGX 2019 is open for business, and tickets for the event can be purchased right now.

As the UK’s biggest consumer video games show, EGX is the place to be if you want to sample the latest games and hardware. While a full list of attendees hasn’t been confirmed yet, it’s a fair bet that Nintendo will be there to show off its biggest upcoming games, as well as a selection of 2019’s hottest titles.

The 2019 event is notable for another big reason; after a few very pleasant years in Birmingham following the demolition of Earl’s Court (EGX’s former home), the show is returning to London and will take place at the ExCeL between the 17th and 20th of October.

You can order your tickets right now by heading over to this page.

Print this item

  News - Random: One Tiny Fix Could Make Sonic’s Movie Appearance So Much Better
Posted by: xSicKxBot - 03-06-2019, 07:07 AM - Forum: Nintendo Discussion - No Replies

Random: One Tiny Fix Could Make Sonic’s Movie Appearance So Much Better

How Sonic is set to look in the movie
How Sonic is set to look in the movie

As we imagine you’ve seen by now, it would appear that Sonic’s full appearance for his upcoming movie has been leaked online. Fan reaction has been pretty negative, to say the least, and even Sonic creator Yuji Naka has taken to Twitter to share his confusion at the design.



Rough translations: “Is this a sonic movie?”

“I feel that it is important to look at the whole body visual of Sonic and head body and stomach. Did you not get a little more balance?”

We have to say, something about our favourite blue hedgehog is definitely off. There are a few things we could point out, such as his white fur hands (no gloves!) and plain Nike shoes, but we’ve since realised that it’s the eyes that cause the biggest problem.

IGN Deputy Reviews Editor, Tom Marks, has ‘fixed’ this very issue in this image shared on Twitter. Gone are the strangely small, separate eyes, replaced with Sonic’s classic mega eye that spans across his whole face. You’d think the one eye approach would be the weirder of the two, but it really is how Sonic is supposed to look, isn’t it?


We doubt any changes will or even can be made to Sonic’s design in the movie at this stage, but we’d definitely prefer to see this design grace our screens than the current one.

What do you think? Does this fix work? Share your thoughts with us below.

Print this item

  Fedora - Fedora logo redesign
Posted by: xSicKxBot - 03-06-2019, 07:07 AM - Forum: Linux, FreeBSD, and Unix types - No Replies

Fedora logo redesign

The current Fedora Logo has been used by Fedora and the Fedora Community since 2005. However, over the past few months, Máirín Duffy and the Fedora Design team, along with the wider Fedora community have been working on redesigning the Fedora logo.

Far from being just an arbitrary logo change, this process is being undertaken to solve a number of issues encountered with the current logo. Some of the issues with the current logo include the lack of a single colour variant, and, consequently the logo not working well on dark backgrounds. Other challenges with the current logo is confusion with other well-known brands, and the use of a proprietary font.

The new Fedora Logo design process


Last month, Máirín posted an amazing article about the history of the Fedora logo, a detailed analysis of the challenges with the current logo, and a proposal of two candidates. A wide ranging discussion with the Fedora community followed, including input from Matt Muñoz, the designer of the current Fedora logo. After the discussions, the following candidate was chosen for further iteration:


In a follow-up post this week, Máirín summarizes the discussions and critiques that took place around the initial proposal, and details the iterations that took place as a result.

After all the discussions and iterations, the following 3 candidates are where the team is currently at:


Join the discussion on the redesign over at Máirín’s blog, and be sure to read the initial post to get the full story on the process undertaken to get to this point.

Print this item

  RISC-V Irvine
Posted by: xSicKxBot - 03-06-2019, 07:07 AM - Forum: Linux, FreeBSD, and Unix types - No Replies

RISC-V Irvine

The RISC-V Foundation will be hosting a free, Getting Started with RISC-V event in Irvine. This 1 day event will showcase innovative RISC-V implementations from members of the Foundation.

The half-day Irvine event on April 3 will feature engaging presentations, demos and networking opportunities.

Learn more

Print this item

  Microsoft - Author of ‘How to Train Your Dragon’ series offers ideas for educators
Posted by: xSicKxBot - 03-06-2019, 07:07 AM - Forum: Windows - No Replies

Author of ‘How to Train Your Dragon’ series offers ideas for educators

Hello Dragon Trainers & Wizards of Young Minds!

My name is Cressida Cowell and I’m the author and illustrator of the How to Train Your Dragon and Wizards of Once book series.

I have spent 20 years writing middle grade fiction, and over those 20 years I have lost count of the times people have asked me, “Have you ever thought of writing for adults?” as if writing for children was some sort of second-best activity, something you do before moving on to the higher level of writing for adults.

For me, writing for children is the greatest privilege on earth.

What a gift it is, to be lucky enough to write for children, and therefore to be constantly reminded to look at the world through the cool clear eyes of a child. For children are interested in the truly important things in life. Heroism, wilderness, our relationship with the natural world, death, love, spirituality, adventure.

I ask a lot of serious questions in these fantasy books – what are your responsibilities to your friends, your family, your Tribe? To nature, to the environment? All subjects that the kid emerging from childhood into adulthood is beginning to think about.

But I deliberately try and provide emotional support and wisdom for the kid reader, without being preach-y. I’m not a believer in taking children to a scary place and leaving them there. So although I tackle serious issues, and never dumb them down, my books have a strong moral framework and they seek to help children with the challenges they will face in the growing up process.

I am always very happy if someone says to me that they have been through a difficult time, of being bullied, or having a death in the family, and my books have helped them through that.

Idea for educators: Free Writing Friday to inspire student creativity


Having a safe space to explore ideas is so important for children to develop their writing – which is why I’ve started a campaign to encourage children to have a notebook they can write in which there are NO rules, NO grading or marking, just FUN! It’s called Free Writing Friday and I’m asking teachers to set aside time every Friday for their class to take part. It gives children the freedom to write, draw and doodle without worrying about their work being corrected. I hope that you will join me in this weekly experience with your own students! You can also find some of my Flipgrid writing challenges for your students here to help spark their imagination and get started with their own writing notebooks.

On the importance and impact of reading aloud to children


I write books to be read aloud, by adults, to their kids.

Reading aloud to children is a wonderful way of getting them to enjoy books, and associate books with pleasure.

So with reading-aloud in mind, I think about my books as a performance, and the mouth-feel of the words, the loudness or softness, or bellow-yness of the characters. It’s why I gave Toothless a stammer, and Squeezjoos and the sprites in Wizards of Once a bit of a his-s-sy lis-s-sp, and Sychorax a voice as mild as the point of an icicle … so that they make a joyous acting performance, particularly if you are lucky enough to have David Tennant narrate them, as he does with both the How to Train Your Dragon and Wizards of Once series.

I always say to parents, read with your kids, just ten minutes a day, way beyond the age the kid can read for themselves. Books read to you in your parents’ voice live with you all your life.

Reading a book aloud is a shared joy, and sends an important message to the children being read to: books are important, books are powerful, magical things, that can make your dad cry, or your mum laugh, and have the sort of wisdom in them that can change your life.

Connecting with students through Skype in the Classroom


 

I am so delighted for the opportunity to work with Skype in the Classroom to bring an exciting broadcast and live chat experience to your students on March 6. An author speaking directly to you in your classroom brings reading and writing alive for a student, just as a parent or teacher reading aloud to children can open up a lifetime’s enjoyment of books.

Classrooms around the world will be able to tune in to this Skype in the Classroom broadcast event as we explore together how to open imaginations and create new worlds. I’ll be answering as many questions as I can live after each event. It’s going to be a lot of fun and I hope you’ll join us with your students on March 6!

I can’t wait!


Ok, I’m in! How can I join the event and prepare my classroom?

Check out the How to Train Your Dragon Flipgrid Challenges

Print this item

  ASP.NET Core updates in .NET Core 3.0 Preview 2
Posted by: xSicKxBot - 03-06-2019, 07:07 AM - Forum: C#, Visual Basic, & .Net Frameworks - No Replies

ASP.NET Core updates in .NET Core 3.0 Preview 2

.NET Core 3.0 Preview 2 is now available and it includes a bunch of new updates to ASP.NET Core.

Here’s the list of what’s new in this preview:

  • Razor Components
  • SignalR client-to-server streaming
  • Pipes on HttpContext
  • Generic host in templates
  • Endpoint routing updates

Get started


To get started with ASP.NET Core in .NET Core 3.0 Preview 2 install the .NET Core 3.0 Preview 2 SDK

If you’re on Windows using Visual Studio, you’ll also want to install the latest preview of Visual Studio 2019.

Upgrade an existing project


To upgrade an existing an ASP.NET Core app to .NET Core 3.0 Preview 2, follow the migrations steps in the ASP.NET Core docs.

Add package for Json.NET


As part of the work to tidy up the ASP.NET Core shared framework, Json.NET is being removed from the shared framework and now needs to be added as a package.

To add back Json.NET support to an ASP.NET Core 3.0 project:

Runtime compilation removed


As a consequence of cleaning up the ASP.NET Core shared framework to not depend on Roslyn, support for runtime compilation of pages and views has also been removed in this preview release. Instead compilation of pages and views is performed at build time. In a future preview update we will provide a NuGet packages for optionally enabling runtime compilation support in an app.

Other breaking changes and announcements


For a full list of other breaking changes and announcements for this release please see the ASP.NET Core Announcements repo.

Build modern web UI with Razor Components


Razor Components are a new way to build interactive client-side web UI with ASP.NET Core. This release of .NET Core 3.0 Preview 2 adds support for Razor Components to ASP.NET Core and for hosting Razor Components on the server. For those of you who have been following along with the experimental Blazor project, Razor Components represent the integration of the Blazor component model into ASP.NET Core along with the server-side Blazor hosting model. ASP.NET Core Razor Components is a new capability in ASP.NET Core to host Razor Components on the server over a real-time connection.

Working with Razor Components


Razor Components are self-contained chunks of user interface (UI), such as a page, dialog, or form. Razor Components are normal .NET classes that define UI rendering logic and client-side event handlers, so you can write rich interactive web apps without having to write any JavaScript. Razor components are typically authored using Razor syntax, a natural blend of HTML and C#. Razor Components are similar to Razor Pages and MVC Views in that they both use Razor. But unlike pages and views, which are built around a request/reply model, components are used specifically for handling UI composition.

To create, build, and run your first ASP.NET Core app with Razor Components run the following from the command line:

dotnet new razorcomponents -o WebApplication1
cd WebApplication1
dotnet run

Or create an ASP.NET Core Razor Components in Visual Studio 2019:

Razor Components template

The generated solution has two projects: a server project (WebApplication1.Server), and a project with client-side web UI logic written using Razor Components (WebApplication1.App). The server project is an ASP.NET Core project setup to host the Razor Components.

Razor Components solution

Why two projects? In part it’s to separate the UI logic from the rest of the application. There is also a technical limitation in this preview that we are using the same Razor file extension (.cshtml) for Razor Components that we also use for Razor Pages and Views, but they have different compilation models, so they need to kept separate. In a future preview we plan to introduce a new file extension for Razor Components (.razor) so that you can easily host your components, pages, and views all in the same project.

When you run the app you should see multiple pages (Home, Counter, and Fetch data) on different tabs. On the Counter page you can click a button to increment a counter without any page refresh. Normally this would require writing JavaScript, but here everything is written using Razor Components in C#!

Razor Components app

Here’s what the Counter component code looks like:

@page "/counter"

<h1>Counter</h1>

<p>Current count: @currentCount</p>

<button class="btn btn-primary" on‌click="@IncrementCount">Click me</button>

@functions { int currentCount = 0;
void IncrementCount() { currentCount+=1; }
}

Making a request to /counter, as specified by the @page directive at the top, causes the component to render its content. Components render into an in-memory representation of the render tree that can then be used to update the UI in a very flexible and efficient way. Each time the “Click me” button is clicked the onclick event is fired and the IncrementCount method is called. The currentCount gets incremented and the component is rendered again. The runtime compares the newly rendered content with what was rendered previously and only the changes are then applied to the DOM (i.e. the updated count).

You can use components from other components using an HTML-like syntax where component parameters are specified using attributes or child content. For example, you can add a Counter component to the app’s home page like this:

@page "/"

<h1>Hello, world!</h1>

Welcome to your new app.

<Counter />

To add a parameter to the Counter component update the @functions block to add a property decorated with the [Parameter] attribute:

@functions {
 int currentCount = 0;
[Parameter] int IncrementAmount { get; set; } = 1;
void IncrementCount() { currentCount+=IncrementAmount; }
}

Now you can specify IncrementAmount parameter value using an attribute like this:

<Counter IncrementAmount="10" />

The Home page then has it’s own counter that increments by tens:

Count by tens

This is just an intro to what Razor Components are capable of. Razor Components are based on the Blazor component model and they support all of the same features (parameters, child content, templates, lifecycle events, component references, etc.). To learn more about Razor Components check out the component model docs and try out building your first Razor Components app yourself.

Hosting Razor Components


Because Razor Components decouple a component’s rendering logic from how the UI updates get applied, there is a lot of flexibility in how Razor Components can be hosted. ASP.NET Core Razor Components in .NET Core 3.0 adds support for hosting Razor Components on the server in an ASP.NET Core app where all UI updates are handled over a SignalR connection. The runtime handles sending UI events from the browser to the server and then applies UI updates sent by the server back to the browser after running the components. The same connection is also used to handle JavaScript interop calls.

ASP.NET Core Razor Components

Alternatively, Blazor is an experimental single page app framework that runs Razor Components directly in the browser using a WebAssembly based .NET runtime. In Blazor apps the UI updates from the Razor Components are all applied in process directly to the DOM.

Blazor

Support for the client-side Blazor hosting model using WebAssembly won’t ship with ASP.NET Core 3.0, but we are working towards shipping it with a later release.

Regardless of which hosting model you use for your Razor Components, the component model is the same. The same Razor Components can be used with either hosting model. You can even switch your app back and forth from being a client-side Blazor app or Razor Components running in ASP.NET Core using the same components as long as your components haven’t taken any server specific dependencies.

JavaScript interop


Razor Components can also use client-side JavaScript if needed. From a Razor Component you can call into any browser API or into an existing JavaScript library running in the browser. .NET library authors can use JavaScript interop to provide .NET wrappers for JavaScript APIs, so that they can be conveniently called from Razor Components.

public class ExampleJsInterop
{ public static Task<string> Prompt(this IJSRuntime js, string text) { // showPrompt is implemented in wwwroot/exampleJsInterop.js return js.InvokeAsync<string>("exampleJsFunctions.showPrompt", text); }
}
@inject IJSRuntime JS

<button onclick="@OnClick">Show prompt</button>

@functions { string name;
async Task OnClick() { name = await JS.Prompt("Hi! What's you're name?"); }
}

Both Razor Components and Blazor share the same JavaScript interop abstraction, so .NET libraries relying on JavaScript interop are usable by both types of apps. Check out the JavaScript interop docs for more details on using JavaScript interop and the Blazor community page for existing JavaScript interop libraries.

Sharing component libraries


Components can be easily shared and reused just like you would normal .NET classes. Razor Components can be built into component libraries and then shared as NuGet packages. You can find existing component libraries on the Blazor community page.

The .NET Core 3.0 Preview 2 SDK doesn’t include a project template for Razor Component Class Libraries yet, but we expect to add one in a future preview. In meantime, you can use Blazor Component Class Library template.

dotnet new -i Microsoft.AspNetCore.Blazor.Templates
dotnet new blazorlib

In this preview release ASP.NET Core Razor Components don’t yet support using static assets in component libraries, so the support for component class libraries is pretty limited. However, in a future preview we expect to add this support for using static assets from a library just like you can in Blazor today.

Integration with MVC Views and Razor Pages


Razor Components can be used with your existing Razor Pages and MVC apps. There is no need to rewrite existing views or pages to use Razor Components. Components can be used from within a view or page. When the page or view is rendered, any components used will be prerendered at the same time.

To render a component from a Razor Page or MVC View in this release, use the RenderComponentAsync<TComponent> HTML helper method:

<div id="Counter">
 @(await Html.RenderComponentAsync<Counter>(new { IncrementAmount = 10 }))
</div>

Components rendered from pages and views will be prerendered, but are not yet interactive (i.e. clicking the Counter button doesn’t do anything in this release). This will get addressed in a future preview, along with adding support for rendering components from pages and views using the normal element and attribute syntax.

While views and pages can use components the converse is not true: components can’t use views and pages specific features, like partial views and sections. If you want to use a logic from partial view in a component you’ll need to factor that logic out first as a component.

Cross platform tooling


Visual Studio 2019 comes with built-in editor support for Razor Components including completions and diagnostics in the editor. You don’t need to install any additional extensions.

Razor Components tooling

Razor Component tooling isn’t available yet in Visual Studio for Mac or Visual Studio Code, but it’s something we are actively working on.

A bright future for Blazor


In parallel with the ASP.NET Core 3.0 work, we will continue ship updated experimental releases of Blazor to support hosting Razor Components client-side in the browser (we’ll have more to share on the latest Blazor update shortly!). While in ASP.NET Core 3.0 we will only support hosting Razor Components in ASP.NET Core, we are also working towards shipping Blazor and support for running Razor Components in the browser on WebAssembly in a future release.

SignalR client-to-server streaming


With ASP.NET Core SignalR we added Streaming support, which enables streaming return values from server-side methods. This is useful for when fragments of data will come in over a period of time.

With .NET Core 3.0 Preview 2 we’ve added client-to-server streaming. With client-to-server streaming, your server-side methods can take instances of a ChannelReader<T>. In the C# code sample below, the StartStream method on the Hub will receive a stream of strings from the client.

public async Task StartStream(string streamName, ChannelReader<string> streamContent)
{ // read from and process stream items while (await streamContent.WaitToReadAsync(Context.ConnectionAborted)) { while (streamContent.TryRead(out var content)) { // process content } }
}

Clients would use the SignalR Subject (or an RxJS Subject) as an argument to the streamContent parameter of the Hub method above.

let subject = new signalR.Subject();
await connection.send("StartStream", "MyAsciiArtStream", subject);

The JavaScript code would then use the subject.next method to handle strings as they are captured and ready to be sent to the server.

subject.next("example");
subject.complete();

Using code like the two snippets above, you can create real-time streaming experiences. For a preview of what you can do with client-side streaming with SignalR, take a look at the demo site, streamr.azurewebsites.net. If you create your own stream, you can stream ASCII art representations of image data being captured by your local web cam to the server, where it will be bounced out to other clients who are watching your stream.

Client-to-server Streaming with SignalR

System.IO.Pipelines on HttpContext


In ASP.NET Core 3.0, we’re working on consuming the System.IO.Pipelines API and exposing it in ASP.NET Core to allow you to write more performant applications.

In Preview 2, we’re exposing the request body pipe and response body pipe on the HttpContext that you can directly read from and write to respectively in addition to maintaining the existing Stream-based APIs.
While these pipes are currently just wrappers over the existing streams, we will directly expose the underlying pipes in a future preview.

Here’s an example that demonstrates using both the request body and response body pipes directly.

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{ if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); }
app.UseRouting(routes => { routes.MapGet("/", async context => { await context.Response.WriteAsync("Hello World"); });
routes.MapPost("/", async context => { while (true) { var result = await context.Request.BodyPipe.ReadAsync(); var buffer = result.Buffer;
if (result.IsCompleted) { break; }
context.Request.BodyPipe.AdvanceTo(buffer.End); } }); });
}

Generic host in templates


The templates have been updated to use the Generic Host instead of WebHostBuilder as they have in the past:

public static void Main(string[] args)
{ CreateHostBuilder(args).Build().Run();
}

public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });

This is part of the ongoing plan started in 2.0 to better integrate ASP.NET Core with other server scenarios that are not web specific.

What about IWebHostBuilder?


The IWebHostBuilder interface that is used with WebHostBuilder today will be kept, and is the type of the webBuilder used in the sample code above. We intend to deprecate and eventually remove WebHostBuilder itself as its functionality will be replaced by HostBuilder, though the interface will remain.

The biggest difference between WebHostBuilder and HostBuilder is that you can no longer inject arbitrary services into your Startup.cs. Instead you will be limited to the IHostingEnvironment and IConfiguration interfaces. This removes a behavior quirk related to injecting services into Startup.cs before the ConfigureServices method is called. We will publish more details on the differences between WebHostBuilder and HostBuilder in a future deep-dive post.

Endpoint routing updates


We’re excited to start introducing more of the Endpoint Routing story that began in 2.2. Endpoint routing allows frameworks like MVC as well as other routable things to mix with middleware in a way that hasn’t been possible before. This is now present in the project templates in 3.0.0-preview-2, we’ll continue to add more richness as we move closer to a final release.

Here’s an example:

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{ if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); }
app.UseStaticFiles();
app.UseRouting(routes => { routes.MapApplication();
routes.MapGet("/hello", context => { return context.Response.WriteAsync("Hi there!"); });
routes.MapHealthChecks("/healthz"); });
app.UseAuthentication(); app.UseAuthorization();
}

There’s a few things to unpack here.

First, the UseRouting(...) call adds a new Endpoint Routing middleware. UseRouting is at the core of many of the templates in 3.0 and replaces many of the features that were implemented inside UseMvc(...) in the past.

Also notice that inside UseRouting(...) we’re setting up a few things. MapApplication() brings in MVC controllers and pages for routing. MapGet(...) shows how to wire up a request delegate to routing. MapHealthChecks(...) hooks up the health check middleware, but by plugging it into routing.

What might be surprising to see is that some middleware now come after UseRouting. Let’s tweak this example to demonstrate why that is valuable.

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{ if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); }
app.UseStaticFiles();
app.UseRouting(routes => { routes.MapApplication();
routes.MapGet("/hello", context => { return context.Response.WriteAsync("Hi there! Here's your secret message"); }) .RequireAuthorization(new AuthorizeAttribute(){ Roles = "secret-messages", });
routes.MapHealthChecks("/healthz").RequireAuthorization("admin"); });
app.UseAuthentication(); app.UseAuthorization();
}

Now I’ve added an AuthorizeAttribute to my request delegate. This is just like placing [Authorize(Roles = "secret-messages")] on an action method in a controller. We’ve also given the health checks middleware an authorization policy as well (by policy name).

This works because the following steps happen in order (ignoring what happens before routing):

  1. UseRouting(...) makes a routing decision – selecting an Endpoint
  2. UseAuthorization() looks at the Endpoint that was selected and runs the corresponding authorization policy
  3. hidden… At the end of the middleware pipeline the Endpoint is executed (if no endpoint was matched then a 404 response is returned)

So think of UseRouting(...) as making a deferred routing decision – where middleware that appear after it run in the middle. Any middleware that run after routing can see the results and read or modify the route data and chosen endpoint. When processing reaches the end of the pipeline, then the endpoint is invoked.

What is an Endpoint and why did we add this?


An Endpoint is a new primitive to help frameworks (like MVC) be friends with middleware. Fundamentally an Endpoint is a request delegate (something that can execute) plus a bag of metadata (policies).

Here’s an example middleware – you can use this to examine endpoints in the debugger or by printing to the console:

app.Use(next => (context) =>
{ var endpoint = context.GetEndpoint(); if (endpoint != null) { Console.WriteLine("Name: " + endpoint.DisplayName); Console.WriteLine("Route: " + (endpoint as RouteEndpoint)?.RoutePattern); Console.WriteLine("Metadata: " + string.Join(", ", endpoint.Metadata)); }
return next(context);
});

In the past we haven’t had a good solution when we’ve wanted to implement a policy like CORS or Authorization in both middleware and MVC. Putting a middleware in the pipeline feels very good because you get to configure the order. Putting filters and attributes on methods in controllers feels really good when you need to apply policies to different parts of the application. Endpoints bring togther all of these advantages.

As an addition problem – what do you do if you’re writing the health checks middleware? You might want to secure your middleware in a way that developers can customize. Being able to leverage the ASP.NET Core features for this directly avoids the need to build in support for cross-cutting concerns in every component that serves HTTP.

In addition to removing code duplication from MVC, the Endpoint + Middleware solution can be used by any other ASP.NET Core-based technologies. You don’t even need to use UseRouting(...) – all that is required to leverage the enhancements to middleware is to set an Endpoint on the HttpContext.

What’s integrated with this?


We added the new authorize middleware so that you can start doing more powerful security things with just middleware. The authorize middleware can accept a default policy that applies when there’s no endpoint, or the endpoint doesn’t specify a policy.

CORS is also now endpoint routing aware and will use the CORS policy specified on an endpoint.

MVC also plugs in to endpoint routing and will create endpoints for all of your controllers and pages. MVC can now be used with the CORS and authorize features and will largely work the same. We’ve long had confusion about whether to use the CORS middleware or CORS filters in MVC, the updated guidance is to use both. This allows you to provide CORS support to other middleware or static files, while still applying more granular CORS policies with the existing attributes.

Health checks also provide methods to register the health checks middleware as a router-ware (as shown above). This allows you to specify other kinds of policies for health checks.

Finally, new in ASP.NET Core 3.0 preview 2 is host matching for routes. Placing the HostAttribute on an MVC controller or action will prompt the routing system to require the specified domain or port. Or you can use RequireHost in your Startup.cs:

app.UseRouting(routes =>
{ routes.MapGet("/", context => context.Response.WriteAsync("Hi Contoso!")) .RequireHost("contoso.com");
routes.MapGet("/", context => context.Response.WriteAsync("Hi AdventureWorks!")) .RequireHost("adventure-works.com");
routes.MapHealthChecks("/healthz").RequireHost("*:8080");
});

Do you think that there are things that are missing from the endpoint story? Are there more things we should make smarter or more integrated? Please let us know what you’d like to see.

Give feedback


We hope you enjoy the new features in this preview release of ASP.NET Core! Please let us know what you think by filing issues on Github.

Print this item

 
Latest Threads
{"Limited"} Temu Coupon C...
Last Post: yopif65649
1 minute ago
Temu Coupon Code|"$100 of...
Last Post: yopif65649
3 minutes ago
[Get] Temu Coupon Code "$...
Last Post: yopif65649
8 minutes ago
Latest 2026 $100 OFF "Tem...
Last Post: yopif65649
9 minutes ago
[{Updated}] Temu Coupon C...
Last Post: yopif65649
11 minutes ago
[New] Temu Coupon $100 Of...
Last Post: yopif65649
13 minutes ago
{{"Exclusive*}} Temu Coup...
Last Post: yopif65649
16 minutes ago
Working Temu Coupon 2026 ...
Last Post: yopif65649
53 minutes ago
[Verified] Temu Promo Cod...
Last Post: yopif65649
55 minutes ago
"Latest"» Temu Coupon Cod...
Last Post: yopif65649
1 hour ago

Forum software by © MyBB Theme © iAndrew 2016