Using the new Microsoft.NET.Sdk project format, I'd like to achieve the following for a class library packed and consumed by a .Net application:
- have a text file (say info.txt) as part of project A (class library)
- when project A is packaged (typically with 'dotnet pack'), info.txt is included as part of the package
- when project A nuget package is included in another project (say .Net 5 application), info.txt is always included in the bin folder (irrespective of debug/release etc) when built and deployed.
Obviously the intent with this is that the consuming project doesn't need to be aware of the txt file so it's oblivious to the process.
I've seen one potential solution that uses an install.ps.
One that uses PackagePath but while I can get the txt file packaged, it's not clear on how to ensure this is copied to the bin.
Also, having just ported my library to the new project format, I'm seeing a confusing mix of nuspec and csproj concepts which is making it difficult to understand if this is even achievable in the new format.