wix3/tools/Nuget.targets

67 строки
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!--
<copyright file="Nuget.targets" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Project InitialTargets="PackageRestore" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<WixRoot Condition=" '$(WixRoot)'=='' " >$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\))</WixRoot>
<NugetExe>$(MSBuildThisFileDirectory)bin\NuGet.exe</NugetExe>
<NugetPackageFolder>$(WixRoot)packages\</NugetPackageFolder>
</PropertyGroup>
<PropertyGroup>
<AzureStorageBuildTasksPath>$(NugetPackageFolder)FireGiant.BuildTasks.AzureStorage.1.0.0.0\tools\</AzureStorageBuildTasksPath>
<ExtensionPackPath>$(NugetPackageFolder)MSBuild.Extension.Pack.1.2.0\lib\net40\</ExtensionPackPath>
<LibGit2SharpPath>$(NugetPackageFolder)LibGit2Sharp.0.21.0.176\lib\net40\</LibGit2SharpPath>
<LibGit2SharpPropsFilePath>$(NugetPackageFolder)LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props</LibGit2SharpPropsFilePath>
<SHFBROOT>$(NugetPackageFolder)EWSoftware.SHFB.2014.11.22.0\Tools\</SHFBROOT>
<XunitPath>$(NugetPackageFolder)xunit.1.9.2\lib\net20\</XunitPath>
</PropertyGroup>
<!--
================================================================================================
PackageRestore
Restores the required packages to build using nuget.exe.
================================================================================================
-->
<ItemGroup>
<RestoreNugetPackage Include="EWSoftware.SHFB">
<Version>2014.11.22.0</Version>
</RestoreNugetPackage>
<RestoreNugetPackage Include="FireGiant.BuildTasks.AzureStorage">
<Version>1.0.0.0</Version>
</RestoreNugetPackage>
<RestoreNugetPackage Include="LibGit2Sharp">
<Version>0.21.0.176</Version>
</RestoreNugetPackage>
<RestoreNugetPackage Include="MSBuild.Extension.Pack">
<Version>1.2.0</Version>
</RestoreNugetPackage>
<RestoreNugetPackage Include="xunit">
<Version>1.9.2</Version>
</RestoreNugetPackage>
</ItemGroup>
<Target Name="PackageRestore"
DependsOnTargets="FindMissingPackages">
<Exec Command="&quot;$(NugetExe)&quot; install %(Identity) -Version %(Version)" Condition=" '@(MissingNugetPackage)'!='' "
WorkingDirectory="$(MSBuildThisFileDirectory)" />
</Target>
<Target Name="FindMissingPackages">
<CreateItem Include="@(RestoreNugetPackage)" Condition=" !Exists('$(NugetPackageFolder)%(Identity).%(Version)\%(Identity).%(Version).nupkg') " PreserveExistingMetadata="true">
<Output TaskParameter="Include" ItemName="MissingNugetPackage"/>
</CreateItem>
</Target>
<!-- Sentinel value that indicates Nuget.targets has been initialized. -->
<PropertyGroup>
<WixBuildNugetPropertiesDefined>true</WixBuildNugetPropertiesDefined>
</PropertyGroup>
</Project>