-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get reload to work outside of Visual Studio? #835
Comments
'dotnet watch' works from the command line but will tear down more than required until it's updated to implement the launch semantics. Same goes for Rider. |
Just an update here: as far as I see, using |
Hitting CTRL+R also has the large downside of restarting everything. Ideally just the affected project would be reloaded. |
Projects are actually reloaded but some visual cue when a project is reloaded/restarted in the AppHost log would be a nice thing to have. |
|
Is reload supposed to work even within VS right now? We're having to explicitly build again (which restarts all services) |
@DamianEdwards Has that effort stalled? |
It depends on what one means by reload. Hot Reload works for supported changes in the app projects but not in the AppHost project. Auto-rebuild and restart of app projects works in VS for app projects when launching without debugging but changes to the AppHost will cause all apps to restart. dotnet watch has been updated to better support Aspire scenarios and will be available in the .NET 9 SDK I believe. This is a complicated problem which we will continue to make progress on release to release. |
Thanks @DamianEdwards, I'll try with the .net 9 SDK to see if there have been improvements. It may be that this has worked how I'd expect, but I haven't been aware due to the lack of logging in the console when launching via the apphost. Hopefully the .NET 9 SDK update brings that kind of improvement. |
Aspire 8.1 added more logging in the AppHost project in that it now forwards logs from the resources being orchestrated. You can of course adjust the logging levels and filters too to see more logs. |
@DamianEdwards I've tried again with Aspire 8.1, albeit on SDK v8.0.7 and I've been unable to get the message I'm interested forwarded. In apphost I do now see forwarded messages, but the specific message that would normally be generated when running individually do not get forwared. For example, running
And the page is updated live while viewing, without refreshing. This message does not appear to be a standard ILogger format message. Launching watch via the appHost however: And changing the same file. Does not result in any log, and the change is not "pushed" to the client. Manually refreshing reveal the change has been hot-reloaded in the background. I'll test again with the .NET 9 SDK to compare. I'll need to wait until I'm on my home account for that. |
Correct. That message is emitted by
I believe this should work in the .NET 9 SDK as it has the |
The work isn't in yet. It's still in a pull request. Track dotnet/sdk#36971 |
I'm trying to get my services reloaded automatically while working with JetBrains Rider.
I've tried the following:
dotnet watch run --project ./src/AppHost/
. Nope.The text was updated successfully, but these errors were encountered: