diff --git a/src/coreclr/vm/appdomain.cpp b/src/coreclr/vm/appdomain.cpp index 5a902c22ebafd3..db5b3414d98ab4 100644 --- a/src/coreclr/vm/appdomain.cpp +++ b/src/coreclr/vm/appdomain.cpp @@ -3053,7 +3053,11 @@ void AppDomain::GetParentAssemblyChain(Assembly *pStartAssembly, SString &chain, StackSString parentName; pParent->GetDisplayName(parentName); +#ifdef TARGET_UNIX chain.Append(W("\n --> ")); +#else + chain.Append(W("\r\n --> ")); +#endif chain.Append(parentName); if (pParent->IsSystem()) diff --git a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs index 75d26cd5070eed..f5fdbf1cc402be 100644 --- a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs @@ -101,7 +101,7 @@ public override string ToString() s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, _fileName); if (!string.IsNullOrEmpty(_requestingAssemblyChain)) - s += Environment.NewLineConst + SR.Format(SR.IO_FileLoad_RequestedBy, _requestingAssemblyChain.ReplaceLineEndings()); + s += Environment.NewLineConst + SR.Format(SR.IO_FileLoad_RequestedBy, _requestingAssemblyChain); if (InnerException != null) s += InnerExceptionPrefix + InnerException.ToString(); diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs index 040a4bcbc11ad3..41a4472ad50030 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileLoadException.cs @@ -56,7 +56,7 @@ public override string ToString() s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName); if (!string.IsNullOrEmpty(_requestingAssemblyChain)) - s += Environment.NewLineConst + SR.Format(SR.IO_FileLoad_RequestedBy, _requestingAssemblyChain.ReplaceLineEndings()); + s += Environment.NewLineConst + SR.Format(SR.IO_FileLoad_RequestedBy, _requestingAssemblyChain); if (InnerException != null) s += Environment.NewLineConst + InnerExceptionPrefix + InnerException.ToString(); diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs index 0cb4bc3b1241c3..6793843e246927 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileNotFoundException.cs @@ -79,7 +79,7 @@ public override string ToString() s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName); if (!string.IsNullOrEmpty(_requestingAssemblyChain)) - s += Environment.NewLineConst + SR.Format(SR.IO_FileLoad_RequestedBy, _requestingAssemblyChain.ReplaceLineEndings()); + s += Environment.NewLineConst + SR.Format(SR.IO_FileLoad_RequestedBy, _requestingAssemblyChain); if (InnerException != null) s += Environment.NewLineConst + InnerExceptionPrefix + InnerException.ToString();