Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optional or conditional folders in NuGet files tag?

I would like to do something that MsBuild has: set up conditions the files referenced in .nuspec file.

Basically it would look like this:

<files>
  <file src="myFolder/aaa/*.dll" target="lib\net45" condition="!Exists('bestFolder')" />
  <file src="bestFolder/ccc/*.dll" target="lib\net45" condition="Exists('bestFolder')" />
</files>

Is there a way to do this? There can be several more folders and files grouped by a specific condition. Also note that some folders should be scanned if they exist.

Thanks, CssaBee

like image 415
CssaBee Avatar asked Jul 17 '14 12:07

CssaBee


1 Answers

no, right now this is not supported by NuGet. You can file a feature request for NuGet at https://nuget.codeplex.com/WorkItem/Create.

like image 169
Dan Liu Avatar answered Oct 13 '22 09:10

Dan Liu