Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Repair brentspell#29
Browse files Browse the repository at this point in the history
The CopyToOutputDirectoryItems list shouldn't be part of the NuTargets,
because copying is not part of the core build target (ie. NuPackage
task), copying done by the .targets file independently.
  • Loading branch information
lmagyar committed May 17, 2015
1 parent 2a694fa commit 5378d33
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions MSBuild/Config/NuBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,9 @@
<ItemGroup>
<NuSources Include="$(MSBuildProjectFile);"/>
</ItemGroup>
<ItemGroup>
<NuTargets Include="@(CopyToOutputDirectoryItems->'$(OutDir)%(TargetPath)');"/>
</ItemGroup>
<Message Text="NuSources: @(NuSources)"/>
<Message Text="NuTargets: @(NuTargets)"/>
<Message Text="NuPrepared: @(NuPrepared)"/>
<Message Text="NuSources: @(NuSources)"/>
<Message Text="NuTargets: @(NuTargets)"/>
</Target>
<!-- Target: PrepareClean
. initializes the Compile build items, adding custom metadata
Expand All @@ -132,9 +130,10 @@
<!-- Target: Clean
. removes all .nupkg files from the output path
-->
<Target Name="Clean" DependsOnTargets="__PrepareClean;BeforeClean">
<Target Name="Clean" DependsOnTargets="__PrepareClean;BeforeClean;CoreClean;AfterClean">
</Target>
<Target Name="CoreClean">
<Delete Files="@(NuTargets)"/>
<CallTarget Targets="AfterClean"/>
</Target>
<!-- Target: Build
. creates a .nupkg file for each .nuspec file in the project
Expand All @@ -143,7 +142,7 @@
DependsOnTargets="__PrepareBuild;BeforeBuild;CoreBuild;AfterBuild" >
</Target>
<Target Name="CoreBuild"
DependsOnTargets="PreBuildEvent;NuPackage;PostBuildEvent" >
DependsOnTargets="PreBuildEvent;NuPackage;__CopySourceItemsToOutputDirectory;PostBuildEvent" >
<OnError ExecuteTargets="PostBuildEvent" Condition="'$(RunPostBuildEvent)'=='Always' or '$(RunPostBuildEvent)'=='OnOutputUpdated'"/>
</Target>
<Target Name="PreBuildEvent"
Expand All @@ -167,7 +166,6 @@
AddExecutablesToLibFolder="$(NuBuildAddExecutablesToLibFolder)"
IncludePdbs="$(NuBuildIncludePdbs)"/>
<Message Text="%(NuPrepared.Filename) -> %(NuPrepared.NuPackagePath)" Importance="high"/>
<CallTarget Targets="__CopySourceItemsToOutputDirectory"/>
</Target>
<Target Name="PostBuildEvent"
Condition="'$(PostBuildEvent)' != '' and '$(RunPostBuildEvent)' != 'OnOutputUpdated'" >
Expand Down

0 comments on commit 5378d33

Please sign in to comment.