Visual Studio 2022 still save files with mixed line endings

Ibrahim Konuk 0 Reputation points

Latest version of Visual Studio (community) started saving files with mixed line endings even when I force save with CRLF option.

I have a small app I downloaded from Visual Studio web page to test it. I also used Windows FC command. Both failed detecting line endings in some files.

Most importantly, I cannot follow the official procedure required to post problems via Visual Studio. I am posting this message with help from MS Support staff. As required, if I start from Visual Studio > Help > Report a problem I get a Endge screen indicating "Signing In". As I have shown to MS General Support person the loop never ends. Please help me to sign in to support page without calling MS support.

I. Konuk

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,792 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 28,846 Reputation points Microsoft Vendor

    Hello @Ibrahim Konuk ,

    Welcome to Microsoft Q&A forum.

    If on your side, this option => "Check for consistent line endings on load" in VS > Tools > Options > Environment > Documents is selected, does VS prompt any error message about inconsistent line endings when you reload the project(right-click your project > Unload Project > right-click it again > Reload Project) and reopen that file?

    Besides, I am considering if this issue appears in some specific situations. For example, if you have a XAML file, and with this option selected => Tools > Options > Text Editor > XAML > Formatting > Spacing > Attribute Spacing > Position each attribute on a separate line, then after formatting document, the file will have MIXED line endings. If it’s the similar situation with yours, you can try to select "Preserve new lines and spaces between attributes" option or reset VS settings(run devenv /ResetSettings in Developer Command Prompt for Visual Studio 2022) as a temporarily workaround.

    For not being able to report a problem, I guess there’s something wrong with the account cache, Edge cache or VS settings. Please trying following methods:

    1. Sign out Visual Studio, sign in VS again and click Help > Report a problem.
    2. Sign out VS > open VS Installer > on top right corner > click Provide feedback > Report a problem > sign in to see if you can access to send feedback.
    3. navigate to C:\Users\username\AppData\Local folder > find and rename .IdentityService folder > if possible, clean Edge browse cache > open VS > Help > Report a problem.
    4. Try to reset VS settings and test again.

    If all above don’t work, you can directly try to send the feedback by using .NET entry, and modify the tag(add VS related tags) after you have reported the problem.



    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments