C
C#10mo 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
Angius10mo ago
What do you mean? It looks like I'd expect a Razor template to look in VS
Salight
SalightOP10mo ago
i want it that way
No description
Angius
Angius10mo ago
So it's not about enabling intellisense It's about changing the color scheme
Salight
SalightOP10mo ago
about intellisense when i type !!! i want it to complete the html also color scheme is working on normal cs files
Angius
Angius10mo ago
If you type, say, <art + Tab does it not complete into <article>?
Salight
SalightOP10mo ago
no is it because i am not doing in vs code
Angius
Angius10mo 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
SalightOP10mo ago
i did it but it didn't change anything
Angius
Angius10mo 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
SalightOP10mo ago
what do you recommend ? vs code maybe
Angius
Angius10mo 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
SalightOP10mo ago
does every web dev is using rider
Angius
Angius10mo ago
I don't know every web developer I do Plenty people do Does everybody? No, probably not
Salight
SalightOP10mo ago
i mean plenty people also uses these tools right for web dev
Angius
Angius10mo ago
Yeah
Salight
SalightOP10mo 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
Angius10mo ago
You mean your project?
Salight
SalightOP10mo ago
yes all the projects
Angius
Angius10mo ago
Why would it be deleted when you uninstall VS?
Salight
SalightOP10mo ago
i mean why not i am deleting the vs files
Angius
Angius10mo ago
If you uninstall Photoshop does it delete all images from your disk?
Salight
SalightOP10mo 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
Angius10mo 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
SalightOP10mo ago
so if i connect with diffrent computer i can see all my projects right ?
Angius
Angius10mo ago
What do you mean "connect with different computer"? Connect how?
Salight
SalightOP10mo ago
lets say i got a laptop i downloaded vs
Jethrootje
Jethrootje10mo 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
SalightOP10mo 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
Angius10mo 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
Jethrootje10mo 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
Angius10mo ago
Your projects aren't special. They're just... files
Anu6is
Anu6is10mo ago
@code does syntax highlighting just fine in vs
Angius
Angius10mo ago
They don't magically move, they don't magically get deleted
Jethrootje
Jethrootje10mo 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
SalightOP10mo ago
okay thank you a lot
Anu6is
Anu6is10mo 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
Jethrootje10mo ago
Yeah true
Salight
SalightOP10mo ago
you all recommend rider for web ?
Jethrootje
Jethrootje10mo ago
Nah I use VS
Anu6is
Anu6is10mo ago
definitely better
Jethrootje
Jethrootje10mo 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
Angius10mo ago
The reason I switched to Rider was just how much VS sucks ass at anything web
Salight
SalightOP10mo ago
is your cshtml files looks like this
Angius
Angius10mo 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
SalightOP10mo ago
oh
Jethrootje
Jethrootje10mo ago
All good for me
No description
Salight
SalightOP10mo ago
i am a student but
Angius
Angius10mo ago
$freerider
MODiX
MODiX10mo 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
Jethrootje10mo ago
I wouldn't recommend getting used to 1 IDE Make sure you can always switch to another whenever you want
Salight
SalightOP10mo ago
there are only two IDE i know vs and vs code
Jethrootje
Jethrootje10mo 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
SalightOP10mo ago
you are using vs very actively right
Jethrootje
Jethrootje10mo 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
SalightOP10mo ago
No description
No description
Salight
SalightOP10mo ago
how can i make the color look like this in cshtml
Jethrootje
Jethrootje10mo ago
The style?
Salight
SalightOP10mo ago
it really bothers me yes
Jethrootje
Jethrootje10mo ago
Is the second one from VSC?
Salight
SalightOP10mo ago
yes
Jethrootje
Jethrootje10mo ago
Give me a few minutes
Salight
SalightOP10mo ago
i can wait you all day long bro np
Jethrootje
Jethrootje10mo ago
No description
Jethrootje
Jethrootje10mo ago
You could change it here, but it may change other colors too The value actually*
Jethrootje
Jethrootje10mo ago
So this one
No description
Salight
SalightOP10mo ago
you are a life changer man thank you very much all of you are
Jethrootje
Jethrootje10mo ago
No worries, glad I could help
Jethrootje
Jethrootje10mo 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
SalightOP10mo ago
@Jethrootje , @ZZZZZZZZZZZZZZZZZZZZZZZZZ thanks a lot both of you.you guys are the best
Jethrootje
Jethrootje10mo ago
Also this is the color for it
No description
Want results from more Discord servers?
Add your server