diff options
author | emkael <emkael@tlen.pl> | 2016-06-02 15:28:25 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-06-02 15:28:25 +0200 |
commit | 807dca3c7df6f987aae504db85c6f6e734e660e6 (patch) | |
tree | 1d55d759351e6960d2d72920252bbac667357e15 /BCDD.csproj | |
parent | edf6e9493ba9f83ac22a96e957648c0eeb3607a3 (diff) |
* bundle Release build into ZIP file if MSBuild Community Tasks are available
Diffstat (limited to 'BCDD.csproj')
-rw-r--r-- | BCDD.csproj | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/BCDD.csproj b/BCDD.csproj index dbb0e10..e2b6f39 100644 --- a/BCDD.csproj +++ b/BCDD.csproj @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"
+ Condition="Exists('$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -16,7 +18,7 @@ <FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
- <PlatformTarget>x86</PlatformTarget>
+ <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
@@ -66,8 +68,16 @@ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
+ </Target> -->
+ <Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release' And Exists('$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets') ">
+ <ItemGroup>
+ <BundleFiles Include="$(OutputPath)\$(SolutionName).exe" />
+ <BundleFiles Include="doc\*.md" />
+ </ItemGroup>
+ <GetAssemblyIdentity AssemblyFiles="$(OutputPath)\$(SolutionName).exe">
+ <Output TaskParameter="Assemblies" ItemName="assemblyInfo" />
+ </GetAssemblyIdentity>
+ <Zip Files="@(BundleFiles)" WorkingDirectory="bundle\tmp\" Flatten="true"
+ ZipFileName="bundle\$(SolutionName)-$([System.Version]::Parse(%(assemblyInfo.Version)).ToString(2)).zip" />
</Target>
- <Target Name="AfterBuild">
- </Target>
- -->
</Project>
\ No newline at end of file |