Skip to content

Instantly share code, notes, and snippets.

@tmori3y2
Last active April 3, 2016 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmori3y2/b5fc4c37812ced105ca1 to your computer and use it in GitHub Desktop.
Save tmori3y2/b5fc4c37812ced105ca1 to your computer and use it in GitHub Desktop.
Automatic imported MSBuild project property sheet file which imports another one installed at the same time by NuGet
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- NuGet Package Manager inserts MSBuildTasks.ImportTasks.props above Microsoft.Common.props
<Import Project="..\..\packages\MSBuildTasks.ImportTasks.x.x.x.x\build\MSBuildTasks.ImportTasks.props" Condition="Exists('..\..\packages\MSBuildTasks.ImportTasks.x.x.x.x\build\MSBuildTasks.ImportTasks.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-->
<PropertyGroup Condition="'$(ImportedTask)'==''">
<ImportedTask>$(MSBuildProjectDirectory)\build\MSBuildTasks.ImportedTask</ImportedTask>
</PropertyGroup>
<Import Project="$(ImportedTask).props" Condition="Exists('$(ImportedTask).props')"/>
<!-- Default Properties -->
<PropertyGroup Condition="'$(NuGetExe)'==''">
<NuGetExe>$(MSBuildProjectDirectory)\..\..\nuget.exe</NuGetExe>
</PropertyGroup>
<PropertyGroup Condition="'$(NuGetDeploy)'==''">
<NuGetDeploy>$(MSBuildProjectDirectory)\..\..\NuGetDeploy</NuGetDeploy>
</PropertyGroup>
<PropertyGroup Condition="'$(CreatesNuGetPackage)'==''">
<CreatesNuGetPackage>true</CreatesNuGetPackage>
</PropertyGroup>
<PropertyGroup Condition="'$(NuGetPacksProject)'==''">
<NuGetPacksProject>false</NuGetPacksProject>
</PropertyGroup>
<PropertyGroup Condition="'$(NuGetPacksForTool)'==''">
<NuGetPacksForTool>false</NuGetPacksForTool>
</PropertyGroup>
</Project>