Skip to content

Commit fcc1454

Browse files
committed
Fix use when building with mono on OSX or Linux
Fixes #118
1 parent 2c3d530 commit fcc1454

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/Nerdbank.GitVersioning.NuGet/Nerdbank.GitVersioning.NuGet.nuproj

+9-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,14 @@
5555
<NoneToContentPort Include="@(None)" Condition=" '%(None.CopyToOutputDirectory)' == 'PreserveNewest' " />
5656
<None Remove="@(NoneToContentPort)" />
5757
<Content Include="@(NoneToContentPort)">
58-
<Link>build\%(NoneToContentPort.Link)</Link>
58+
<Link>build\MSBuildFull\%(NoneToContentPort.Link)</Link>
5959
<CopyToOutputDirectory />
60-
<PackageDirectory>build</PackageDirectory>
60+
<PackageDirectory>build\MSBuildFull</PackageDirectory>
61+
</Content>
62+
<Content Include="@(NoneToContentPort)">
63+
<Link>build\MSBuildCore\%(NoneToContentPort.Link)</Link>
64+
<CopyToOutputDirectory />
65+
<PackageDirectory>build\MSBuildCore</PackageDirectory>
6166
</Content>
6267
</ItemGroup>
6368
</Target>
@@ -104,7 +109,8 @@
104109
<ItemGroup>
105110
<PackageFile Remove="@(PackageFile)" Condition="
106111
$([System.String]::new('%(TargetPath)').StartsWith('build\')) and
107-
!$([System.String]::new('%(TargetPath)').StartsWith('build\lib\')) and
112+
!$([System.String]::new('%(TargetPath)').StartsWith('build\MSBuildFull\lib\')) and
113+
!$([System.String]::new('%(TargetPath)').StartsWith('build\MSBuildCore\lib\')) and
108114
'%(FileName)' != 'NerdBank.GitVersioning' and
109115
'%(FileName)' != 'NerdBank.GitVersioning.Tasks' and
110116
'%(FileName)' != 'MSBuildExtensionTask' and

src/Nerdbank.GitVersioning.NuGet/tools/Get-CommitId.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\Valid
2727
$null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\NerdBank.GitVersioning.dll"))
2828
$null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\LibGit2Sharp.dll"))
2929
$null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\Newtonsoft.Json.dll"))
30-
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries("$DependencyBasePath\..")
30+
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries($DependencyBasePath)
3131

3232
$ProjectDirectory = (Resolve-Path $ProjectDirectory).ProviderPath
3333
$GitPath = $ProjectDirectory

src/Nerdbank.GitVersioning.NuGet/tools/Get-Version.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $null = [Reflection.Assembly]::LoadFile((Resolve-Path "$DependencyBasePath\Newto
1919
$ProjectDirectory = (Resolve-Path $ProjectDirectory).ProviderPath
2020

2121
try {
22-
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries("$DependencyBasePath\..")
22+
[Nerdbank.GitVersioning.GitExtensions]::HelpFindLibGit2NativeBinaries($DependencyBasePath)
2323
$CloudBuild = [Nerdbank.GitVersioning.CloudBuild]::Active
2424
$VersionOracle = [Nerdbank.GitVersioning.VersionOracle]::Create($ProjectDirectory, $null, $CloudBuild)
2525
$VersionOracle

src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public GetBuildVersion()
148148
[Output]
149149
public ITaskItem[] CloudBuildVersionVars { get; private set; }
150150

151-
protected override string UnmanagedDllDirectory => GitExtensions.FindLibGit2NativeBinaries(this.TargetsPath);
151+
protected override string UnmanagedDllDirectory => GitExtensions.FindLibGit2NativeBinaries(Path.Combine(this.TargetsPath, "MSBuildFull"));
152152

153153
protected override bool ExecuteInner()
154154
{

0 commit comments

Comments
 (0)