Skip to content

Instantly share code, notes, and snippets.

@davidalpert
Last active August 29, 2015 13:56
Show Gist options
  • Save davidalpert/8837922 to your computer and use it in GitHub Desktop.
Save davidalpert/8837922 to your computer and use it in GitHub Desktop.
A simpler MSBuild script to download all packages in a solution.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>
<NugetExe>$(MSBuildThisFileDirectory)tools\NuGet\NuGet.exe</NugetExe>
</PropertyGroup>
<ItemGroup>
<Solutions Include="$(SolutionDir)**\*.sln" />
</ItemGroup>
<Target Name="RestorePackages">
<Exec Command="&quot;$(NugetExe)&quot; restore &quot;%(Solutions.Identity)&quot;" />
</Target>
</Project>
@angelakim
Copy link

From where is the value of %(Solutions.Identity) retrieved?

@rroman81
Copy link

there is a Solutions Item group which gets expanded during the Exec task is executed. Identity is a standard property of the ItemGroup item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment