Created
May 13, 2015 13:07
-
-
Save sihugh/db29516d43f025788dc0 to your computer and use it in GitHub Desktop.
Build target example to build a WSP using an MSBuild target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<!-- Include this step after the current build "depends on" list --> | |
<BuildDependsOn> | |
$(BuildDependsOn); | |
CreateWSP; | |
</BuildDependsOn> | |
<BinStash>$(SolutionDir)Bin\</BinStash> | |
<PostBuildEvent></PostBuildEvent> | |
</PropertyGroup> | |
<Target Name="CreateWSP" Inputs="@(None);@(Content);$(OutDir)$(TargetFileName)" Outputs="$(OutDir)$(ProjectName).wsp"> | |
<PropertyGroup> | |
<ConfigFolder>$(ProjectDir)bin\$(ConfigurationName)</ConfigFolder> | |
</PropertyGroup> | |
<MakeDir Directories="$(ConfigFolder)" Condition="!Exists('$(ConfigFolder)')" /> | |
<!-- For building when the output directory is not necessarily under the project root --> | |
<Copy SourceFiles="$(BinStash)$(TargetFileName)" DestinationFolder="$(ConfigFolder)" Condition="!Exists('ConfigFolder)$(TargetFileName)')" /> | |
<Exec Command="$(SolutionDir)Tools\WSPBuilder.exe -CreateWSPFileList "$(ProjectName).wspcontents.txt"" WorkingDirectory="$(ProjectDir)" /> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment