|
24 | 24 | <NugetIntermediatePath Condition="'$(NugetIntermediatePath)' == ''">$(OutputPath)$(Configuration)\</NugetIntermediatePath> |
25 | 25 | <!-- TFS 2010/2012 support of OutDir overwrite --> |
26 | 26 | <NugetIntermediatePath Condition="'$(OutDir)' != ''">$(OutDir)\NugetPackages\$(Configuration)\</NugetIntermediatePath> |
27 | | - |
| 27 | + <!-- Filter out all folders which are not known by convention --> |
| 28 | + <NugetFilterOnlyConventionWellKnownFolders Condition="'$(NugetFilterOnlyConventionWellKnownFolders)' == ''">true</NugetFilterOnlyConventionWellKnownFolders> |
| 29 | + |
28 | 30 | <!-- Convention based for Nuget Package Restore --> |
29 | 31 | <BuildDependsOn/> |
30 | 32 |
|
|
118 | 120 |
|
119 | 121 | <Target Name="NugetCreateFolderStructure"> |
120 | 122 | <!-- Ensure nuget Folder structure exists --> |
121 | | - <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\lib" /> |
122 | | - <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\tools" /> |
123 | | - <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\content" /> |
124 | | - <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\build" /> |
| 123 | + <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\lib" Condition="'$(NugetFilterOnlyConventionWellKnownFolders)' == 'true'" /> |
| 124 | + <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\tools" Condition="'$(NugetFilterOnlyConventionWellKnownFolders)' == 'true'"/> |
| 125 | + <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\content" Condition="'$(NugetFilterOnlyConventionWellKnownFolders)' == 'true'"/> |
| 126 | + <MakeDir Directories="$(NugetStage)%(nuspec.Filename)\build" Condition="'$(NugetFilterOnlyConventionWellKnownFolders)' == 'true'"/> |
125 | 127 | </Target> |
126 | 128 |
|
127 | 129 | <Target Name="NugetCopyAdditionalFiles"> |
128 | 130 | <!-- nuget convention based folder structure includes --> |
129 | | - <ItemGroup> |
| 131 | + <ItemGroup Condition="'$(NugetFilterOnlyConventionWellKnownFolders)' == 'true'"> |
130 | 132 | <additionalFiles Include="$(MSBuildProjectDirectory)\%(nuspec.Filename)\tools\**\*.*"> |
131 | 133 | <targetFolder>%(nuspec.Filename)\tools</targetFolder> |
132 | 134 | </additionalFiles> |
|
140 | 142 | <targetFolder>%(nuspec.Filename)\lib</targetFolder> |
141 | 143 | </additionalFiles> |
142 | 144 | </ItemGroup> |
| 145 | + |
| 146 | + <ItemGroup Condition="'$(NugetFilterOnlyConventionWellKnownFolders)' == 'false'"> |
| 147 | + <additionalFiles Include="$(MSBuildProjectDirectory)\%(nuspec.Filename)\**\*.*"> |
| 148 | + <targetFolder>%(nuspec.Filename)</targetFolder> |
| 149 | + </additionalFiles> |
| 150 | + </ItemGroup> |
143 | 151 |
|
144 | 152 | <!-- try to evaluate 'physical path' if OutDir is present --> |
145 | 153 | <ItemGroup> |
|
0 commit comments