none
Help remove green tidles when viewing code RRS feed

  • Question

  • New to c#. I'm using Visual Studio 2019 Community.

    My pet ferret walked across my keyboard.

    Now when viewing source code, every line is underlined with:

    ~~~~~~~~ in green.

    Zero errors showing, code builds fine & runs fine.

    please help a noob!

    Saturday, September 28, 2019 12:00 AM

All replies

  • Hello,

    I believe this is caused by improper indentation. Try pressing CTRL+K (keep the CTRL key down) +D which will reformat your code and that should remove the ~~~~~.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Saturday, September 28, 2019 12:56 AM
    Moderator
  • Sorry, no change

    I tried Control-K + D, then I tried Select All, then Control K +D

    Any other suggestions?

    Saturday, September 28, 2019 2:33 AM
  • Beat on the keyboard long enough & you get results.

    A combination of Control K Z seems to have fixed it.

    Thank you for leading me to an answer.

    Saturday, September 28, 2019 2:46 AM
  • Sorry, no change

    I tried Control-K + D, then I tried Select All, then Control K +D

    Any other suggestions?

    Developers have different keyboard combinations e.g.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Saturday, September 28, 2019 3:06 AM
    Moderator
  • Beat on the keyboard long enough & you get results.

    A combination of Control K Z seems to have fixed it.

    Thank you for leading me to an answer.

    Tip, as per my last reply rather than beating on the keyboard check out various menu options e.g. a decent thought would be the edit menu, traversing the menu leads to format document.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Saturday, September 28, 2019 3:08 AM
    Moderator
  • Hi macwizard8112, 

    Thank you for posting here.

    Green tidles are warnings, You can see the meaning of the lines and other colors/highlights in Tools-> Options-> Fonts and Colors:

    To get rid of green warnings, you can change the item foreground to match the item background(typically white).

    Code with green warnings:

    Change the item foreground to white.

    Result:

    Hope it can help you.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 30, 2019 8:18 AM
    Moderator
  • Mouse over the green tildes and they will show you: compiler warnings, violations of the styling guidelines and/or code fixes for issues. Right clicking on the area will generally make recommendations to fix it.

    Michael Taylor http://www.michaeltaylorp3.net

    Monday, September 30, 2019 2:07 PM
    Moderator