Skip to content

Commit 111520c

Browse files
authored
Merge pull request libgit2#1651 from libgit2/net46
Target net46 instead of net461
2 parents ac599f4 + 7a61bb9 commit 111520c

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
5-
<DefineConstants Condition=" '$(TargetFramework)' == 'net461' ">$(DefineConstants);DESKTOP</DefineConstants>
4+
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
65
</PropertyGroup>
76

87
<ItemGroup>
98
<ProjectReference Include="..\LibGit2Sharp\LibGit2Sharp.csproj" />
10-
<ProjectReference Include="..\NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj" Condition="'$(TargetFramework)' == 'net461'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />
11-
<ProjectReference Include="..\NativeLibraryLoadTestApp\x64\NativeLibraryLoadTestApp.x64.csproj" Condition="'$(TargetFramework)' == 'net461'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />
9+
<ProjectReference Include="..\NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj" Condition="'$(TargetFramework)' == 'net46'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />
10+
<ProjectReference Include="..\NativeLibraryLoadTestApp\x64\NativeLibraryLoadTestApp.x64.csproj" Condition="'$(TargetFramework)' == 'net46'" ReferenceOutputAssembly="false" OutputItemType="TestAppExe" />
1211
</ItemGroup>
1312

1413
<ItemGroup>
@@ -22,7 +21,7 @@
2221

2322
<ItemGroup>
2423
<Compile Include="..\LibGit2Sharp\Core\Platform.cs" Link="TestHelpers\Platform.cs" />
25-
<Compile Remove="desktop\**" Condition=" '$(TargetFramework)' != 'net461' " />
24+
<Compile Remove="desktop\**" Condition=" '$(TargetFramework)' != 'net46' " />
2625
</ItemGroup>
2726

2827
<ItemGroup>

LibGit2Sharp.Tests/SetErrorFixture.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void FormatAggregateException()
4949
Exception exceptionToThrow = new AggregateException(aggregateExceptionMessage, new Exception(innerExceptionMessage), new Exception(innerExceptionMessage2));
5050

5151
StringBuilder sb = new StringBuilder();
52-
#if DESKTOP
52+
#if NETFRAMEWORK
5353
sb.AppendLine(aggregateExceptionMessage);
5454
#else
5555
sb.AppendLine($"{aggregateExceptionMessage} ({innerExceptionMessage}) ({innerExceptionMessage2})");

LibGit2Sharp/LibGit2Sharp.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.</Description>
77
<Company>LibGit2Sharp contributors</Company>
@@ -29,7 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[1.0.258]" PrivateAssets="none" />
32+
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[1.0.260]" PrivateAssets="none" />
3333
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="all" />
3434
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.13" PrivateAssets="all" />
3535
</ItemGroup>

NativeLibraryLoadTestApp/x64/NativeLibraryLoadTestApp.x64.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net461</TargetFramework>
5+
<TargetFramework>net46</TargetFramework>
66
<PlatformTarget>x64</PlatformTarget>
77
</PropertyGroup>
88

NativeLibraryLoadTestApp/x86/NativeLibraryLoadTestApp.x86.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net461</TargetFramework>
5+
<TargetFramework>net46</TargetFramework>
66
<PlatformTarget>x86</PlatformTarget>
77
</PropertyGroup>
88

appveyor.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ test_script:
9090
{
9191
.\packages\OpenCover\tools\OpenCover.Console.exe `
9292
-register:user `
93-
"-target:""$Env:userprofile\.nuget\packages\xunit.runner.console\2.4.0\tools\net461\$runner""" `
94-
"-targetargs:""$Env:APPVEYOR_BUILD_FOLDER\bin\LibGit2Sharp.Tests\Release\net461\LibGit2Sharp.Tests.dll"" -noshadow" `
93+
"-target:""$Env:userprofile\.nuget\packages\xunit.runner.console\2.4.0\tools\net46\$runner""" `
94+
"-targetargs:""$Env:APPVEYOR_BUILD_FOLDER\bin\LibGit2Sharp.Tests\Release\net46\LibGit2Sharp.Tests.dll"" -noshadow" `
9595
"-filter:+[LibGit2Sharp]* -[LibGit2Sharp.Tests]*" `
9696
-hideskipped:All `
9797
-output:opencoverCoverage.xml
9898
}
9999
ElseIf ($Env:SHOULD_RUN_COVERITY_ANALYSIS -eq $False)
100100
{
101-
& "$Env:userprofile\.nuget\packages\xunit.runner.console\2.4.0\tools\net461\$runner" `
102-
"$Env:APPVEYOR_BUILD_FOLDER\bin\LibGit2Sharp.Tests\Release\net461\LibGit2Sharp.Tests.dll" -noshadow
101+
& "$Env:userprofile\.nuget\packages\xunit.runner.console\2.4.0\tools\net46\$runner" `
102+
"$Env:APPVEYOR_BUILD_FOLDER\bin\LibGit2Sharp.Tests\Release\net46\LibGit2Sharp.Tests.dll" -noshadow
103103
}
104104
}
105105

buildandtest.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%"
3131
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
3232

3333
:: Run tests on Desktop and CoreCLR
34-
"%userprofile%\.nuget\packages\xunit.runner.console\2.4.0\tools\net452\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net461\LibGit2Sharp.Tests.dll" -noshadow
34+
"%userprofile%\.nuget\packages\xunit.runner.console\2.4.0\tools\net452\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow
3535
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
3636
dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" -f netcoreapp2.0 --no-restore --no-build
3737
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%

0 commit comments

Comments
 (0)