How to Add-Package to a project without adding an assembly reference?

Oct 18, 2010 at 6:10 PM
Scenario:

My package provides a .targets that I'll inject into the .csproj of the target project. This MSBuild file has a custom tasks assembly, but I don't want that assembly automatically added as a reference to the project.

Any tips?

/kzu

--
Daniel Cazzulino | Developer Lead | MS MVP | Clarius Consulting | +1 425.329.3471
Developer
Oct 18, 2010 at 6:51 PM

Don't put it in the lib folder. Do you run custom code for injecting the build task into a csproj file?

Oct 18, 2010 at 6:56 PM
When I do so I get: 
PM> Add-Package Funqlet -Project NuPackDesktop
_WriteError : The package 'Funqlet' only applies to the solution and not to a project. Remove the -Project parameter.

I'm planning on providing an Init.ps1, but I'm still trying to figure out how this solution vs project package is determined, and what's the lifecycle for custom scripts, etc. Would be great to have at least some very basic doc on that :).

Currently just looking at the package sources and starting to copy what they do.

/kzu

--
Daniel Cazzulino | Developer Lead | MS MVP | Clarius Consulting | +1 425.329.3471


On Mon, Oct 18, 2010 at 14:51, dfowler <notifications@codeplex.com> wrote:

From: dfowler

Don't put it in the lib folder. Do you run custom code for injecting the build task into a csproj file?

Read the full discussion online.

To add a post to this discussion, reply to this email (nupack@discussions.codeplex.com)

To start a new discussion for this project, email nupack@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Oct 18, 2010 at 9:19 PM
Edited Oct 18, 2010 at 9:23 PM

Ah yes, the documentation is lacking right now (our bad). But solution only packages are ones that have no project content, that is nothing under lib or content folders in the package.