question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"dotnet add reference" produce a csproj with mixed eol characters

See original GitHub issue

Steps to reproduce

Create 2 projects and add project a reference from one of them to another For example, dotnet new classlib -o lib1 dotnet new classlib -o lib2 dotnet add lib1 reference lib2\lib2.csproj

Expected behavior

EOL characters of the csproj file should be CRLF

Actual behavior

Both LF and CRLF exists in the csproj file.

Environment data

dotnet --info output: Product Information: Version: 2.0.3 Commit SHA-1 hash: 12f0c7efcc

Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\2.0.3\

Microsoft .NET Core Shared Framework Host

Version : 2.0.3 Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
livarcocccommented, Dec 1, 2017

@peterhuene want to take a look?

0reactions
peterhuenecommented, Mar 27, 2018

I think we can dupe it to that one since there isn’t a fix on the CLI side needed.

@csleead Thank you for reporting this issue for us. The issue appears to be with MSBuild and we are tracking the issue with Microsoft/MSBuild#1401.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stop Visual Studio from mixing line endings in files
When opening a text based file in Visual Studio 2010 it will then write my edits with CRLF instead of the line ending...
Read more >
dotnet new creates files with CRLF line endings on linux
Run dotnet new classlib in new project folder. Expected behavior. On Linux, this should create Class1.cs and .csproj files with LF line endings....
Read more >
dotnet add reference command - .NET CLI
The dotnet add reference command provides a convenient option to add project-to-project references.
Read more >
How to fix mixed LF / CLRF across an older codebase?
The codebase I'm working on now is a c#/dotnet API that has been ... I believe the codebase must have mixed line endings...
Read more >
The Great Newline Schism
As a programmer, I knew there were end of line characters, ... Even worse, it's possible to mix all three of these line...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found