Online Marketing

The Future of Blazor on the Client

Blazer is a client web UI framework based on net and c-sharp instead of javascript. Now previously, the browser was a black box that you couldn’t get your dotnet code into now with blazer. You can use dotnet for your client web development needs. But what if you need to take your app to other native platforms like mobile, desktop and other devices? It could be really expensive to have to build native experiences for all those platforms and you might not have the developer resources or the developer.

Skill sets one common strategy is to use the ubiquity of the web and your existing web developers to build apps with native like capabilities in the future. We want to evolve blazer so that you can use it to build apps that have those native like capabilities, so we’re going to walk this spectrum from the web to native applications. Now, we’ve already seen blazer server apps in dotnet core 3. Oh it’s available this week.

Download and install it try it out. Blazer server apps enable you to get ad rich client side interactivity to your existing dotnet web applications. Now they run on the server, but they allow you to have that client interactive feel like a single page web application. They also enable you to leverage the capabilities of the browser using JavaScript Interop. Let me hop over here to visual studio, here’s the blazer weather application that we saw earlier this week.

This is a blazer server, app I’ve already refactored it again to move all of its components into this razor class library. This blazer web weather core. We expand some of these folders, we’ll see all the the Razr files in there there. They are that’s so that I can reuse these components in the future demos when the blaze their server app. We’ve we’ve seen what this looks like: it has a UI for showing the current weather, and one of the things that we already saw is that we do have client side interactivity.

We can click on and change the current temperature unit. We can also use the capabilities of the browser to get the users current location by clicking here that should use the geolocation API is to give us where we’re currently at all right. One other thing that I’ve added to this application that also leverages an additional an additional capability is the browser’s local storage. I used it’s. Actually a community project was a github comm blaze word.

This is a project by Chris st. II and he’s done a whole bunch of really good stuff. He has a package that uses JavaScript Interop to enable local storage and blazer applications. I use that so that if we go back to the app we can store our pinned locations locally in the browser. So, let’s like go to Chicago and we’ll pin that one there it is, and now we can cycle through our pin locations. So we have Seattle and Chicago if I grab this URL and just going to close that tab and then we’ll open up a new one browse back, we still have Seattle and Chicago as our pinned locations using the browser’s local storage to store those things.

So we get to leverage browser caching, this yes, yes, oh yeah, this this makes me ready now for the Deaf. Thank you mr. Prez, all right, all right, we’re going to blaze on now: okay, whoo, yeah, okay. So, what’s the next step on adding more native-like capabilities to our blazer application? Well, the next step is blazer. Webassembly blazer web assembly apps run in the browser on a web assembly base hot net runtime.

Sorry so, with a blazer web assembly app, the files can your app is just a bunch of static files and they can be downloaded. They are downloaded into the browser and then executed, and they can then leverage the capabilities of the browser. Well, so I’ve taken the same application. This is the the server version. Let’s close, that, let’s now go to a different project, and this is a web assembly version of the same project.

It’s actually using exactly the same components. This is kind of cool a lot of customers that I talked to are starting out with Blaser server. With the plan to win one sweet blazer web assembly is available in May of next year that they can then shift their app to actually run full on and in the client. But let’s go ahead and run the web assembly. Version of this app looks pretty much. The same does the same things like we can get the I gets our current location here.

We should should be in Redmond yep there. We are all right and then, if we f12 and look at what was downloaded to this application, it looks a little bit different. Yeah, so there you see down at the bottom, there’s that mono dot wasum file, that is our web assembly based at runtime. So this app is actually running a client side directly in the browser now to show that that’s really occurring, we can even debug when I f12 again.

If we look in the console, you can see there’s a debugging hot key gesture that we can do. I’r not debugging this in Visual Studio, I’m actually going to use the browser dev tools to debug it. We don’t support debugging in Visual Studio yet for blaze or webassembly apps, but we will in the future for now don’t run it with debugger in Visual Studio. And then you can do use do this trick. So I’m going to hit shift alt D and that’s going to try and bring up the browser dev tools to connect to the tab that I want to debug through a debugging proxy that we set up for you now for that to work.

We actually have to run the browser with remote debugging enabled, which I don’t have it doing currently, and it’s telling me how I can restart it. So it does do that. So I’m going to close down the browser completely and I’m going to run the command that it just told me to do to restart the browser with remote, debugging enabled and we’ll hit that gesture again shift alt D, and now I should get the browser dev tools That can connect to my tab.

There we go alright. So let’s put this side-by-side with the tab, I want to debug and we’ve already got some files open. Let’s go ahead and close those in the in the sources tab we can see down here. Alright, we can actually take a look at all of our give myself a little more space, all the files that are in our application, so there’s blazer weather core. What do we want to look at? Let’s look at let’s look at the temperature unit: picker we’ll open that file up.

We can set a breakpoint right here on the click handler when the temperature has changed. Let’s go ahead and get the current location back up on the screen, so we can change the current of the temperature unit. Well, click and there we just hit a breakpoint in c-sharp in the browser running on top of a web assembly based at runtime. We can even expand down here and take a look at some of the local fields in our component.

So currently the temperature was was Fahrenheit, let’s hop out of here, and let that the app continue. If we clip the temperature unit picker again, it should say that it’s changed and has it yeah. It looks like we’re good. So now the temperature is Celsius, so there we’re just debugged our blazer web assembly, app directly clients eyes. So that’s pretty cool, oh, go ahead and let that run all right.

So that’s blazer web assembly. Now we can use some of the more modern web standards in our blazer web assembly, app to make it even more native-like and apps like this are typically called progressive, web, apps or pwace. What is a PWA? Well, a PWA is just a web app, but it uses modern web standards to enable things like offline support. You add a serviceworker so that the files can be cached and used even when the browser is not connected.

Support for push notifications, pwace tend to are fast and responsive, so they have that native app like feel on some platforms. They can even be OS installable, like you, can pin them to your home screen on your phone or on Windows 10. You can install them so that it can be, they can be run from your Start menu. So we can take our blazer webassembly app and turn it into a PWA all right. Let’s do that.

So actually, we’ve already got it running and if you we look at the top with our blazer webassembly app, you can see there’s a couple of icons up there and this one here is says: install install blazer, whether as PWA, that’s because the browser and Windows 10 Is detecting that this is a progressive web app if I go ahead and click that yeah, let’s go ahead and install, and now we see our blazer web assembly app, but it’s in like a native shell, with all the same functionality still works like I don’t know, Saying this, so we can find new locations, we can get the location by by geolocation and we can see that on the Start screen of my Windows – 10 box, there is my blazer weather app and it has a nice little icon.

So that shows up in the Start menu. So that’s pretty cool. So that’s that’s a blazer PWA. How did we enable this? If we go back to the code and look at how this was implemented in the www root folder, we can see there’s a serviceworker that was added to this application. This is a piece of JavaScript that enables caching and then there’s also this manifest file which specifies like icons that can be used when this app is either pinned to a home screen or or to the the Start menu and the windows device.

That is that blazer PWA, starting to look a little bit more native. It’s got a native shelves, it’s runnable from the Start, menu. Let’s go ahead and close that all right, hybrid apps are native apps that run natively on the device they have access to all the native capabilities of the of the device, but they use web technologies for rendering their UI. So, for example, you might have a mobile application, that’s running natively, but it’s using a webview for rendering all of its user interface or you can have an electron application and an electron application is using an embedded chromium shell to handle all of it.

So, let’s your user interface, let’s see if we can build blazer, hybrid apps as well, we’ve been doing some experiments in this space when we go back to visual studio. Alright. So here in my third project, we have a blazer weather electron app, so I’m going to set this as the startup project and we’re going to ahead and run it again. It’s using the same components as before, but now, instead of running as a web application, this blazer electron app is going to run in an electron shell.

It’s a native shell, like we have all the access to all the native capabilities of electron. The same functionality still works, let’s see what the weather is like in New York, then it goes. We can get the the current location and so forth. We have all of our pin sites, and this HAP is interesting because it’s not actually using webassembly the blazer webassembly app and the progressive web app. Those were both webassembly based.

They were running in or inside the browser using the web assembly based runtime and, as a result, they were also limited by the browser security sandbox. A lot of people ask me about blazer webassembly apps when they see the dll’s being downloaded into the browser and asked. Is that is that safe? Is that okay, like? Is there any security issue there? The answer is no, because the code that’s being executed is being executed using that dotnet webassembly runtime running in the browser security sandbox.

So it can’t do anything more than what normal JavaScript could do in a browser. Application can’t do anything more and I can’t do anything less either. It has all the capabilities of what JavaScript can do, but no more so it is safe. In this case, though, we’re running on electron, an electron app the.Net code is running in a normal dotnet core process. Nak dotnet core process does actually have full access to the native capabilities of the machine.

So if you want to touch the file system or open arbitrary network connections with this application, that’s stuff that you can do in this application. So basically, what we have here is a native desktop app with the UI built using web technologies built using dotnet and it’s cross-platform. This will run on Windows, Mac and Linux. So that’s an example of a what a blazar hybrid app. What might look like, at least for desktop scenarios? This is something that we’re exploring and investigating.

If you want to play around with blazer electron, I think I have this you’re all set up. You should go to HBS whack whack, blazer, electron, akms, blazer electron is the euro and let’s see if this is not alive. I think I set this up this morning. Yeah there we go. This will take you to our HP, Labs repo and we have an experimental project that we’re working on that integrates blazer with with electron and there’s a sample there that you can try out all right now.

The last stop on our spectrum from web to native is going well. The first ones get passed. The hybrid screen is going full native actually having a native app, but instead of using web UI. What are web technologies to render the the UI Wow we use native controls so that we can leverage the native controls of the device? This is an area also that we’re investigating and experimenting with. I don’t have a live demo for for this area, but Blaser was architected from the beginning so that its renderer was extensible.

The default renderer in Blaser renders HTML and that’s why you used laser to build web applications, not too surprising there, but the renderer can be replaced. In fact, you can replace it with a different renderer that renders to whatever you want, like you might render. Instead to native controls, there’s a really cool demo, that is just a tech demo, an experiment. It’s not anything that so we have any plans to ship, but that seefs anderson did at NDC oslo earlier this year and what he did is he took the blazer renderer.

He replaced it with a renderer that could render to native flutter controls, so he was able to build a flutter app using Blaser writing his code in c-sharp. Normally flutter apps would be written with dart. U it’s pretty pretty cool demo. You can take a look at it at the link below a kms blutter, so Blaser plus flutter. It gets you blutter. I guess where you can see, see senator sanderson a demo that capability of blazer again.

This is not something that we actually plan to ship, but it just shows you what is possible with the the blazer model. This is very um, similar in nature to what you typically write with applications that are using technologies like xamarin or react native. These are applications that run natively on the device and then also a render to native controls in a cross-platform way. We’re looking at. Could we do something similar with blazer like have a blazer native? That does a very similar thing, nothing to share yet there, but it is an area that that we are currently looking at all right.

So this is what the roadmap now looks like for for blazer blazer server is available. Today, it is supported in dotnet core 3 o. If you want to build a blazer server app and deploy it into production, you can do that right now. Go ahead and download it install it. It’s great. You can start adding some rich interactivity to your existing done at web applications blaze. Our web assembly we announced earlier this week will ship next year.

We’re targeting May of next year will start to see more progress on that in the in the months ahead. We’re also starting work on blaze or hybrid apps and blazer progressive web apps. You should expect to start to see previews of that functionality in some of the dotnet 5 previews that will be coming up shortly. Dotnet 5 is expected to ship in November of next year, but hopefully we’ll have previews at PD, PWA support and electron sooner than that, if you want to play around with blazer webassembly apps as pwace, there are actors, some really nice community projects out there that you Can download and install and those those are really great to try out blaze.

Our native is not something that we have any concrete roadmap for, but it’s an area that we are experiment experimenting with and we hope to learn more about and talk to talk to. Folks, like you to see what we should should should do there, so that is the future of blazer on the client. I hope you enjoyed the things that you see that you saw, I hope, you’re excited about them, give them a try, try out blazer an electron with a sample, try out blazer webassembly, give us feedback and, of course, make sure you download dotnet core 3.

Oh today, there is no time like the present so make sure you’re using the the bits that are already ready available. This is a bunch of useful resources that you can go look at to get started with. Blazer get go to blazer net to get the bits and find the documentation you can get the dotnet core 3o bits at the dotnet. Slash get core 3 go make sure you get Visual Studio if you’re on on Windows you’re going to want to get the latest release of Visual Studio 16.

3. We have a wonderful blazer workshop if you want to learn how to program with blazer and participate in the blazer community. They have a lot of great folks, like Chris dainty, who did the blizzard project and and others that are building wonderful, JavaScript, Interop libraries and component libraries, and with that I’m going to turn the remainder of the time over to questions yeah. Thank you check this out.

Yeah yeah, so thank you so much. We have a little special surprise. What so I want everybody. That’s reading to know that this is actually Dan’s 15-year anniversary of Microsoft. It is blazer, probably wouldn’t exist without Dan with a lot of people. So a lot of people work on placing the blazer thing, and so I want to give you this gift. This is a blazer pillow, what’s even better about this blazer pillow, if you swipe up on the blazer pillow, that is that spectacular.

Are these place fabricated at large, like a one-of-a-kind thing? I don’t know this this this. That is congratulations, 15 years to the next 15 years. Yes, thank you right. Let me borrow that pillow for a couple of weeks I mean just just. Maybe we probably have a ton of questions. Oh there’s lots of people tweeted you in your brand new jacket sweet. Do you want to yeah? Let’s do it. So, let’s start from the left here and we’re going to get this question here.

Well, blazer be a good choice for enterprise level, web apps that need high availability, scalability and fine grained services on the cloud. While this is really good yeah, you know I I mean. That’s what the it’s built for and blaze our server in particular that’s what’s shipping today, that’s what’s supported absolutely supported for large enterprise applications, so I think we we think of Blazers being particularly well suited to enterprise apps for line of business applications yeah.

It would be absolutely yes, it is ready. So yes, yes, yes all right. What else do we have here? So what about this one? How do you users, how do you have users update new build versions and a blazer pw8 updates? How do you do that updates to new versions in a PWA, so I believe, that’s all managed by your Service Worker policy like the so I think the inherent question is there is when you download a PWA, you can often set up a serviceworker so that it’s Available offline, which is effectively that caches the files when you set up a serviceworker, I believe that’s where you put policy about like when does the app go back to get the new files and I’m sure, there’s also a way where you can just enforce the aptitude? Fresh, but I think that’s how you would do it I’ll have to I’ll double check on that, but that’s my current understanding.

We haven’t done a lot of Investigations and blazer and PWA, yet we’ve just done some early. You know proof of concepts like you saw today. This is an area that I expect that you’ll see us looking more into in the.Net 5 wave all right next question: any updates about supporting G RPC web for blazer, also blazer native on mobile yeah ER PC web. That’s that’s! That’s really interesting. So we support grq, see now in tot nick horror, 3.

Oh, how ever it doesn’t work from a browser? You can’t speak the G RPC protocol from the browser to to your front end servers. There is a variant of G RPC that you can use called G RPC web. We don’t currently support it today and we don’t have concrete plans to support it yet, but we are talking about it as a potential area to to invest so don’t know yet. But let us know if you think that would be interesting and useful for blaze are native well, we just talked a whole bunch about what we’re thinking for for blazer native.

We are right now in the prototyping and investigating stage. Blazer was architected from the beginning to support non web native scenarios where you replace its render, with some other render that can go to native controls. It’s very similar to what like react, did react, started out as a web framework and then move to support native apps with react. Native laser can absolutely do the the same thing.

What the roadmap for that is. Yet we don’t know it’s still TBD TBD. Okay, we have another question here: APW a using blazer, that’s something really attractive, but for now my question is which server off integration is preferred like Windows or DB. Chrome has problems with Windows off so which off mechanism should you use with a blazer application, so that will impart depend on your hosting model like if you’re hosted on the server or, if you’re running on web assembly in the client and really the type of author.

You then use will depend on your app and will tomato it depend on your environment if you’re running in the client on webassembly, that’s like a spa, so you use spa style, authentication patterns. Typically, that means using like an open ID, connects a row off like flows where you acquire a jot token and use that with all of your HTTP client requests. You can also use cookie based off from from a spa.

That is that it’s possible blaze, our server apps. You have the whole set of auth options available to you, based on what you’re trying to do. If you’re, if you’re providing a line of business application – and you have Windows users, you want to let them log in Windows off, it would be a great option if you’re writing an app where you need users to be able to register their own user profiles and Have their own passwords that you want to manage, then using a spirit, core identity for your authentication support, it’s a great option for the webassembly apps using identity servers, support for open ID connect with probably probably what you want to do fantastic.

So just a couple of pictures like this one to me is what it feels like: I’m there and another one of course, looking sharp. If you follow him, you’ll find he did another picture of me, but not as flattering as this Jeremy. You got to get my good side. Buddy now for sure lays a jacket for more important questions. Obviously, can this be integrated with an existing Donette framework project? If so, how via new get that’s? That’s the you know, that’s a it’s a great question: could you, whose blazer, with a dotnet framework out, let me blaze our server? Obviously, not because blazer server is is is running on asp.

Net core, like it’s using the signal, our support in asp.Net core, so no with with dotnet choreo. You can’t run that on a dotnet framework. App blazer web assembly is just static files, so it doesn’t really care what is on the the server it could be actually PHP or whatever on the server. So technically I guess you could use dotnet framework on the server with a blazer webassembly app, but it’s really been optimized and integrated with dotnet core, like the full stack experience that we imagined for blaze, our web assembly is you have dotnet core on the server blazer Web assembly on the client – and we provide you all the nice integration points there.

That’s that’s Wemo how we mostly imagine it being used but technically should be doable and here’s like a super awesome question mica. What does it say yeah? Is that Blazers future of web development is blazer the future not try to put it on a spot again where in the jacket – and you have a pillow with your face on it, you say it’s super authoritative comes to the future of web dome. Yeah absolutely is for many many web developers.

Is it going to be the only way that people write web apps going forward like some some people ask like? Does this mean I that no one will ever write JavaScript again like no? That’s not what blazer is going to do. There will be lots of people still running JavaScript there’ll, be lots of people writing in all sorts of different technologies. What web assembly did is it actually opened up the door for really any platform? You want to be used in the browser, so I imagine there’ll, be people using Python and go and rust in the browser as well, but we are working really hard to make sure we have a great dotnet full stack web development story.

Alright, so here is another one, and this is interesting to me because I remember when this was introduced. I saw Sanderson demo it to me. It was me it was Damion, Edwards and Fowler, and we just sat there were like holy cow. This is ridiculous, and the first thing I thought was perf is this: is this going to be the same as the other, so any stats that show performance comparison between asp.Net MVC, web and blazer yeah? So so there’s a couple different comparisons that you could do that.

First of all, it’s not really an apples-to-apples, of course Harrison, and the reason is like I we talked about yesterday. Blazer is for your client web development needs, it doesn’t replace MVC, it doesn’t even do the same things that NBC and razor pages do. Those are server. Render technologies that use on the server Blazers meant to be used in the browser for a client web UI? So you don’t even do that when you want to do a server rendering you do that with MVC.

You don’t do that with laser at all, but there is some interesting, perfect characteristics of blazer that are worth mentioning: the Blazers, based on a differing algorithm. Where you render your components, it calculates a DIF and it applies it to the Dom that diffing algorithm has been highly optimized to be very, very efficient when you run it in web assembly. There are some known performance issues with any CPU intensive loads on our existing web assembly runtime right now.

That’s because, right now our dotnet webassembly runtime is doing ILO interpretation and it doesn’t have a jitter. It’s just interpreting the il on the fly and that can be slower, we’re working on that we’re working on supporting ahead of time competent compilation to assembly, which does give you back that, like native like performance, we haven’t had a preview of that yet. But we hope to have one as soon as we can shortly so that will hopefully address the performance problems of running an op laser web assembly in the browser when you’re running on the server you’re running on dotnet core, it’s superfast no performance problems at all.

All right, I think we have one more question. Yeah we have time for one more yeah. We do all right. Well, blazer support a per razer component, server-side web assembly configuration in one spot. I don’t know if I could parse that oh yeah write a Perl radius component, server-side, slash, there’s like so many pieces here. That’s why it’s such a good question. Ah, I think I like the way I choose to interpret this question.

You are wearing the jacket. You can do whatever you want. I think what this is asking is, you could imagine, maybe having a mixture of hosting models in the same app where this component is going to run on web assembly, but that component is going to run on the server, maybe for whatever reason it makes sense to Do that we don’t a first-class way of doing that today. It is something that people have asked us about right now, you either you pick one or the other you’re doing place or webassembly you’re doing blazer server.

It doesn’t seem like there should be anything blocking it, though, because, like I said laser weapon, sembly is just a bunch of static files. You could have a blaze of server app, you throw a bunch of blazer webassembly files into its dub-dub-dub root folder, and you can download those and use those, so it seems like you could get it to work. I haven’t actually done it yet, though, and it’s not an area we’ve really played around with, maybe that’s something that will we’ll look at going going forward.

Well, this has been amazing. We have coming up a short commercial break and afterwards


Online Marketing

Modernizing .NET Desktop Applications with .NET Core

Thank you for reading this session. My name is olya garish, I’m program manager on dotnet team working on desktop, and today we will talk about modernizing your dotnet desktop applications with dotnet core 3, but first there are many different ways you can modernize or upgrade your applications. It’s not only about how your application looks. It’s also about how it works. How performant it is, what device or platform API is.

It is using. How do you do dev ops? How do you deploy and distribute your application, and this year has been truly amazing year for dotnet desktop, because we got innovations in all of those areas and we don’t talk about all new features available for your desk desktop applications throughout the old dotnet conference. In this talk, we will focus on how you can update your apps with dotnet query 3.

0 and on the day 3. You will have another session by my Cruise’s about more advanced scenarios on porting to dotnet core your WPF applications. How to make your application look modern. How to integrate your application with devices and platform, everything about some old tools and zamel islands will be covered by Dimitri in his talk tomorrow and everything related to dev ops, MSI, X, up Center, so how to capture analytics and diagnostics, how to deploy and distribute your Application you will learn from the talk by daniel and make right after this session so keep tuned, and let’s move to the agenda of this talk first, I would like to start with.

Why should you care about dotnet court for desktop and what to choose that net core or does net framework for your desktop applications? Then I will talk about how you can port your framework application to dotnet core. If you decide so and how to fix porting issues, and then I would like to show you the dotnet desktop tooling, it’s zamel and WinForms designers. So, let’s start, why should you care about the net coiffeur desktop? Well, there are many good reasons, but the most important is because dotnet core is the future of dotnet.

As you probably heard from the keynote dotnet core is a platform that will receive feature updates in the future and in the next year we will release dotnet 5 in November 2020, which will be the next iteration on dotnet court. So by porting, your application to dotnet queer now you’re preparing your app for dotnet 5 to switch from dotnet core to dotnet 5 will be as easy as upgrading it to the next version of the platform.

And if you want your application to incorporate all the new things that will come in future, you want to be on that net core. That is what you should keep in mind when you think about future, but even today there are many great donate core specific things available that are not possible for dotnet framework application. We also talked about it at keynote, so I’ll, just briefly wisdom. Here, it’s a side-by-side deployment of different versions, of.

Net core on the same machine for dotnet framework. You could have only one version and every time you want to switch to the later version of the net framework you had to update it, an application that will run on that machine will have a dependency of that update for developers developers. It usually means that you have to make a company-wide decision run by IT, department which results in delays with dotnet core.

You can update at your own pace because you can have many different versions: of.Net core on the same machine, and you can specify in your application Beach version of.Net core. You would like to target. You can go even further and you can package your dotnet core application with dotnet core platform itself, so you can distribute to your client self-contained application, which will be completely independent on the environment.

It will run on. Another great feature is a single file executable where you can package your application and dotnet core framework in just one big, zip file and a new feature of dotnet core 3 will allow you to trim out assemblies from the network that are not required for your application. So that way, your single exe file will have much smaller size and there are many other great features that you can read about and in future we will receive any moment even more.

So usually I get the question ok. Does that mean I need to port all my existing dotnet framework applications to dotnet core or how do I decide and our advice is usually starting new applications on dotnet core, but if you have a completed apps that are in maintenance mode, only all development is finished. You don’t want to touch that code again, it’s completely fine to leave it on dotnet framework.

In fact we are leaving one of our applications on dotnet framework ourselves. Maybe you have heard of Visual Studio, so doesn” t framework will be fully supported. It will receive all required and security updates. It’s totally fine to leave your apps under the framework. But if your application is an active development and you keep changing the code and you want to benefit from new features that are available on the in.

Net core, you can consider port in your app from dotnet framework to dotnet core, so evaluate how much work. That is what are benefits you will get from dotnet core that are important for your particular case and make the call next question that usually comes up tin. Might how much work is it to port from the core to.Net standard or in other words, how compatible is my app with dotnet core well to find out use pert ability, analyzer? This tool will tell you about all api’s in your code that are not supported with dotnet core 3.

If you have any of those, and it will help you to refactor to find areas that you will need to refactor it to be dotnet core compatible with that. Let me go ahead and show you that pert ability analyzer in action, but first let me show you the application, I’m going to be porting today. So this is a WPF application that it’s called Photo Store. It will allow you to make online purchases of printing goods.

Alright and let’s put this application, run portability analyzer and see if this app is compatible with dotnet cord. So I’m going to specify the path to my project and I will run I will click button analyze. What this analyzer does. It looks at the references in your assemblies and it checks if all api’s that you are using from dotnet framework are present in dotnet core. So, as a result, we will get a pert ability report where, in the first column, you have assembly names, then target framework that they are targeting right now and then how compared compatible.

They are with dotnet court, so hundred-percent compatibility means you’re good to go. If you have less than 100, it means that those assemblies have some api’s that are not fully supported in dotnet core and to learn more details. You can go to details tab and here you will see target type target member assembly where this API is used and so on, but before diving into details tab. I would encourage you to take a closer look at the first tab and actually see what assemblies are not compatible, so, in my case, the lines that have less than 100 % compatibility.

These are not actually my code. This are Newtons of JSON nougat packages that I’m using in my code, so I don’t need to update their api’s right. All that I need to do is to check that the author of the package provides the version that supports dotnet, core or dotnet standard. To do that, you can go on you, get dot, work and just see if it supports dotnet core. I know for sure that Newton solo, JSON supports, does not standard at one point.

That means it automatically support dotnet course. So I’m good to go so again. I don’t need to worry about any of this and everything else is 100 % compatible, so I can go ahead and port my application to dotnet core. Let’s talk about porting, no porting from framework to core is simply updating the value of the target framework parameter in your project file. But if you created your application on dotnet framework – and you did not touch your project file since then, it will have the old-style project file so before updating this value, you first need to migrate to the new, so called is the key style project file.

Let me show you what is old project file? Let’s go back to visual studio and I’m going to unload my project. Then I will click Edit Photo Store, and here we can see a very large XML file right and this, oh, my gosh, so big, and this XML file also has parameters like project GUI like project types, good and etc. That all tells me that this is old project file and before a port in to.Net Court, I will need to update my project file to the latest SDK style, and there are ways how you can pour it to dotnet core manually.

These are the steps how you do it first thing: you search for package, dot config in your solution. If you have this file, you will need to right click and choose migrate packages that config to package reference. Let me show that in Visual Studio I will reload the project, and here I see packages that config. That is where we used to store references to the packages for the old-style project file for the new one they are stored in the project file itself.

So to not lose them, you will need to do right. Click migrate package that config to package reference. Then next step is update. Content of your project file with the new SD key format and the easiest way to do it is to create a blank application target in dotnet core. If you are porting VIN forms of then creative informs targeting dotnet core. If you’re porting WP up then WPF open the project file copy everything from it and paste it in your current project file, but make sure you have the copy of the old project file, because you will need that as well.

It will need that you get all references and resources from your old project file to the new one, so everything related to package reference project, reference, content, resources and so on should be moved to the new project file. Well, it seems like a lot of work and we’ve been constantly asked to please try and automate at least some common steps for all API. So, of course, every application is different and it’s almost impossible to create a silver bullet that will work for everything, but at least we can try to automate most cases and we did that and we created a tool called try can work so what it will do It will try to convert your old project file to the new SDK style project file and it will update the version to the net core 3.

0 to use it. I’r going to just type in the console, try converting Z and as a parameter, I will send the path to my project file. Let’s see okay conversion complete, let’s go back to visual studio, I’m going to reload the files and now, if I right click on properties and go here, I can see that target framework is dotnet core 3. So the tool worked and we successfully converted our dotnet framework application to dotnet core in just a few clicks.

Let’s now run our application and see how that looks so it is low. It looks and feels the same, but right now it’s Runyon on top of dotnet core, instead of doesn’t framework, which means that we can benefit from all the dotnet core features. Okay, I’m going to go back to my slides and this is try convert if you got any pretty bility errors. So if, after porting to donate core, you are getting an error that some assembler is missing, but your part ability report was 100 % compatible was completely green.

That means you can easily fix those errors by just 18. You get package, Microsoft, Windows, dot, compatibility. That package has 21,000 api’s; some of them are Windows only and some of them are cross-platform, and these are areas that those api’s are related to. So with that, I would like to talk about tooling for desktop and let’s go back to my application as you remember that it’s WPF application and we just ported it to doesn’t course.

So if I open Windows, main windows, the demo, you can see the designer and this demo designer it looks very similar to the traditional dotnet framework designer. In fact, you barely can see any differences, but it runs outside of the process. It means that the surface of the designer talks to visual studio, it’s they communicate between two different processes, and it was not very easy for us to implement that so zamel designer is already available in Visual Studio and you can use it.

You can go ahead and port your applications to dotnet quark and try that amazing. As for WinForms designer, we started working on WinForms later than ensemble designer, and it was a huge technical effort for us to really tag the way. How designers surface will talk to the visual studio process so we’re in very early days and today I’m very happy to announce that we are releasing the first preview version of windows forms designer it’s available at this link.

It’s a via visix package and it’s not included in Visual Studio just yet, because it’s still very early days for it and what this first version has. It has a coverage for common controls and base operations, and we will be adding functionality. We will be released. Releasing you preview versions every month. Next one is coming early November and just to let you know, this version is our first start.

So it’s not yet ideal to port your existing applications. It will be good for prototyping and write in hello world with basic common controls. Basically, to see the progress and to give us early feedback, but for your production applications wait till the designer gets more mature and we will definitely let you know when it’s a good time to port your apps to.Net core. So please give us feedback. We’re visual studio blog and let me show you how they win forms designer look, so I’m going to close this and I will create a new VIN forms, application targeting dotnet core search for event forms here and when I click on form one dot CS.

I can see the new VIN forms designer, so when we look at the toolbox, these are the controls that are supported in the first preview version, of course, by the GA of WinForms designer. We will be at functional parity with the traditional framework designer. So all controls will be there and you will have a seamless experience of port in your apps to.Net core right now, it’s just those guys. So we have button check, box, check, clicks, etc.

We can add the controls the same way. We can interact with properties. We can change name and so on. I know that I’m not showing you guys anything new, but because you’ve seen that designer for many many years. But the amazing thing about this designer is that it runs outside of the process and it allows you to build dotnet core applications. So let me run that you, you and we visit the regular VIN forms form right, so that was everything I had for today.

Thank you very much for reading. Please give us your feedback, it’s very important for us to know that we’re developing the right thing for you and you can reach me out on Twitter. Thank you for reading.