Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 529133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:03:35+00:00 2026-05-13T09:03:35+00:00

I have a c# project in my Visual studio 2008 which when built, outputs

  • 0

I have a c# project in my Visual studio 2008 which when built, outputs a bunch of files in a temp directory for other programs to use i.e. JsTestDriver, JsCoverage, etc (all a bit Unix-related).

Trouble is, everytime when the files were generated, they seem to contain weird return carriage/line feed which upsets the programs that would use them next.

What I’m currently doing is manually create a notepad file, rename it to a different name, then copy and paste the entire content of the generated file (and save) to solve this problem. This is, of course, tedious and not something I enjoy doing (ultimately I want this whole process to be automated).

So my question is: how do I get Visual Studio to output the correct/proper CR/LF so I no longer need to go through the manual process?

If the above is too vague, I’ll be happy to clarify. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:03:35+00:00Added an answer on May 13, 2026 at 9:03 am

    Yes, it’s a bit too vague at the moment – you should provide:

    • More details about how you’re writing out the files
    • More details about exactly what’s in the files afterwards. Use a hex editor to find this out.

    The simplest way of changing what happens in terms of line endings is probably to just be explicit about it in the code. For example, instead of:

    output.WriteLine(foo);
    

    write

    output.Write(foo);
    // Here LineTerminator would be a constant - or you could make
    // it a variable somewhere
    output.Write(LineTerminator);
    

    … possibly encapsulating this in your own class to make it easier (so you can have your own WriteLine method which does the right thing, perhaps).

    EDIT: I’ve been assuming that it’s your own code writing out the files. If that’s not the case, the easiest solution is probably to find or write a tool to convert the files, and put it as a postbuild step. I’m sure such tools exist (I think there was one called dos2unix a while ago) but it may be as easy to write your own as to find one which does exactly what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.