KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When I do a ReadLinesFromFile on a file in MSBUILD and go to output that file again, I get all the text on one line. All the Carriage returns and LineFeeds are stripped out. <Project DefaultTargets = "Deploy" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" > <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/> <ItemGroup> <MyTextFile Include="$(ReleaseNotesDir)$(NewBuildNumber).txt"/> </ItemGroup> <Target Name="ReadReleaseNotes"> <ReadLinesFromFile File="@(MyTextFile)" > <Output TaskParameter="Lines" ItemName="ReleaseNoteItems"/> </ReadLinesFromFile> </Target> <Target Name="MailUsers" DependsOnTargets="ReadReleaseNotes" > <Mail SmtpServer="$(MailServer)" To="$(MyEMail)" From="$(MyEMail)" Subject="Test Mail Task" Body="@(ReleaseNoteItems)" /> </Target> <Target Name="Deploy"> <CallTarget Targets="MailUsers" /> </Target> </Project> I get the text from the file which normally looks like this - New Deployment Tool for BLAH - Random other stuff()"" Coming out like this - New Deployment Tool for BLAH;- Random other stuff()"" I know that the code for ReadLinesFromFile will pull the data in one line at a time and strip out the carriage returns. Is there a way to put them back in? So my e-mail looks all nicely formatted? Thanks
Tags (comma-separated)
Save Edits
Cancel