Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Justin Moser 20 posts 92 karma points
    Aug 17, 2013 @ 13:09
    Justin Moser
    0

    No razor intellisense, syntax highlighting or debugging in Visual Studio 2013 Preview/Umbraco 6.1

    I'm desperately hoping someone here can help me with this as I can't seem to find ANYTHING to help.

    I created a Umbraco 6.1 project in Visual Studio 2012, and everything was working fine. I had intellisense, debugging and syntax highlighting. 

    I installed Visual Studio 2013 Preview and opened the previously created project, and I now have no syntax highlighting or debugging in razor.

     I initially thought it was ReSharper's fault (version 8.0), so I uninstalled it and reset VS back to factory settings. Nothing. I also noticed when I uninstalled that, that the intellisense (the only thing I still had for razor) had disappeared too. So I can only assume, that without ReSharper, I have no intellisense, syntax highlighting or debugging for razor.

    I also installed the ASP.NET and Web Tools for Visual Studio 2013 Preview Refresh Update incase that helped. Nothing. I have tested whether it all works for razor in standard web application, and it does, so it's something to do with this specific Umbraco project.

    Can anyone help with this?

    Thanks.

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Aug 17, 2013 @ 17:32
    Jeavon Leopold
    1

    Hi Justin,

    The only suggestions I have are, check your cshtml files are included in your solution (has caught be out before) and close down vs.net and delete your suo file, then reopen.

    Jeavon

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Aug 17, 2013 @ 17:58
    Jeavon Leopold
    0

    Also, make sure both the web.config at the root and the one inside the views folder are included in your solution

  • Keith R Hubbard 175 posts 403 karma points
    Aug 17, 2013 @ 20:53
    Keith R Hubbard
    1

    I had this problem and had to go to Tools\options then select Text Editor\All Languages.  on there make sure Auto List Members is checked and not boxed.  do the same for hide advanced members and Parameter information.  Then check the same under C#.  they have to have check marks.  one this is done.  close and restart VS.

    it should work.  Resharper does this when a trial ends or is uninstalled.  

     

    Keith  

  • Justin Moser 20 posts 92 karma points
    Aug 17, 2013 @ 21:42
    Justin Moser
    0

    Hi Guys,

    thanks for your suggestions, unfortunately I've not had luck with either! It's odd because it only happens with this project, and not other projects in VS 2013 (some core C#/MVC projects, the highlighting/intellisense/debugging works fine for razor, it just seems to be this project!) and doubly odd because this project works fine in VS 2012!

  • Kevin 1 post 22 karma points
    Aug 01, 2014 @ 22:23
    Kevin
    1

    I also ran into this problem- looks like you never received a satisfactory answer, so I'll tell you what worked for me.  This will probably benefit others who stumble on this (because I'm sure you've moved on from this one a long time ago!)...

    Simply delete the solution's .suo file.  This is the local settings file and it impacts a whole bunch of Visual Studio behavior.  So, when you see something quirky deleting this file can often help.  It solved the razor view syntax highlighting issue that I was seeing on my system.  I even tried resetting the settings to VC# settings and that didn't work, so this was the ultimate "reset" that worked.

  • Jason 92 posts 175 karma points
    Nov 05, 2014 @ 16:57
    Jason
    0

    Keith said:

    I had this problem and had to go to Tools\options then select Text Editor\All Languages. on there make sure Auto List Members is checked and not boxed. do the same for hide advanced members and Parameter information. Then check the same under C#. they have to have check marks. one this is done. close and restart VS.

    it should work. Resharper does this when a trial ends or is uninstalled.

    Keith

    Worked for me, cheers Keith
    Jason

  • Alex 29 posts 58 karma points
    Jul 10, 2015 @ 15:11
    Alex
    0

    Well, it didn't work for me any of the above suggestions. I have changed in Tools-Options, deleted .suo file, restarted the VS2013 and still doesn't work.

    My VS2013 razor views work fine for any native MVC projects, but not for Umbraco.

    One thing I've noticed that the views I create in the back-end umbraco on a browser don't show on a solution explorer unless I click on show all files. Not sure if this has to anything with it.

    Thanks

  • Nik 1591 posts 7148 karma points MVP 6x c-trib
    Jul 10, 2015 @ 15:41
    Nik
    1

    Hi Alex,

    When creating the files in the backoffice they will never be included into the Visual Studio solution automatically. You will always need to right click on them (after you've done show all and refreshed) and click "Include in project".

    I've sometimes found that after doing this I need to open the file and then close it, then re-open the file before intellisense kicks in.

    Nik

  • Alex 29 posts 58 karma points
    Jul 10, 2015 @ 15:56
    Alex
    0

    Bingo - that worked. Thank you Nik. Only closed/opened once.

  • John Alphonso Yarlott 10 posts 101 karma points
    Aug 04, 2015 @ 20:35
    John Alphonso Yarlott
    0

    Worked for me too... thanks Nik (and Alex for asking). Previously I tried deleting my suo file, updating options, I even completely re-installed a fresh code base and database, nothing was working. My "gotcha" was that I checked to see if the /Views folder was included in the project, but not the file itself.

  • Biagio Paruolo 1583 posts 1814 karma points c-trib
    Aug 29, 2016 @ 13:16
    Biagio Paruolo
    0

    FOR Vs2015 Delete the files under %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache

Please Sign in or register to post replies

Write your reply to:

Draft