| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 3 |
<PropertyGroup> |
| 4 |
<BuildDependsOn> |
| 5 |
GenerateNupkgProps; |
| 6 |
$(BuildDependsOn) |
| 7 |
</BuildDependsOn> |
| 8 |
<PackageBuildPath>$(PackageOutputPath)build/</PackageBuildPath> |
| 9 |
<PropsFilePath>$(PackageBuildPath)$(Id).props</PropsFilePath> |
| 10 |
</PropertyGroup> |
| 11 |
<ItemGroup> |
| 12 |
<PackageFile Include="$(PropsFilePath)"> |
| 13 |
<TargetPath>build\</TargetPath> |
| 14 |
</PackageFile> |
| 15 |
</ItemGroup> |
| 16 |
<Target Name="GenerateNupkgProps" DependsOnTargets="CalculatePackageVersion"> |
| 17 |
<PropertyGroup> |
| 18 |
<PropsFileContents> |
| 19 |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 20 |
<ItemGroup> |
| 21 |
<DotNetCliToolReference Include="$(Id)" Version="$(PackageVersion)" /> |
| 22 |
</ItemGroup> |
| 23 |
</Project> |
| 24 |
</PropsFileContents> |
| 25 |
</PropertyGroup> |
| 26 |
<MakeDir Directories="$(PackageBuildPath)"/> |
| 27 |
<WriteLinesToFile |
| 28 |
File="$(PropsFilePath)" |
| 29 |
Lines="$(PropsFileContents)" |
| 30 |
Overwrite="true" /> |
| 31 |
</Target> |
| 32 |
</Project> |