Skip to content

Commit fe3742e

Browse files
authored
Merge pull request #1483 from libgit2/netstandard2.0
Move to .NET Standard 2.0
2 parents ed61c69 + 5379d6a commit fe3742e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+522
-1194
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ insert_final_newline = true
1313
[*.{sln,csroj}]
1414
trim_trailing_whitespace = false
1515
insert_final_newline = false
16+
17+
[*.{props,targets}]
18+
indent_size = 2

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
language: csharp
55
dist: trusty
6-
dotnet: 1.0.1
6+
dotnet: 2.0.0
77
mono: none
8+
osx_image: xcode8.3
89

910
os:
1011
- osx

CodeGeneration/CodeGeneration.csproj

Lines changed: 0 additions & 12 deletions
This file was deleted.

CodeGeneration/OfferFriendlyInteropOverloadsGenerator.cs

Lines changed: 0 additions & 312 deletions
This file was deleted.

CodeGenerationAttributes/CodeGenerationAttributes.csproj

Lines changed: 0 additions & 12 deletions
This file was deleted.

CodeGenerationAttributes/CustomMarshalerAttribute.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

CodeGenerationAttributes/OfferFriendlyInteropOverloadsAttribute.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<Project>
2+
23
<PropertyGroup>
34
<OutputPath>$(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
45
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
5-
6-
<CodeGenerationRoslynVersion>0.4.11</CodeGenerationRoslynVersion>
6+
<DefineConstants Condition=" '$(ExtraDefine)' != '' ">$(DefineConstants);$(ExtraDefine)</DefineConstants>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="Nerdbank.GitVersioning" Version="2.0.37-beta" PrivateAssets="all" />
1111
</ItemGroup>
12+
1213
</Project>

Directory.Build.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<Project>
2+
23
<PropertyGroup>
34
<PublicSign Condition=" '$(AssemblyOriginatorKeyFile)' != '' and '$(OS)' != 'Windows_NT' ">true</PublicSign>
5+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludePDBsInPackage</TargetsForTfmSpecificContentInPackage>
46
</PropertyGroup>
7+
8+
<Target Name="IncludePDBsInPackage">
9+
<ItemGroup>
10+
<TfmSpecificPackageFile Include="$(OutputPath)\$(AssemblyName).pdb" PackagePath="lib/$(TargetFramework)" />
11+
</ItemGroup>
12+
</Target>
13+
514
</Project>

LibGit2Sharp.Tests/GlobalSettingsFixture.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ public void CanGetMinimumCompiledInFeatures()
1919
public void CanRetrieveValidVersionString()
2020
{
2121
// Version string format is:
22-
// Major.Minor.Patch[-somePreleaseTag]-libgit2_abbrev_hash (x86|x64 - features)
22+
// Major.Minor.Patch[-previewTag]+g{LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features)
2323
// Example output:
24-
// "0.17.0[-beta]+gdeadcafeee.LibGit2-06d772d (x86 - Threads, Https)"
24+
// "0.25.0-preview.52+g871d13a67f.libgit2-15e1193 (x86 - Threads, Https)"
2525

2626
string versionInfo = GlobalSettings.Version.ToString();
2727

2828
// The GlobalSettings.Version returned string should contain :
29-
// version: '0.17.0[-somePreleaseTag]+[gSomeGitCommit.]LibGit2-06d772d' LibGit2Sharp version number.
30-
// git2hash: '06d772d' LibGit2 library hash.
31-
// arch: 'x86' or 'x64' LibGit2 target.
32-
// git2Features: 'Threads, Ssh' LibGit2 features compiled with.
33-
string regex = @"^(?<version>\d+\.\d+\.\d+(-[\w\-\.]+)?\+(g(?<git2SharpHash>[a-f0-9]{10})\.)?LibGit2-[a-f0-9]{7}) \((?<arch>\w+) - (?<git2Features>(?:\w*(?:, )*\w+)*)\)$";
29+
// version: '0.25.0[-previewTag]' LibGit2Sharp version number.
30+
// git2SharpHash: '871d13a67f' LibGit2Sharp hash.
31+
// arch: 'x86' or 'x64' libgit2 target.
32+
// git2Features: 'Threads, Ssh' libgit2 features compiled with.
33+
string regex = @"^(?<version>\d+\.\d+\.\d+(-[\w\-\.]+)?\+(g(?<git2SharpHash>[a-f0-9]{10})\.)?libgit2-[a-f0-9]{7}) \((?<arch>\w+) - (?<git2Features>(?:\w*(?:, )*\w+)*)\)$";
3434

3535
Assert.NotNull(versionInfo);
3636

3737
Match regexResult = Regex.Match(versionInfo, regex);
3838

3939
Assert.True(regexResult.Success, "The following version string format is enforced:" +
40-
"Major.Minor.Patch[-somePreleaseTag]+[gSomeGitCommit].LibGit2-abbrev_hash (x86|x64 - features). " +
40+
"Major.Minor.Patch[-previewTag]+g{LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features). " +
4141
"But found \"" + versionInfo + "\" instead.");
4242
}
4343

0 commit comments

Comments
 (0)