Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <Project ToolsVersion="3.5" DefaultTargets="Build"
- xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <WebSiteSource>..\Tacho.Web\</WebSiteSource>
- <SetupF>..\Setup\</SetupF>
- <PublishF>publish\</PublishF>
- <Publish>$(SetupF)$(PublishF)</Publish>
- <WebSiteContentCode>WebSiteContent.wxs</WebSiteContentCode>
- <WebSiteContentObject>WebSiteContent.wixobj</WebSiteContentObject>
- <MsiOut>bin\Release\DemoWebsite_Setup.msi</MsiOut>
- </PropertyGroup>
- <!-- Defining group of temporary files which is the content of the web site. -->
- <ItemGroup>
- <WebSiteContent Include="$(WebSiteContentCode)" />
- </ItemGroup>
- <ItemGroup>
- <WixExtension Include='WixUIExtension' />
- </ItemGroup>
- <!-- The list of WIX input files -->
- <ItemGroup>
- <WixCode Include="DemoUI.wxs" />
- <WixCode Include="Product.wxs" />
- <WixCode Include="$(WebSiteContentCode)" />
- </ItemGroup>
- <!-- The list of WIX after candle files -->
- <ItemGroup>
- <WixObject Include="DemoUI.wixobj" />
- <WixObject Include="Product.wixobj" />
- <WixObject Include="$(WebSiteContentObject)" />
- </ItemGroup>
- <!-- Define default target with name 'Build' -->
- <Target Name="Build">
- <!-- Compile whole solution in release mode -->
- <MSBuild
- Projects="..\Tacho.sln"
- Targets="ReBuild"
- Properties="Configuration=Release" />
- </Target>
- <Target Name="PublishWebsite">
- <!-- Remove complete publish folder in order to
- be sure that evrything will be newly compiled -->
- <Message Text="Removing publish directory: $(SetupF)"/>
- <RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
- <Message Text="Start to publish website" Importance="high" />
- <MSBuild
- Projects="..\\Tacho.Web\Tacho.Web.csproj"
- Targets="ResolveReferences;_CopyWebApplication"
- Properties="OutDir=$(Publish)bin\;WebProjectOutputDir=
- $(Publish);Configuration=Release" />
- </Target>
- <!-- Define creating installer in another target -->
- <Target Name="Harvest">
- <!-- Harvest all content of published result -->
- <Exec
- Command='"$(WiX)bin\heat.exe" dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg MyWebWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
- ContinueOnError="false"
- WorkingDirectory="." />
- </Target>
- <Target Name="WIX">
- <!-- At last create an installer -->
- <Message Text="TEST1" />
- <Exec
- Command='"$(WiX)bin\candle.exe" -dpublishDir=$(Publish) -dMyWebResourceDir=. @(WixCode, ' ')'
- ContinueOnError="false"
- WorkingDirectory="." />
- <Message Text="TEST2" />
- <Exec
- Command='"$(WiX)bin\light.exe" -ext WixUIExtension.dll -cultures:en-us -out $(MsiOut) @(WixObject, ' ')'
- ContinueOnError="false"
- WorkingDirectory="." />
- <!-- A message at the end -->
- <Message Text="Install package has been created." />
- </Target>
- <Target Name="DeleteTmpFiles">
- <RemoveDir Directories="$(Publish)" ContinueOnError="false" />
- <RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
- <Delete Files="@(WixObject);@(WebSiteContent)" />
- </Target>
- </Project>
Advertisement
Add Comment
Please, Sign In to add comment