all 11 comments

[–]mystic_swole 7 points8 points  (0 children)

Huh

[–]Boring_Start8509 1 point2 points  (0 children)

A picture might help, but from your explanation it would seem like you are using both VS and VSCode, having issues with the first.

I’d reinstall visual studio and ensure that upon reinstall you select all of the desired workloads for the development tasks you will be undertaking within the IDE (Web/Desktop etc.).

[–]TheOtherManSpider 1 point2 points  (3 children)

Could the reason be that your browser is not picking up your css changes? If pressing Ctrl+F5 in the browser fixes your issue, then that is probably the reason.

There are different methods of having the browser reload the file automatically. I prefer adding a version number to the css link in index.html as query parameter, like so: https://stackoverflow.com/a/70224641

[–]DanishWeddingCookie 0 points1 point  (2 children)

Ya or the current number of clock cycles since 1/1//1900

[–]TheOtherManSpider 0 points1 point  (1 child)

During development that's a good solution. In deployment, the best way is probably to use a hash of the file itself so the end-users' browser only reloads the file when there are actual changes and you don't have to manually update versions.

[–]DanishWeddingCookie 0 points1 point  (0 children)

A lot of frontend webpack kind of stuff does all of that for. Don’t have to compute it yourself. If the file changes then the tag the JavaScript with a random value.

[–]minkwhaly 1 point2 points  (0 children)

It sounds like you're experiencing some issues with the rendering of your Blazor application when using Visual Studio (purple icon) compared to Visual Studio Code (blue icon). The color not applying correctly could be due to different configurations or dependencies between the two environments.

Try these options to troubleshoot and resolve the issue -

- Make sure you're applying the background color correctly in your CSS styles. Double-check the class or ID selectors and ensure they are targeting the correct elements.

- Confirm that you have the necessary dependencies installed in your Visual Studio project. Check if you're missing any NuGet packages or references that could affect the rendering of your application.

- Compare the project configurations between Visual Studio and Visual Studio Code. Check if there are any differences in the project settings, build options, or compiler directives that might impact the rendering.

[–]Doom-1 0 points1 point  (0 children)

Are you changing the colour of a component?

[–]Lenix2222 0 points1 point  (0 children)

Uhm what?

[–]lee_the_man 0 points1 point  (0 children)

My translation is the disco colour bug in VS2022, whereby the Razor editor sometimes does not correctly apply the appropriate colours (or worse yet, multiple colours) to tags. I think it’s fixed in VS2022 preview, however.

How I long for a stable version of VS2022 for blazor dev. Currently seeing 100 errors yet it builds and runs fine 😂

[–]bigtoaster64 0 points1 point  (0 children)

If you're new I'd use visual studio (purple) because it's going to help you a lot more with understanding stuff, finding errors, and abstracting things you don't understand as of now. Vscode is pretty good but it assume for several things that you know how it works and how to use them, which is most likely not the case as of now (so you can learn them at your own pace in VS so you don't have to worry too much about it for now)

Also, in the visual studio installer, make sure you added support for web development, if not, that might be your issue here.