118
Vote

Allow package resource folders to be configurable

description

I <3 Nuget. But one thing I don't like is that it forces things like JavaScripts to be in one location. I keep my website organized a specific way, and I don't want my scripts in that folder. So it would be nice if certain folders could be configurable to drop items in an alternate location.

file attachments

comments

JeffHandley wrote Feb 8, 2012 at 8:32 PM

Interesting idea for sure.

JeffHandley wrote Mar 16, 2012 at 6:38 PM

An idea:

One could create a MyPackageName.config within the .nuget folder, specifying a mapping of where files should be installed. During package installation, we'd respect the mappings in place.

Going further, we could have UI around defining the mappings by folder or file.

balexandre77 wrote Oct 14, 2012 at 8:57 PM

This will be lovely as when using multiple libraries e tend to create folders for each library, an example is attached to this comment

ParaSwarm wrote Nov 11, 2012 at 2:29 AM

I would love to include stuff like jQuery via NuGet if I could control the script location.

bhuvak wrote Dec 1, 2012 at 12:15 AM

Amateur wrote Dec 3, 2012 at 8:10 PM

Any updates as to when or if this may be investigated in to? I think its something that needs to be looked, as projects loose structure when JavaScript files for example are added to folders which may go against the natural structure of the project.

bartmax wrote Jan 4 at 1:29 PM

PLEASE!

I guess something will be great to MAP into the 'client|user-side' so existing packages will still work (not sure how they are created) but imagine that you can do a mapping like:

~/Scripts => ~/Content/Scripts

then when installing files you can 'parse the output directory and if it's ~/Scripts* change to ~/Content/Scripts*

JeffHandley wrote Jan 23 at 8:35 PM

Triage: moved into 2.3 due to high vote count.
This is not a guarantee that it will be completed in 2.3 though.

dotnetjunky wrote Feb 4 at 4:32 PM

We won't be able to do this in 2.3. Move to 2.4

roblang wrote Mar 13 at 3:53 PM

Now in March 2013 and this feature is becoming more pressing. Would love to add to create a series of resource destinations per project in a nuget.config file.

dotnetjunky wrote Apr 11 at 5:16 PM

koistya wrote Wed at 11:53 PM

How about this:

Image

We don't even need an interface for this for the first time.