Skip to content

Instantly share code, notes, and snippets.

@johnmmoss
Created October 8, 2015 11:10
Show Gist options
  • Save johnmmoss/476a61eead40a2b1f5aa to your computer and use it in GitHub Desktop.
Save johnmmoss/476a61eead40a2b1f5aa to your computer and use it in GitHub Desktop.
Nuget.targets csproj xml
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment