You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.6 KiB
62 lines
2.6 KiB
<Project ToolsVersion="14.0" DefaultTargets="Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" />
|
|
|
|
<PropertyGroup>
|
|
<Configuration Condition=" "$(Configuration)" == "" ">Release</Configuration>
|
|
|
|
<HomeDirectory>$(MSBuildProjectDirectory)</HomeDirectory>
|
|
<DeployDirectory>$(HomeDirectory)\Deploy</DeployDirectory>
|
|
<PublishDirectory>$(DeployDirectory)\Publish</PublishDirectory>
|
|
<PackagesDirectory>$(OutputDirectory)\Packages</PackagesDirectory>
|
|
<WebSources>$(HomeDirectory)\Source\Host</WebSources>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<ConfigurationProperties Condition="'$(Configuration)' != ''">Configuration=$(Configuration)</ConfigurationProperties>
|
|
<VisualStudioVersionProperties Condition="'$(VisualStudioVersion)' != ''">VisualStudioVersion=$(VisualStudioVersion)</VisualStudioVersionProperties>
|
|
<SignAssemblyProperties Condition="'$(SignAssembly)' != ''">SignAssembly=$(SignAssembly);AssemblyOriginatorKeyFile=$(AssemblyOriginatorKeyFile)</SignAssemblyProperties>
|
|
<CodeAnalysisProperties>RunCodeAnalysis=false</CodeAnalysisProperties>
|
|
|
|
<MbsCustomProperties>$(ConfigurationProperties);$(VisualStudioVersionProperties);$(SignAssemblyProperties);$(CodeAnalysisProperties)</MbsCustomProperties>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="Package">
|
|
|
|
<RemoveDir Directories="$(PublishDirectory)" />
|
|
|
|
<MSBuild
|
|
Projects="$(HomeDirectory)\{{solution}}"
|
|
Properties="$(MbsCustomProperties);DeployOnBuild=true;DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;_PackageTempDir=$(PublishDirectory)"
|
|
/>
|
|
|
|
<TransformXml
|
|
Source="$(WebSources)\NLog.config"
|
|
Destination="$(PublishDirectory)\NLog.config"
|
|
Transform="$(WebSources)\NLog.$(Configuration).config" />
|
|
|
|
<Copy SourceFiles="$(HomeDirectory)\version.aspx" DestinationFolder="$(PublishDirectory)" />
|
|
|
|
<CallTarget Targets="RemoveUnwantedFiles" />
|
|
|
|
<MakeDir Directories="$(PackagesDirectory)" />
|
|
|
|
<Exec Command="msdeploy -verb:sync -source:iisApp="$(PublishDirectory)" -dest:package="$(PackagesDirectory)\{{package}}"" />
|
|
|
|
<Copy SourceFiles="$(HomeDirectory)\Deploy.bat" DestinationFolder="$(PackagesDirectory)" />
|
|
|
|
<RemoveDir Directories="$(PublishDirectory)" />
|
|
|
|
</Target>
|
|
|
|
<Target Name="RemoveUnwantedFiles">
|
|
|
|
<ItemGroup>
|
|
<Files Include="$(PublishDirectory)\packages.config" />
|
|
</ItemGroup>
|
|
|
|
<Delete Files="@(Files)" />
|
|
|
|
</Target>
|
|
|
|
</Project>
|
|
|