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