DEV Community

Discussion on: Writing a NuGet package release notes in an outside of a .csproj file.

Collapse
dimay profile image
dima-y • Edited

Hi,
Your solution is nice - but I found that ReadLinesFromFile skips empty lines, which may be not so good for release notes. After some digging around I came up with this which keeps the .txt as is, empty lines and all:

<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/release-notes.txt"))</PackageReleaseNotes>
Enter fullscreen mode Exit fullscreen mode

Hope this helps someone.

Cheers!