question

kevinpetteys avatar image
0 Votes"
kevinpetteys asked RuikaiFeng-MSFT commented

What is aspnetcore-browser-refresh.js and how can I stop VS 2022 from adding its own client side script

What is aspnetcore-browser-refresh.js's purpose? How can I stop it from being deployed to my projects.

VS 2022 keeps adding client side scripts to my projects. I am spending a lot of time trying to debug them and prevent them from being pubished. I great example of this is the amount of effort it takes to disable Browser Link (no it does not disable just by clicking the disable button from VS's toolbar.) I am writing my own HTML JS front end and only using Web API for server calls. I am using Swagger UI but that is not VS either. Aspnetcore-browser-refresh.js is only being deployed with my static html file.

vs-debuggingdotnet-aspnet-core-webapi
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

cooldadtx avatar image
0 Votes"
cooldadtx answered RuikaiFeng-MSFT commented

This is only while you're running in the debugger and should have no impact on your production code. It is for hot reloading. Since it should not be causing any issues with your app nor really be used outside debugging then I would leave it alone. However if you want to disable hot reloading refer to the docs here which discuss how to do it based upon how you're starting your app.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It could also be disabled as below:
241370-qa-915.png


0 Votes 0 ·
qa-915.png (79.1 KiB)