Skip to content

Instantly share code, notes, and snippets.

@cchitsiang
Created November 1, 2013 10:28
Show Gist options
  • Save cchitsiang/7263553 to your computer and use it in GitHub Desktop.
Save cchitsiang/7263553 to your computer and use it in GitHub Desktop.
CopySatelliteAssemblies After Finish Build
<Target Name="WSPCopySatelliteAssemblies" AfterTargets="AfterBuild">
<ItemGroup>
<ResourceFiles Include="$(MSBuildProjectDirectory)\..\Nintex.Workflow.Globalisation\$(OutDir)*\*.dll"/>
</ItemGroup>
<Message Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''" Text="Server: Copying Satellite Assemblies to known location from project: Nintex.Workflow.Resources" />
<!-- Copy all satellite assemblies in each project built to a known folder for isolation -->
<RemoveDir Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''" Directories="$(MSBuildProjectDirectory)\SatelliteAssemblies" />
<Copy Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' != ''" SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)" DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(MSBuildProjectDirectory)\SatelliteAssemblies\%(Culture)\$(TargetName).resources.dll')" SkipUnchangedFiles="false" />
<Message Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' == ''" Text="Local: Copying Satellite Assemblies to known location from project: Nintex.Workflow.Resources" />
<!-- Copy all satellite assemblies in each project built to a known folder for isolation -->
<RemoveDir Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' == ''" Directories="$(MSBuildProjectDirectory)\..\SatelliteAssemblies" />
<MakeDir Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' == ''" Directories="$(MSBuildProjectDirectory)\..\SatelliteAssemblies" />
<Copy Condition="'@(IntermediateSatelliteAssembliesWithTargetPath)' == ''" SourceFiles="@(ResourceFiles)" DestinationFiles="@(ResourceFiles->'$(MSBuildProjectDirectory)\..\SatelliteAssemblies\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment