First of all I will thank you for your awesome videos. Have teach me a lot when I will easy deep dive in something. This feature have I waiting after for long time. This make it interesting to use when developing webb apps like Anguler, React or other interesting js framework. So you have only one place to develop. I mostly use both VS Code for frontend developing and VS for backend. .NET 6 looks like it gonna be awesome!
XAML had this, I had been using it a lot. Also we were allowed to change code during a debugging session and update values by using interactive window. But this really helps..
thanks tim , A great tool hot reload --> when any changes code level at exceution by adding extra code hot reload on file save or click hot reload , instead of stopping the application and run again.
This is best explanation so far on youtube, thank you, BTW your hot reload works so fast, what is your computer specifications ? you should have very good cpu I guess...
Hot reload seems to work rather fast on all machines I've tried, but my recording machine is a bit of a beast. I built it by hand. It is an AMD Ryzen Threadripper 3970X (32-core) with 256GB of RAM, 2TB NVMe SSD, and GeForce RTX 2070. It is overkill for most things, but I actually put it to good use when processing videos and audio files.
Will Hot Reload work with Azure Functions? I use them a great deal in my day to day work and having Hot Reload when testing would be very helpful, as opposed to restart
First of all, good explanation. Assuming it works as intended, it appears to be a mildly convenient tool. But I have yet to see a use-case where it truly shines, some use-case where something can be done what otherwise could not be. Editing a XAML can be seen well enough in the editor. Reloading a HTML is done manually anyway. I guess we'll have to see, but I think the feature is overhyped. Not that I oppose it, I'm just not sure if I will ever use it - as I currently only work on projects which are more complex and need to be deployed, or are compiled in Unity. And the minor (demo) WPF projects I have are not that big of a deal. I'd like to see people making experience with that and reporting what they think about it after that, and when, how and how often they use it.
OOhhhh... Microsoft you beautiful beast you... this is gonna make layout development sooo freaking much easier, especially when doing CSS, javascript, etc. where you can write your razor code and dummy data directly as you go without needing to restart your whole application. Remember back when we started out with classic ASP, Corey, and coded in Frontpage? ;-)
So you saying Hot reload in .net 6. you mentioned though it will work in all frame works the hot reload? so if i'm using .net 5 right now the hot reload will work. What visual studio are you running here to get that to work.
You mentioned it works with VS code, can you make a video on that? I tried it with using cli dotnet watch but running into problems auto build (cannot access files which are used by another process). May be i am not doing it right or I should use .Net 6 preview?
Devel conveniences aside, so can this be used to bug-fix or upgrade production servers, e.g. based on ASP NET-Core, without having to shut them off for maintenance? So all these usual potential troubles could be avoided, such as interrupting background workers in the middle of their work; or interrupting requests via network to other servers; or re-sending and thus duplicating messages; or message queues filling up while the consuming instance is down; or having to wait for all users to log off or to kick them off forcefully? That would be huge! (And it would then be understandable why Microsoft may have wanted to keep hot-reload as an exclusive for-pay feature)!
@@IAmTimCorey Why don't we have any visual designers or some way to lay out the components in a a drag and drop way anymore? Remember WebForms? Yeah, real time saver. Even Mobile Apps and Desktop Apps have their development IDEs with visual designers, why we don't have anything for the web anymore? Remember FrontPage?
Because those designers never really created good, semantic pages. They got the job done but the back-end of the page was MESSY. I do remember FrontPage. I loved it, but it created ugly, hard to maintain pages behind the scenes. Getting a good drag and drop editor to work on the web using web standards is very difficult and often not worth the effort. For instance, if you drag a paragraph onto the page, what is the surrounding tag? Is it is a div (it probably shouldn't be semantically)? An article? The list goes on. When you change the font size of a heading, are you changing the heading level (the level of indent in the site outline) or just tweaking the sizing? When you drag an image onto the page, are you intending to float it? Put it in a grid? Use flex? With just a heading, a paragraph, and an image, you already have multiple choices that a machine cannot answer for you that you have to face. Each will be context- and content-specific. The web really isn't designed to be created by WYSIWYG editors. It is too complex. Editors that do it usually do so poorly or with very limited scope.
I found a bug with Hot Reload in a .NET Core web application. If one creates a ViewBag item in the controller and references it on the View, it works as expected, but if the value in the viewbag is then changed and saved, the application crashes when Hot Reload tries to work it out!
Yep. It works with all ASP.NET Core web project types, as well as WinForms and WPF. Basically, it works everywhere in Visual Studio 2022 (and from the command line).
@@codefoxtrot Yeh thats the same with me. I found that trying to do it whilst debugging and making any html/razor changes the wee Edit and Continue warning pops up
You can't use Visual Studio on a Mac. You can use VS Code, and that has hot reload capabilities. Just know that it will look different than this video.
It should work, so if it doesn't then it is a bug. Might be just on your PC or it might be something larger. Submit an issue through Visual Studio please.
I'm not sure why. You are just editing your application while it is running. That's the big deal. If you don't have that, you edit your application and then run it.
Because it isn’t that simple. It takes time and resources and takes away from other things I could be doing. I have a forum for people who buy courses. That provides better long-term value than Discord and is easier to moderate.
First of all I will thank you for your awesome videos. Have teach me a lot when I will easy deep dive in something.
This feature have I waiting after for long time. This make it interesting to use when developing webb apps like Anguler, React or other interesting js framework. So you have only one place to develop. I mostly use both VS Code for frontend developing and VS for backend. .NET 6 looks like it gonna be awesome!
Thanks for this short and to the point video. Really helpful. Will use this in Blazor I think.
Fast dev-cycle is very important.
You are welcome.
I love this series for quick learning
Great!
Such a cool feature, thanks for showing it off!
You are welcome.
Makes the dev/test cycle so much faster. Was very slow when you needed to stop and restart just to see how a small change affected how things look.
Yep.
XAML had this, I had been using it a lot. Also we were allowed to change code during a debugging session and update values by using interactive window. But this really helps..
Yep, they started in XAML and moved it out to everywhere.
XAML hot reload was a thing even in VS2019 afaik though.
Can you now also change the C# code? For instance fix a method in the ViewModel on the fly
It was previewed in 2019 but wasn’t released for production in it. And yes, you can change C# code on the fly.
Thanks for the video, Mothy.
lol you are welcome.
Amazing feature. Looking forward to using it in WPF apps.
Great!
Would like to see more about dynamic components please, thanks!
This^
Thanks for the suggestion.
thanks tim , A great tool hot reload --> when any changes code level at exceution by adding extra code hot reload on file save or click hot reload , instead of stopping the application and run again.
You are welcome.
This is best explanation so far on youtube, thank you, BTW your hot reload works so fast, what is your computer specifications ? you should have very good cpu I guess...
Hot reload seems to work rather fast on all machines I've tried, but my recording machine is a bit of a beast. I built it by hand. It is an AMD Ryzen Threadripper 3970X (32-core) with 256GB of RAM, 2TB NVMe SSD, and GeForce RTX 2070. It is overkill for most things, but I actually put it to good use when processing videos and audio files.
Will Hot Reload work with Azure Functions? I use them a great deal in my day to day work and having Hot Reload when testing would be very helpful, as opposed to restart
During development yes. After they are deployed to Azure no.
What about docker? Will it ever work if i am developing container?
that was awesome
Great!
It's very useful!
Thanks!
Thank's your information very usefull.
You are welcome.
excellent
Thanks!
Reminds me of the Browser Link extension for Visual Studio. How this is different for web projects?
This one works. :-)
But the concept is the same.
It works only in debug mode (f5). Not when u start the application with Ctrl+f5.
It will work without debugging as well so if it is not for you, that’s a bug.
First of all, good explanation. Assuming it works as intended, it appears to be a mildly convenient tool. But I have yet to see a use-case where it truly shines, some use-case where something can be done what otherwise could not be. Editing a XAML can be seen well enough in the editor. Reloading a HTML is done manually anyway. I guess we'll have to see, but I think the feature is overhyped. Not that I oppose it, I'm just not sure if I will ever use it - as I currently only work on projects which are more complex and need to be deployed, or are compiled in Unity. And the minor (demo) WPF projects I have are not that big of a deal. I'd like to see people making experience with that and reporting what they think about it after that, and when, how and how often they use it.
For WPF application, hot reload sometimes doesn't work when changing styles resources and resource dictionary.
Yep.
Is it possible only in the development stage?
We can have it in product without new version in minor changes???
This is for development, not production, yes.
@Tim, can you please create a video on AOP? I use spring AOP and want to use similar one in .NET. Seems postsharp is the only option..
I will add it to the list. Thanks for the suggestion.
OOhhhh... Microsoft you beautiful beast you... this is gonna make layout development sooo freaking much easier, especially when doing CSS, javascript, etc. where you can write your razor code and dummy data directly as you go without needing to restart your whole application.
Remember back when we started out with classic ASP, Corey, and coded in Frontpage? ;-)
Yep, this is pretty great and it doesn’t cause the code behind mess that FrontPage did.
Dumb question perhaps, but wasn’t hot reload for web initially utilized with the “browser link” feature, before using their current methodology?
Kind of, yeah, but it never worked right.
So you saying Hot reload in .net 6. you mentioned though it will work in all frame
works the hot reload? so if i'm using .net 5 right now the hot reload will work. What visual studio are you running here to get that to work.
Visual Studio 2022, which comes out in early November.
Will hot reload supports for .net framework 4.6 ???
I believe so, yes.
What's the plan for WinForms? Please guide me. Still, I'm working desktop solution with this framework.
Not sure what you mean. It is still a project type and it is still being brought to new versions of .NET. The improvements just aren’t that plentiful.
You mentioned it works with VS code, can you make a video on that? I tried it with using cli dotnet watch but running into problems auto build (cannot access files which are used by another process). May be i am not doing it right or I should use .Net 6 preview?
I'll add that to the suggestion list.
Devel conveniences aside, so can this be used to bug-fix or upgrade production servers, e.g. based on ASP NET-Core, without having to shut them off for maintenance? So all these usual potential troubles could be avoided, such as interrupting background workers in the middle of their work; or interrupting requests via network to other servers; or re-sending and thus duplicating messages; or message queues filling up while the consuming instance is down; or having to wait for all users to log off or to kick them off forcefully? That would be huge! (And it would then be understandable why Microsoft may have wanted to keep hot-reload as an exclusive for-pay feature)!
No, this is for debugging. It can’t change a compiled application that has been deployed.
@@IAmTimCorey Why don't we have any visual designers or some way to lay out the components in a a drag and drop way anymore? Remember WebForms? Yeah, real time saver. Even Mobile Apps and Desktop Apps have their development IDEs with visual designers, why we don't have anything for the web anymore?
Remember FrontPage?
Because those designers never really created good, semantic pages. They got the job done but the back-end of the page was MESSY. I do remember FrontPage. I loved it, but it created ugly, hard to maintain pages behind the scenes. Getting a good drag and drop editor to work on the web using web standards is very difficult and often not worth the effort. For instance, if you drag a paragraph onto the page, what is the surrounding tag? Is it is a div (it probably shouldn't be semantically)? An article? The list goes on. When you change the font size of a heading, are you changing the heading level (the level of indent in the site outline) or just tweaking the sizing? When you drag an image onto the page, are you intending to float it? Put it in a grid? Use flex? With just a heading, a paragraph, and an image, you already have multiple choices that a machine cannot answer for you that you have to face. Each will be context- and content-specific. The web really isn't designed to be created by WYSIWYG editors. It is too complex. Editors that do it usually do so poorly or with very limited scope.
@@IAmTimCorey But still Tim, my point is, it's not impossible to build at least some basic designer to kick start our web page layouts.
But my example was as basic as it gets and it still wouldn’t work.
I found a bug with Hot Reload in a .NET Core web application. If one creates a ViewBag item in the controller and references it on the View, it works as expected, but if the value in the viewbag is then changed and saved, the application crashes when Hot Reload tries to work it out!
Interesting. Have you submitted it?
Will it work with Web project (.Net core web application ?) I tied but no luck
Yep. It works with all ASP.NET Core web project types, as well as WinForms and WPF. Basically, it works everywhere in Visual Studio 2022 (and from the command line).
does this work in VS 2022 for Mac?
Yes, I’m pretty sure it does.
@@IAmTimCorey ok I will keep looking I dont have the little fire icon :)
Try it from the command line by running dotnet watch in your project directory.
@@IAmTimCorey YES , that works thank you
Can you use this with a Blazor wasm app?
Yes.
@@IAmTimCorey I find it only works for Blazor Wasm when using "Start Without Debugging" mode.
@@codefoxtrot Yeh thats the same with me. I found that trying to do it whilst debugging and making any html/razor changes the wee Edit and Continue warning pops up
@@neilcarberry10 For me there's no popup. Just doesn't do anything. Unless I "Start without debugging" as mentioned above.
Fix is pending release -- VS2022 Blazor WASM Hot Reload under the debugger. Should be contained in next VS2022 update from Microsoft.
It's gonna be like A1 Steak Sauce. I'm gonna use that shit on everything.
Great!
how to do it on Mac FGS
You can't use Visual Studio on a Mac. You can use VS Code, and that has hot reload capabilities. Just know that it will look different than this video.
absolutely terrific video format 🥂
Thanks!
Tried this on an ASP .NET Core .NET 6 MVC project and it doesn't work :(
It should work, so if it doesn't then it is a bug. Might be just on your PC or it might be something larger. Submit an issue through Visual Studio please.
Note : It does not work in winform applications.
It has been supported on Windows Forms since .NET 6: learn.microsoft.com/en-us/visualstudio/debugger/hot-reload?view=vs-2022
Hot Reload is Hot.. 💥
Yep.
...Reload?
ooh boi, this is going to introduce so many "wtf why isnt this working correctly"
It’ll probably be unbreakable by .NET 7 or 8
@@willinton06 i was thinking more about forgetting that the state is saved during debugging, can easily lead to problems
I'm not sure why. You are just editing your application while it is running. That's the big deal. If you don't have that, you edit your application and then run it.
Linux ?
It works on Linux too since it works on the command line.
@@IAmTimCorey thanks mr Tim for your great work 😊
Dude why don't u make a discord server
Because it isn’t that simple. It takes time and resources and takes away from other things I could be doing. I have a forum for people who buy courses. That provides better long-term value than Discord and is easier to moderate.
Poor XAML live preview... there's a new cool kid in town... u.u
The same developers who did XAML live preview brought hot reload to all of .NET.
@@IAmTimCorey Yeah I imagined that, they same to be very similar technologies underneath
Thanks , no need to restart vs2019 again to see changes ...