I see that this was already commented on by jmcgar at
http://nuget.codeplex.com/workitem/847, but wondering if there are any suggestions on how to deal with it.
I have a package that needs to add some additional MSBuild steps to perform code generation. I've got a reasonable handle on how add the import to my custom targets during package install to the project file. However, I also want to be able to take advantage
of the new Restore functionality so I don't have to check my package files into source control.
The restore functionality is implemented through an another MSBuild extension, and does a good job of restoring the packages before build begins. However, the <Import> for custom targets will happen when the project file is loaded. At this point on
a machine that has not yet updated the packages, the import will point to a file that won't exist until a build is started.
This is a nasty circular dependency that I don't see a good solution to.
My current thinking is to abandon having a central .targets file, and to just push all of my properties and targets directly into the project file at install time, but this seems a bit messy (and more difficult to be able to fully undo when uninstall happens).
I'm hoping that I'm overlooking something simple. Any thoughts?