I have a file of MSBuild targets, an associated .props template, and a DLL with some custom tasks, which I use to package up .NET Framework projects into modules for installation into a third-party framework, which all live in one /build directory and get included through two lines in the project file. It all works, and it's slick, but it's a pain in the @ss to keep it up to date across old projects.
What I'd like: A Nuget package that on install will copy all the files into a /build directory (including the dll, to keep it separate from the products in the /bin directory), and add the necessary lines to the project file to import the .target file.
I've Googled this extensively and can only come up with partial answers. I've been able to get the .targets and .props files included in the project, although only as links, not as copies -- for the .targets this is fine but the .props needs to be modified for each project. I've had no success inserting the necessary lines into the project file, nor in getting a {projectName}.nuget.g.targets file to actually reference them.
I cannot find an example on Nuget of a package that installs files other than assemblies -- like documentation, or associated JS files. I have some experience building straightforward Nuget packages, but this is a bit of a leap for me.
Is this possible with Nuget? Is it possible without jumping through a lot of hoops?
If it won't work I'd rather just quit while I'm ahead! Since it's just for me, I have other options, I just like the idea of using Nuget since it's a familiar one.
Thanks!