Skip to content

Commit 111520c

Browse files
authored
Merge pull request #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‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<ProjectSdk="Microsoft.NET.Sdk">
22

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

87
<ItemGroup>
98
<ProjectReferenceInclude="..\LibGit2Sharp\LibGit2Sharp.csproj" />
10-
<ProjectReferenceInclude="..\NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj"Condition="'$(TargetFramework)' == 'net461'"ReferenceOutputAssembly="false"OutputItemType="TestAppExe" />
11-
<ProjectReferenceInclude="..\NativeLibraryLoadTestApp\x64\NativeLibraryLoadTestApp.x64.csproj"Condition="'$(TargetFramework)' == 'net461'"ReferenceOutputAssembly="false"OutputItemType="TestAppExe" />
9+
<ProjectReferenceInclude="..\NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj"Condition="'$(TargetFramework)' == 'net46'"ReferenceOutputAssembly="false"OutputItemType="TestAppExe" />
10+
<ProjectReferenceInclude="..\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
<CompileInclude="..\LibGit2Sharp\Core\Platform.cs"Link="TestHelpers\Platform.cs" />
25-
<CompileRemove="desktop\**"Condition=" '$(TargetFramework)' != 'net461' " />
24+
<CompileRemove="desktop\**"Condition=" '$(TargetFramework)' != 'net46' " />
2625
</ItemGroup>
2726

2827
<ItemGroup>

‎LibGit2Sharp.Tests/SetErrorFixture.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void FormatAggregateException()
4949
ExceptionexceptionToThrow=newAggregateException(aggregateExceptionMessage,newException(innerExceptionMessage),newException(innerExceptionMessage2));
5050

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

‎LibGit2Sharp/LibGit2Sharp.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ProjectSdk="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-
<PackageReferenceInclude="LibGit2Sharp.NativeBinaries"Version="[1.0.258]"PrivateAssets="none" />
32+
<PackageReferenceInclude="LibGit2Sharp.NativeBinaries"Version="[1.0.260]"PrivateAssets="none" />
3333
<PackageReferenceInclude="Microsoft.SourceLink.GitHub"Version="1.0.0-beta-63127-02"PrivateAssets="all" />
3434
<PackageReferenceInclude="Nerdbank.GitVersioning"Version="2.2.13"PrivateAssets="all" />
3535
</ItemGroup>

‎NativeLibraryLoadTestApp/x64/NativeLibraryLoadTestApp.x64.csproj‎

Lines changed: 1 addition & 1 deletion
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‎

Lines changed: 1 addition & 1 deletion
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‎

Lines changed: 4 additions & 4 deletions
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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%"
3131
@IF ERRORLEVEL 1EXIT /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 1EXIT /B %ERRORLEVEL%
3636
dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" -f netcoreapp2.0 --no-restore --no-build
3737
@IF ERRORLEVEL 1EXIT /B %ERRORLEVEL%

0 commit comments

Comments
(0)