Visual Studio 2008 formats asp tags to lowercase

后端 未结 4 531
一整个雨季
一整个雨季 2020-12-21 10:35

Recently, my Visual Studio 2008(with Resharper 4.5) has started to reformat asp tags into lowercase.

Example:



        
相关标签:
4条回答
  • 2020-12-21 10:57

    I'm not sure about a permanent fix, but what you can do is select the troublesome coding then hit CTRL+K followed by CTRL+F, so in order..

    CTRL + K, F
    

    This will auto format the coding (and make it the proper case). If this doesn't work then it might be an auto-format issue/setting

    0 讨论(0)
  • 2020-12-21 11:00

    I had the same (or very similar) issue.

    I also deleted some (but not all) files in the folder

    C:\Documents and Settings[username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas
    

    The reason I did this is because I'm subject to a frankly daft limit on the size of my (Windows XP) roaming profile :-(

    After I did this VS intellisense and document auto-formatting started behaving as if it didn't know what the <asp: tags were and treated all the html as plain html (formatted tag names and attributes in lowercase).

    I found this blog post by Tim Vasil which pointed me to the solution.

    Here's what I did to fix this:

    1. Deleted all files in C:\Documents and Settings[username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas

    2. Deleted all files in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    3. Deleted the .suo User Option file (the file has the same name as the solution file with .suo in place of .sln)

    (Note: VS eventually regenerates the various files in it's own time...)

    0 讨论(0)
  • 2020-12-21 11:02

    I found the cause. I put back that 650MB big folder in C:\Documents and Settings\My User Id\Application Data\Microsoft\VisualStudio\9.0 and everything seems to be back to normal.

    Thanks for trying to help me!

    0 讨论(0)
  • 2020-12-21 11:06

    Go to Tools | Options...

    Expand: Text Editor - HTML

    Select the "Format" node, and see what settings you have for "Capitalization" of "Server tag" and "Server attributes - I think the default is now "Lowercase" - try setting that to "Assmebly definition" instead.

    More information on these options can be found here:

    Format, HTML, Text Editor, Options Dialog Box

    0 讨论(0)
提交回复
热议问题