.NET Everywhere - Windows, Linux, and Beyond

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i am very excited about this next session that we have going here it is with my good friend colleague co-host and boss scott hanselman um we're going to be talking about net everywhere and you you really put this to the test didn't you scott you uh you really wanted to push all boundaries of how net can literally be anywhere you need it to be yeah well david fowler went and put a tweet out a couple of days ago he was waxing philosophic about the past and he saw this tweet which was a picture of he and i at a conference i think in 2014 and he was on a mac and it was quite the scandal at the time and and now here we are putting.net everywhere in the cloud in webassembly on macs on iphones on android but i wanted to showcase some of the cool places that it's being used where you might know it's being used and some places where it's being used that you may never have thought oh gosh i had no idea that was.net you know i didn't know my tv rant.net and i brought my bag and i bought a whole bunch of stuff here with some stuff carried all the way from portland to show us so i'm going to do my very best and hopefully it won't suck all right let's see it all right cool hey friends we are at the end of the firstdayof.net conf i'm going to call this the lock note if hunter got to open it up i'm going to close it down and then we're going to go into the virtual attendee party and do all kinds of fun stuff as we get ready for days two and three so i've got my machine right here and this is a surface laptop studio this is actually my own personal machine and i'll just give you a little bit of context as we run around and what we're doing here first i've got the windows terminal which i like to use and i've used oh my posh to go and bling out my prompt here and i've got two panes open you can see that i'm in the github folder on this side so i go pwd you can see i'm on sequel and github where i keep my code on the right hand side over here i've got ubuntu ubuntu this is running under wsl and if i go and run lsb underscore release dash a you can see that this is in fact ubuntu 2004 and i've gone so far as to put the graphics in the corner thank you for the friends of powershell magazine for let me use that graphic that way i can keep track of these things and if i pull down this top menu here you can see i'm using powershell as my default prompt that is actually powershell 7.2 powershell 7.2 in fact came out just yesterday in fact using.net 6. so it released its sim shipped as they say in the microsoft world it's simultaneously shipped with net 6. powershell used to be called powershell core now it's just powershell works everywhere the great thing about powershell which is pwsh.exe is i can write scripts and they will run on windows they'll run on ubuntu they'll run on a mac so it's an optional shell that you can use anywhere and i happen to use it not only as my preferred shell but also my my orchestration scripts and stuff like that so there's somewhere that you didn't necessarily know you were using.net powershell now cross-platform certainly and running on.net six which is cool now on the left hand side here we've got my my code like my hanselman personal website and you notice here when i go into that folder we've got the oh my posh prompt here that's showing my current branch and the current version of the net sdk that i happen to be running in that folder which is interesting if i go up a little bit and i go down into another demo that i might show you a little bit later you can see that when i get into that folder that folder is using.net 5. so i haven't yet updated that one particularly and if i go back up to that hanselman blog location there we go i'm going to drop into that folder and i'm going to go ahead and close that pane and i'll say net run powershell of course giving me that nice predictive pop-down history there that details about that are on my blog and you'll see that it popped uh up a couple of urls here we've got localhost 5000 http https the secure one is 5001. you'll notice that if i hover over those because i'm using windows terminal i can go and click on that and it'll actually bring up the browser for me and then there's my personal website that happens to be running on localhost now that's localhost 5001 running on windows which is cool i'll hit control c we're going to come over here i'm going to click on ubuntu i'm going to hold down alt with my left thumb and that's going to pop open that other pane on the side there so again i've got windows on the left and i've got ubuntu on the right we'll zoom in a little bit make sure that everyone can see that and i'll go and open up the hanselman core i'm going to say net dash dash info here and we can see that i've got both the net sdks dotted at five and the new lts the long term support version of dot net 6.0 running in this folder right here so i'll say net run certainly i could use visual studio code if i felt like it and then you can see right there once again localhost 5000 localhost 5001. go and click on those bring that up get my little security warning that's okay and actually this is an interesting one here sometimes when you do demos little things break and the reason that this is breaking is it says right here that you can't visit localhost right now because the site uses hsts hsts that um forcing things to be secure and it doesn't like that shirt authority is being invalid so as i recall i have to go in here and and go and clear the hs ts cache and i always forget the way to do that and it's usually chrome net internals or edge net internal so i'm going to go and drop into that and then we'll go down here into our net internals and looks like it moved on edge so let's do that again and this is going to go and clear some domain security policy that's way way way down here domain security policies for local host and that happens sometimes when you're doing work with https on um uh you know on multiple sites we'll go ahead and try that one again and if i fail to do that we'll move on okay i'll switch back over to my terminal and we'll bring up localhost 5000 after having run that get that error continue on the localhost and there's my website again okay we cleared that hsts error that was a local domain security policy you see right there localhost again isn't that interesting so wait a second we've got windows and we've got wsl it's a different machine well it's not because wsl is actually port forwarding that 5001 that's in fact being opened up on the linux side of things but it's being made available to me on windows which is great that just showcases that nice experience that you get when you're on windows you can develop on windows you can develop on linux you move back and forth and in this case my browser doesn't mind because that correct port is being forwarded and i'm using my windows based browser which works really great we'll pop back out into here and another thing that i could do and i happen to do this i believe with my podcast website and these are all just my personal sites this is all stuff that i do on the side it's got nothing to do with my day job but one of the things that's nice when you work on.net is to have a project that you do on the side that makes you happy and my podcast makes me happy remember that i said that i use powershell scripts to go and work cross-platform i'm also using docker and docker containers which allows me to do stuff cross-platform these are really simple little scripts there's really nothing here if we go and look at one of them we'll take a look at docker build this one here has what's called a hash bang at the top and that means that we'll use that particular linux application when i run that script but it will be ignored on windows because it uses ps1 extension which means that i can run the script on linux or windows and it works in both places which is super nice and that's just going to go and build my podcast with docker so i'll go and say docker build and we'll do that and then we'll get some nice um ascii art here as we ran through all of that looks like that was previously cached from me building before we're using docker desktop and docker is actually using wsl and using linux as that that engine so underneath that is the linux subsystem that we have built into windows when we went and did that i can go now and i could say docker images and i can see that we've got one tagged podcast now we saw earlier with both scott hunter and david fowler they were talking about the azure container app stuff which is pretty cool i want to go and take those azure container apps and and use them but i wanted to see how quickly and how easily i could put a potential website up into the cloud by just pushing it right i have some got a docker thing here dot net six just came out maybe i can go and do that so what i can go and end up doing is i can tag i can tag with docker tag that latest podcast build with s hanselman hansel minutes which is the name of the podcast that is then sitting on docker hub well let's go over to docker hub i'm allowed to have one free one free private repository i could also use the azure container registry if i wanted to and then i just have to say docker push s hanselman and then go to this particular registry so i'm going to push a tag up to that registry and then over here last night i went into my container app to learn about how this stuff works and it was pretty cool i can go and make what are called revisions and i can have like different versions different revisions of my stuff and i went and pushed in just one push the the hansel minutes website up to azure container registries they gave me this free kind of wacky url here azure container apps dot io i happen to use one that was in the central part of canada i'll go and maybe put something in front of that like azure front door and then put a ur a url that's friendlier on that and there you go there's an actual running instance of my website running out of containers and it works just great immediately had no trouble at all once i figured out how to do that deployment now i did not do continuous deployment i didn't use the azure container registry i just pushed that directly with the the docker hubs but you can go and do this any way that you want so here i did manually i said create new revision and then i have a container image here i could choose from the azure container registry here or i pick the docker hub i have a private one i logged into docker and then i was able to push my website running up there and in fact glenn condren who we uh talked to a little bit earlier today has the username glenn c over on docker hub and he and i did a demo i want to say it was probably five or six years ago when we were first thinking about doing this stuff cross platform and it was called fancy pants it was the fancy pants demo and he said to me earlier today that people are still pulling that docker demo down and it still runs it still runs that version of net just exactly as it was because that's how containers work so containers are a great place to find uh net and net six you can go and take a look at how we did that and if i pop back to ubuntu check this out let's drop into ubuntu and we will hop over into that folder or one of these folders actually i'll go back into the podcast folder here pause for effect i'm going to say code dot visual studio code is going to split in half it's going to install the visual studio code server and then it's going to have the visual studio code front end and inside that i'm going to open up my docker file and i've actually got a multi-stage docker file this one here is using.net 5 and i'll upgrade that soon to dot net 6. you can see that i'm building a layer i'm copying the sdk in and making sure that all remember i'm copying all the code in the sdk rather here is tagged right there and then later i can go and actually run the tests exactly in the container the same container i'm going to be running in i can go and run those tests then i can publish and make another layer and here i can pull in the asp.net 5 runtime and it's going to be really easy for me to update that to 6 because those containers are already out in public i'll just change that number from 5 to 6 on both the sdk and the runtime and that container will run anywhere any cloud anytime whether it be locally on my windows machine using wsl or whether that ends up being in the cloud which is pretty fantastic okay so let's drop out of there and i'm going to go ahead and close visual studio code here i'm going to show you something else that's interesting we go up to the.net website oops that's my email go back up to the dotnet website i'm going to say dot.net slash learn to code learn to code and we're going to end up right here and we've got a really cool pan thing going on where the paparazzi they're following us around they love the.net developers so you've got my my friend here with the the mobile camera going if you go up here to dotnet learn to code this is really cool this is actually a education pack this education pack works on both windows and mac and it includes the.net interactive notebooks this is a really interesting place you might not have expected to see net now i already have net and vs code so instead of downloading the pack right here which i would encourage you to try try it at home works on any machine i'm just going to click here where it says get started with the c-sharp 101 notebook i'm going to click on that i'm going to go ahead and click on that and we're going to bring up visual studio code which apparently has decided to update itself because that's the time really updating yourself when i'm doing it next step will be for my system to decide that it's the time to defrag because when you do live television that's the time to do your defrags right so what we've got we've done here is we've opened up this file here this file is called a dib file.net interactive book you can also use an ipymb which is the python notebook extension and what's neat about this is we've got some pros right we've got some pros here we're reading a book inside of visual studio code that is written in markdown and then if i hover if i hover over one of these look at this i've got that console.writeline here and i can run that and it's actually going to run that cell that piece of code right there is actually running right there so i can go down and say oh how does that work huh jamie's my friend cool change that we'll say scott i've got intellisense i've got a nice syntax highlighting i'll click on that i can come down and learn about string interpolation that we saw that mads torguson talked about you can learn all the new features about c-sharp here it's actually a playground and then what we've done is we've linked them so you can go not only watch the videos at the.net website not only look at the documentation but then click and go to the next module go from strings to numbers and on and on and on what we're hoping folks are going to do because making these is really easy i'd love to see you do some courseware if you maybe have a a a code camp or you're having a net organization or a.net user group of your own you're going to be put on a.net conf at your local your local community center you just go and make these dibs with the interactive notebooks i can add new chunks of code add new markdown the markdown is really really easy and then when we just go in like that i forgot the thing for the markdown what the title is i always forget about there you go there's a title see this is some text and then i can go and add the code down here and do whatever really really cool stuff they've got some good youtubes and you can see some talks from maria who we saw earlier today showing you the power of this this is just the beginning and this has got dot net interactive which is hosting the dot net runtime that we all know and love at its heart dot net interactive is super powerful and you can see here that it even supports c sharp and f sharp and then you can have multi-language notebooks where you've got html javascript and other things and powershell all inside of one notebook imagine delivering your courseware in this way and teaching folks how to code c sharp and then they graduate to visual studio code or visual studio itself i think that's pretty cool a lot of people don't realize that that exists i would encourage you to check it out again that's it dotnet.microsoft.com nerdcode or dot.net learn to code and those notebooks are all again open source and you can check them out and when you go and create those urls you can actually launch visual studio code directly so i'm in a browser right here and i'm going to click that and that's going to launch directly into visual studio code so if you're a teacher isn't that nice that you can go and say look at the syllabus they click and it hops from browser into vs code and then they have this great experience inside of notebooks and then we're also looking at notebooks in visual studio for windows as well we've got plugins for that so be looking for an improved experience there in the future as well now a couple of days ago david fowler went and tweeted what would you ex where would you not expect to see um mention in a dot-net talk like what what technologies would you maybe not expect to be uh to be seen so i put together a list of some cool stuff that's happening in the dot net community that i want to show kind of at the end of here of the first day i've done at conference we get ready to go into the party before i do that i want to just remind you that you just go to net you click download you see that the net 6 release is the lts or the long term support release if you click down here click down here where it says all.net 6 downloads that might give you some interesting places that you wouldn't expect to see net look at this we got mac we got linux we got windows we got arm 64 we got windows arm64 we got arm 32 we got alpine this is a great small distribution used in containers i've got here a a surface pro x so i've got arm 64 running on this tiny device here i can write my.net code and i can be assured that it's going to run great on any device including my surface pro x like this fantastic little device but when we think about arm right we think about low power we think about small think about power sipping i've got a couple other ones here as well i've got a raspberry pi so i've got a raspberry pi 4 right here runs a full version of raspbian i can run different alternative distros here also runs dot net works great in fact we've got some friends like pi top that have a raspberry pi that actually ships with dot net and with the dot net interactive notebook so that's cool that's small that small well look at this just got this today this is a raspberry pi raspberry pi zero two the zero two little tiny fifteen dollar processor this happens to be an arm eight processor net supported on arm 7 and up so this little 15 guy right here he's got hdmi he's got a little disc there he's got two usbs one for power and one for a hub that runs dot net as well this is great for iot projects which is super cool but it's worth pointing out that something like this is a micro processor this runs a full operating system that might be overkill for what you're doing you know if i'm just turning lights on and off a raspberry pi is too much if i'm just doing something small in my garage and i want to make something happen with my my raspberry pi maybe turn on my watering outside this might to be too much this is a microprocessor wouldn't it be cool to do something with a microcontroller take a look at this our friends at nanoframework.net have got easy c-sharp code and embedded systems again this is great work that's happening in the community whether it be open source or small businesses making easy write code for embedded systems these embedded systems will actually integrate directly with visual studio so you can press f5 and drop into the code on one of these tiny devices a microcontroller being much smaller and much more single tasked and much more power efficient than a microprocessor that runs an entire operating system so kudos to our friends at nano framework another cool one is wilderness labs wilderness labs has this thing here wilderness labs has the meadow process the meadow processor and the meadow processor after a successful kickstarter is now a business and look at this wilderness labs that is a net application i happen to flash this device this tiny micro controller from wsl i'm gonna have a blog post about this soon and you can take a look at the wsl blog wsl now has support for usb over ip so that you can plug a device into windows even if windows doesn't have drivers for it we'll be able to talk to it directly from linux but of course our friends at meadow have great integration with visual studio so i was able to write c sharp hit f5 and show this picture of tux and wsl directly on this device and the screen is from our friends at adafruit and this has all been put together with their their system so kudos to them both nano framework and our friends at wilderness labs that's somewhere you wouldn't expect to see net that raspberry pi zero pretty cool you can do cameras you can do on chip machine learning again just fifteen dollars great little project we've got system.devices.io which is really really cool we talked about how powershell 7.2 is built on.net six and they ship the same day which is cool i want to showcase some companies and some other folks that are doing great stuff in the dot net space uno platform at platform.uno is really cool this is a ui platform again not associated with microsoft just doing great work with the great software stack the great open source software stack that they were given they've got a conference coming up soon uno conf these folks have the ability to go and run c-sharp and xaml with webassembly desktop and mobile and here's a cool example where we've got a calculator like a windows calculator running in the browser isn't that great very very cool built with the uno platform so you know you might see stuff like this you think about blazer there's a lot of cool community folks doing great works with blazer here's a one man shop one person shop blazer dash university.com person put together a whole website with an invaluable resource on how to learn blazer i love it when i see community folks building software and teaching us how to use our own products makes me happy you can also do a lot of this work in the browser blazer not only runs everything in the browser but when you put the power of the cloud on the back end you've got folks like our friends at gitpod.io where i've taken my hanselman website and i can go and click on that website open that up look at that workspace and then load it up into an instance of a vs code like environment it pulls that container image down and i've got the power to develop software in the cloud those are that's a company called git pod you might think that that's quite similar to things like code spaces very similar concept this idea of what's the responsibility of the cloud what is the responsibility of my browser if you're on a a chromebook or a low power device you've got just a browser available to you take a look at solutions like this when i go and start up my code space you can see here that i've got visual studio code i'm actually right back where i was editing my website i can open up that stuff see it directly here and even set breakpoints which is fantastic and i've got a terminal you can tell that it's a real terminal because i can run h-top and you see i haven't left my browser which is really really cool we've also got our friends at progress telerik that are making some really really cool stuff something that they just came out with a couple weeks ago the reple reevaluate print loop rebels are real popular for learning things they have a repel for blazer that you can check out actually write the code for blazer in the browser hit run they'll compile the assembly and they'll ship the assembly down in real time and they've got all kinds of samples asset managers and you can build your website inside of here and play with those great controls that our friends at progress telerik have and then a shout out to some smaller folks because not everyone's got a big million dollar company we just put out a tweet saying hey who who would you not expect to see in a.net comp keynote or lock note one person shop friends at turner software problem solvers doing cool stuff with dot net here's a company iron man software they do some power shell stuff website their flagship product built on.net positivity-wise they tweeted me and said that they're doing their work in.net front-end and back-end work qui-boo they're doing working.net alkamy doing digital banking in.net we've got a silver key tech their technology stack asp.net core they're using vue.js they're using blazer very very cool stuff madcap software these are all folks that are having fun and doing cool productive work in.net and that just makes me smile uh here's another great one another small business sixlabers.com sixlabers.com you've probably heard of them because you've heard of image sharp one of the great 2d graphics libraries open source with a great license and you've got you know manipulation of graphics and drawing as well as asp.net core manipulation middleware good good product that's used by a lot of folks very very cool stuff and then also as i get to the end here we turn back to jamie and get ready for our party i want to just remind you that if you go to the.net website you click on learn we've got books we've got architectural guides we've got pdfs we've got videos galore we want to make sure that you can find a happy face of somebody who seems friendly to you who's going to teach you how to use dot net in cool places like unity like on a mac in machine learning in places that you wouldn't necessarily expect like apache spark we've got f sharp we've got c sharp we're having all kinds of fun and um i even i've been using this remarkable device here it's called remarkable two it's an e-ink device turns out runs linux runs arm i went and installed.net core and net on this remarkable i actually ran down at five on this device so net in so many amazing places that you would not expect and now i will exhale because that is dot net everywhere i hope that didn't suck no that was amazing wow scott there are some uh these companies i didn't even know were using.net so this was an experience for me too yeah i got i got my surface duo so i got android devices you've got an iphone so like.net runs everywhere you know anywhere at all uh samsung tvs right it's there is there anywhere you didn't show it running i don't have a tv that would have been cool that would have been that way yeah i would have brought a tizen tv icing on the cake yeah that would have been the icing on the cake yeah so it runs on tvs too yeah yeah a lot of great work on that there's a lot of processors that people don't realize it runs on um it's just a great flexible run time and we want people to know that we want people to tell us when they do something cool and they use it in a way that maybe we hadn't thought about before yeah absolutely so i just want to kind of get people thinking about like oh wow i could use it here i could use it there and what else could we do with it yeah yeah i could embed like you know a lot of the ways that.net is being used in games with things like unity as an embedded engine through things like mono right so it can be uh the engine for your game it could draw the graphics for your game it's really up to you well that was absolutely amazing as you could see scott showed us uh net really does run everywhere we don't really have time for questions but folks seem to really like your shirt um they're very excited about your uh funny you work so hard for hours and hours and hours you put together a whole talk and it's like but the shirt where can i buy that wait i think you actually did tweet about where you could find the show yeah i think people can probably find that stuff out there and of course the t-shirt bots will find it if if you don't want to good i'm glad uh they're telling us that we actually got a couple of seconds for questions here is that okay with you yeah sure yeah people are really liking the embedded system that makes me happy we see people mentioning nano framework and our friends at wilderness labs they didn't expect to see that right you don't realize how is that device on you know it's underpowered how can you do net on that you're doing aot or ahead of time compilation doing some really creative things to get that language that you love and that um that environment that you love down onto a device that's so tiny tiny tiny devices yeah they're so miniature yeah there are systems on a chip you know you might have four megs of ram you might have eight megs of ram and to be able to go and do those things and then put it on a battery and it could run for days and days or even for months wow yeah there's a lot of use cases here there is let's see do we have any more questions just everyone's so excited about your shirt well i think the other thing to point out is the interactive notebooks if i don't if you don't mind yeah remarkable you can use the remarkable as well and then of course interactive notebooks which is really a great point right um i feel like that's a thing that we we can't tell people about enough because if you drop someone into file new project you know you and i have taught classes on this before and it's like ignore the using there and use ignore the name space and ignore the class and ignore the public static void main right i think implicit usings make that easier implicit globals makes that nice minimal apis you can get a lot of that ceremony out of the way then you teach them the stuff and then you bring the ceremony back in slowly slowly but the idea of an interactive book is such a great innovation and the work that that team has done to actually make that code have html javascript powershell c sharp f sharp all in the same notebook and all work together i didn't show it but you can do really cool visualizations like you and i talked about the new york times like graphs that move in d3js running dot net code that's doing the data access for you so really all in interactive notebooks all in interactive notebooks running inside of visual studio code wow yeah we actually have a c-sharp interactive notebook we do so if you go to dot net slash learn to code we had an intern this summer and she went and took all of our videos that we did together right and then she wrote notebooks for all of them so you can actually watch our videos at dot dot net slash videos and then follow along in the notebooks which is really really cool yeah yeah and for those watching who don't maybe know as much about iot and all the fabulous devices that you were showing we also have a let'slearn.net and you can learn about iot machine learning we walk through microsoft learn modules and you can get credit for those and just more ways to learn and i think iot was one of my favorites personally all right fantastic so we're having all kinds of fun uh here at dot net conf i guess it's virtual party time right is that great yeah don't go anywhere it's time for the the party the code party we have jeff fritz richard campbell over in our channel nine studios they're getting prepped and ready to go because we're about to have the code party thank you oh there's going to be prizes uh they're doing quizzes trivia it's it's going to be a blast um so thank you all so much for joining us here today it has been a wild adventure learning all about.net 6 and bs 2022. scott thank you so much for hosting me with me it's been a blast and more importantly thank you to everyone in the studio we've got a whole host of people working very hard both here both scene and unseen we appreciate you and all of your very hard efforts thank you very much this has been day one [Music] so [Music] you
Info
Channel: dotNET
Views: 20,315
Rating: undefined out of 5
Keywords: .NET
Id: ZM6OO2lkxA4
Channel Id: undefined
Length: 31min 55sec (1915 seconds)
Published: Wed Nov 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.