Skip to content

Commit 64a07e2

Browse files
committed
Bring back ExtraDefine
1 parent fe1533a commit 64a07e2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
<PackageReference Include="xunit.runner.msbuild" Version="2.0.0" />
2626
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
2727
</ItemGroup>
28+
<Import Project="..\LibGit2Sharp\ExtraDefine.targets" />
2829
</Project>

LibGit2Sharp/ExtraDefine.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<!-- Add extra defines to DefineConstants. -->
4+
<PropertyGroup>
5+
<DefineConstants Condition=" '$(ExtraDefine)' != '' ">$(DefineConstants);$(ExtraDefine)</DefineConstants>
6+
</PropertyGroup>
7+
</Project>

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.0.1" Condition=" '$(TargetFramework)' == 'netstandard1.3' " />
3939
</ItemGroup>
4040
<Import Project="CodeGenerator.targets" />
41+
<Import Project="ExtraDefine.targets" />
4142
<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
4243
<PropertyGroup>
4344
<PackageIconUrl>https://github.com/libgit2/libgit2sharp/raw/$(GitCommitIdShort)/square-logo.png</PackageIconUrl>

0 commit comments

Comments
 (0)