C
C#4mo ago
Salight

How can i enable intellisense in 'cshtml' files vs'22

There is no color in code how can i activate that in Visual studio 22
No description
71 Replies
Angius
Angius4mo ago
What do you mean? It looks like I'd expect a Razor template to look in VS
Salight
Salight4mo ago
i want it that way
No description
Angius
Angius4mo ago
So it's not about enabling intellisense It's about changing the color scheme
Salight
Salight4mo ago
about intellisense when i type !!! i want it to complete the html also color scheme is working on normal cs files
Angius
Angius4mo ago
If you type, say, <art + Tab does it not complete into <article>?
Salight
Salight4mo ago
no is it because i am not doing in vs code
Angius
Angius4mo ago
Well, Visual Studio and Visual Studio Code are two separate products So, yes, one will behave differently from the other All I can say, is see if maybe you can update your VS, maybe there's been some fixes
Salight
Salight4mo ago
i did it but it didn't change anything
Angius
Angius4mo ago
But in my experience, VS is absolute garbage when it comes to handling cshtml files, HTML as a whole, and any other web-related language
Salight
Salight4mo ago
what do you recommend ? vs code maybe
Angius
Angius4mo ago
Personally, I use Rider VS Code comparatively sucks at C#, VS comparatively sucks at web languages Rider does both well I'd maybe try asking in #devops-and-tools as well, maybe there are people more versed in VS that would know of some particular settings, plugins, something to make life easier
Salight
Salight4mo ago
does every web dev is using rider
Angius
Angius4mo ago
I don't know every web developer I do Plenty people do Does everybody? No, probably not
Salight
Salight4mo ago
i mean plenty people also uses these tools right for web dev
Angius
Angius4mo ago
Yeah
Salight
Salight4mo ago
it would be really great also last question if i delete vs does my files comeback when i downloaded again or do i have to pull from git
Angius
Angius4mo ago
You mean your project?
Salight
Salight4mo ago
yes all the projects
Angius
Angius4mo ago
Why would it be deleted when you uninstall VS?
Salight
Salight4mo ago
i mean why not i am deleting the vs files
Angius
Angius4mo ago
If you uninstall Photoshop does it delete all images from your disk?
Salight
Salight4mo ago
what i meant to say is i have to change the directory's so i am going to delete every possible file about vs in c disk
Angius
Angius4mo ago
Your projects are completely and entirely separate from your VS installation They can be on separate drives, the project can be on a network drive, you can move them at will, it does not matter
Salight
Salight4mo ago
so if i connect with diffrent computer i can see all my projects right ?
Angius
Angius4mo ago
What do you mean "connect with different computer"? Connect how?
Salight
Salight4mo ago
lets say i got a laptop i downloaded vs
Jethrootje
Jethrootje4mo ago
Make cs files for your razor pages, don't use the @code { } if you want Syntax Also for HTML Shortcuts you'll probably need a plugin if you don't have it built-in
Salight
Salight4mo ago
and i login with my account does my projects come along with it or it just belongs to this computer that is the real deal
Angius
Angius4mo ago
No, it does not "come along" You have Paint installed on the laptop, and Paint installed on the PC Doesn't mean you have the same images on both
Jethrootje
Jethrootje4mo ago
Also you don't have intellisense for (CS)HTML in Visual Studio, only for components but not for normal tags like <div> for example unless you use a plugin
Angius
Angius4mo ago
Your projects aren't special. They're just... files
Anu6is
Anu6is4mo ago
@code does syntax highlighting just fine in vs
Angius
Angius4mo ago
They don't magically move, they don't magically get deleted
Jethrootje
Jethrootje4mo ago
Oh, for me it doesn't sometimes That's why I always use cs files for the razor pages It's also more structured imo
Salight
Salight4mo ago
okay thank you a lot
Anu6is
Anu6is4mo ago
i'd just agree with ZZZZZ... there, VS just sucks sometimes sometimes I have to restart for highlights to show (usually the hmtl stuff though, not @code)
Jethrootje
Jethrootje4mo ago
Yeah true
Salight
Salight4mo ago
you all recommend rider for web ?
Jethrootje
Jethrootje4mo ago
Nah I use VS
Anu6is
Anu6is4mo ago
definitely better
Jethrootje
Jethrootje4mo ago
For me everything works fine if you make it in separate files plus it's more structure imo, but yeah Rider definitely isn't bad but for the company I have to use VS
Angius
Angius4mo ago
The reason I switched to Rider was just how much VS sucks ass at anything web
Salight
Salight4mo ago
is your cshtml files looks like this
Angius
Angius4mo ago
Just FYI, Rider isn't normally free. It's free for students and OSS maintainers, has a 30-day free trial, and the beta versions are free But aside from that, it's a paid product
Salight
Salight4mo ago
oh
Jethrootje
Jethrootje4mo ago
All good for me
No description
Salight
Salight4mo ago
i am a student but
Angius
Angius4mo ago
$freerider
MODiX
MODiX4mo ago
There are two ways to get Rider for free: Being a student: https://www.jetbrains.com/community/education/#students Using it for an OSS project: https://www.jetbrains.com/community/opensource/#support
Jethrootje
Jethrootje4mo ago
I wouldn't recommend getting used to 1 IDE Make sure you can always switch to another whenever you want
Salight
Salight4mo ago
there are only two IDE i know vs and vs code
Jethrootje
Jethrootje4mo ago
All the 3 companies I worked at used Visual Studio, at school I used Rider, VS, VSC, Eclipse, etc Well, depending on the language but yes
Salight
Salight4mo ago
you are using vs very actively right
Jethrootje
Jethrootje4mo ago
Yeah, I have a job in programming Also VSC isn't an IDE It's a code editor But you can use it as an IDE I suppose with specific plugins
Salight
Salight4mo ago
No description
No description
Salight
Salight4mo ago
how can i make the color look like this in cshtml
Jethrootje
Jethrootje4mo ago
The style?
Salight
Salight4mo ago
it really bothers me yes
Jethrootje
Jethrootje4mo ago
Is the second one from VSC?
Salight
Salight4mo ago
yes
Jethrootje
Jethrootje4mo ago
Give me a few minutes
Salight
Salight4mo ago
i can wait you all day long bro np
Jethrootje
Jethrootje4mo ago
No description
Jethrootje
Jethrootje4mo ago
You could change it here, but it may change other colors too The value actually*
Jethrootje
Jethrootje4mo ago
So this one
No description
Salight
Salight4mo ago
you are a life changer man thank you very much all of you are
Jethrootje
Jethrootje4mo ago
No worries, glad I could help
Jethrootje
Jethrootje4mo ago
Stack Overflow
Razor Syntax Highlighting
I have a fairly large ASP MVC project which I am running in visual studio 15.4.5. Whenever I view .cshtml files Visual Studio incorrectly highlights the file for example: We are making use of com...
Salight
Salight4mo ago
@Jethrootje , @ZZZZZZZZZZZZZZZZZZZZZZZZZ thanks a lot both of you.you guys are the best
Jethrootje
Jethrootje4mo ago
Also this is the color for it
No description