Skip to content
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

Trouble with hot reload in OC 1.8.3 and net8.0 #16504

Closed
DavidStania opened this issue Jul 29, 2024 · 13 comments
Closed

Trouble with hot reload in OC 1.8.3 and net8.0 #16504

DavidStania opened this issue Jul 29, 2024 · 13 comments
Labels
Milestone

Comments

@DavidStania
Copy link
Contributor

Hello everyone,
I have a problem with HotReload in VS2022 17.10.5 (current).
No changes are applied. The application has to be restarted again and again to apply changes.

I have made several attempts:

  1. Asp Net Core WebApp with .net8.0 without OC
    No problems! All changes are applied immediately.
  2. Asp Net Core WebApp with .net7.0 with OC 1.7.2
    No problems! All changes are applied immediately. Also changes in the modules themselves.
  3. Asp Net Core WebApp with .net8.0 with OC 1.8.3
    No changes are applied. However, HotReload registers changes.

I have recorded a video to demonstrate this. I currently have the problem on 4 independent computers.

I would be grateful for any advice!

Copy link
Contributor

github-actions bot commented Aug 1, 2024

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

@Piedone
Copy link
Member

Piedone commented Aug 2, 2024

Could you please check with the latest main? This is what I see there, it works for me:

2024-08-02_20h15_50.mp4

Note that apart from saving the cshtml file, I didn't do anything, the browser reloaded itself.

@DavidStania
Copy link
Contributor Author

I have tested it with the latest version. Exactly the same result.
I noticed that when I executed the dotnet watch command, the following message appeared: "Skipping configuring browser-refresh middleware since the target framework version is not supported. For more information see 'https://aka.ms/dotnet/watch/unsupported-tfm'."
So I had to specify the command with the framework dotnet watch --framework net8.0. The browser is also reloaded. As can be seen in your video. But without any changes.

@Piedone
Copy link
Member

Piedone commented Aug 4, 2024

Just to confirm, you did the same as I did, with the latest main, with the latest VS, and in contrast to the video, don't seem changes to a cshtml file appear?

@DavidStania
Copy link
Contributor Author

I can confirm. 100% the same like you did.

OC_net7_8_2.mp4

@Piedone
Copy link
Member

Piedone commented Aug 4, 2024

Hmm. This looks like more of an issue with Razor Runtime Compilation rather than Hot Reload.

A couple of things:

  1. Is this line hit for you?
  2. What happens if you turn Hot Reload off under Options -> Debugging -> General?

@DavidStania
Copy link
Contributor Author

DavidStania commented Aug 9, 2024

image

This line is not hit cause 'refs' folder not exists! But I don't know why.
There is only a 'ref' folder here 'G:_Applications\repos\OrchardCore\src\OrchardCore.Cms.Web\obj\Debug\net8.0\ref'

If I create the folder manually, it remains empty during debugging and I only get an error page.
image

@Piedone
Copy link
Member

Piedone commented Aug 9, 2024

Hmm. What happens if you turn Hot Reload off under Options -> Debugging -> General?

@DavidStania
Copy link
Contributor Author

Strange!

Hot reload is disabled in global settings
image
And also in startprofile
image
But if changes exists:
image

@Piedone
Copy link
Member

Piedone commented Aug 12, 2024

I don't know what's happening.

@DavidStania
Copy link
Contributor Author

I told you. Very strange! And this is happens on 4 independent development machines.

@shinexyt
Copy link
Contributor

Same issue: #15946

@Piedone
Copy link
Member

Piedone commented Aug 21, 2024

Indeed, closing as a duplicate.

@Piedone Piedone closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2024
@MikeAlhayek MikeAlhayek modified the milestones: 2.x, 2.0 Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants