Skip to content

Commit 90c89a1

Browse files
committed
update to .netstd2.0
1 parent e5e0096 commit 90c89a1

File tree

6 files changed

+50
-177
lines changed

6 files changed

+50
-177
lines changed

NGitLab/NGitLab.Tests/NGitLab.Tests.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@
6666
<Compile Include="Config.cs" />
6767
<Compile Include="Properties\AssemblyInfo.cs" />
6868
</ItemGroup>
69-
<ItemGroup>
70-
<ProjectReference Include="..\NGitLab\NGitLab.csproj">
71-
<Project>{EB69C6AD-64A6-4FE5-880C-38607A2430FB}</Project>
72-
<Name>NGitLab</Name>
73-
</ProjectReference>
74-
</ItemGroup>
7569
<ItemGroup>
7670
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
7771
</ItemGroup>
7872
<ItemGroup>
7973
<None Include="App.config" />
8074
<None Include="packages.config" />
8175
</ItemGroup>
76+
<ItemGroup>
77+
<ProjectReference Include="..\NGitLab\NGitLab.csproj">
78+
<Project>{58c220cb-0083-40fc-bc9f-bdbd85026202}</Project>
79+
<Name>NGitLab</Name>
80+
</ProjectReference>
81+
</ItemGroup>
8282
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8383
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8484
Other similar extension points exist, see Microsoft.Common.targets.

NGitLab/NGitLab.sln

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11

2-
Microsoft Visual Studio Solution File, Format Version 14.00
3-
# Visual Studio 2015
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NGitLab", "NGitLab\NGitLab.csproj", "{EB69C6AD-64A6-4FE5-880C-38607A2430FB}"
5-
EndProject
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27428.2015
5+
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NGitLab.Tests", "NGitLab.Tests\NGitLab.Tests.csproj", "{B1C9D8F6-22BC-4401-BD7B-E99C62A8E685}"
77
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NGitLab", "NGitLab\NGitLab.csproj", "{58C220CB-0083-40FC-BC9F-BDBD85026202}"
9+
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
1113
Release|Any CPU = Release|Any CPU
1214
EndGlobalSection
1315
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{EB69C6AD-64A6-4FE5-880C-38607A2430FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{EB69C6AD-64A6-4FE5-880C-38607A2430FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{EB69C6AD-64A6-4FE5-880C-38607A2430FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{EB69C6AD-64A6-4FE5-880C-38607A2430FB}.Release|Any CPU.Build.0 = Release|Any CPU
1816
{B1C9D8F6-22BC-4401-BD7B-E99C62A8E685}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1917
{B1C9D8F6-22BC-4401-BD7B-E99C62A8E685}.Debug|Any CPU.Build.0 = Debug|Any CPU
2018
{B1C9D8F6-22BC-4401-BD7B-E99C62A8E685}.Release|Any CPU.ActiveCfg = Release|Any CPU
2119
{B1C9D8F6-22BC-4401-BD7B-E99C62A8E685}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{58C220CB-0083-40FC-BC9F-BDBD85026202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{58C220CB-0083-40FC-BC9F-BDBD85026202}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{58C220CB-0083-40FC-BC9F-BDBD85026202}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{58C220CB-0083-40FC-BC9F-BDBD85026202}.Release|Any CPU.Build.0 = Release|Any CPU
2224
EndGlobalSection
2325
GlobalSection(SolutionProperties) = preSolution
2426
HideSolutionNode = FALSE
2527
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {A744666A-9ACD-4570-BFB5-BDBD5EBF3898}
30+
EndGlobalSection
2631
EndGlobal

NGitLab/NGitLab/Impl/HttpRequestor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public bool MoveNext() {
200200
request.Headers["PRIVATE-TOKEN"] = apiToken;
201201
}
202202

203-
using (var response = request.GetResponseAsync().Result) {
203+
using (var response = request.GetResponse()) {
204204
// <http://localhost:1080/api/v3/projects?page=2&per_page=0>; rel="next", <http://localhost:1080/api/v3/projects?page=1&per_page=0>; rel="first", <http://localhost:1080/api/v3/projects?page=2&per_page=0>; rel="last"
205205
var link = response.Headers["Link"];
206206

NGitLab/NGitLab/NGitLab.csproj

+30-140
Original file line numberDiff line numberDiff line change
@@ -1,152 +1,42 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{EB69C6AD-64A6-4FE5-880C-38607A2430FB}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>NGitLab</RootNamespace>
11-
<AssemblyName>NGitLab</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<ProductVersion>8.0.30703</ProductVersion>
15-
<SchemaVersion>2.0</SchemaVersion>
16-
<ReleaseVersion>2.0</ReleaseVersion>
17-
<TargetFrameworkProfile />
18-
</PropertyGroup>
19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20-
<DebugSymbols>true</DebugSymbols>
21-
<DebugType>full</DebugType>
22-
<Optimize>false</Optimize>
23-
<OutputPath>bin\Debug\</OutputPath>
24-
<DefineConstants>DEBUG;TRACE</DefineConstants>
25-
<ErrorReport>prompt</ErrorReport>
26-
<WarningLevel>4</WarningLevel>
27-
<Prefer32Bit>false</Prefer32Bit>
28-
<DocumentationFile>
29-
</DocumentationFile>
30-
</PropertyGroup>
31-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32-
<DebugType>pdbonly</DebugType>
33-
<Optimize>true</Optimize>
34-
<OutputPath>bin\Release\</OutputPath>
35-
<DefineConstants>TRACE</DefineConstants>
36-
<ErrorReport>prompt</ErrorReport>
37-
<WarningLevel>4</WarningLevel>
38-
<Prefer32Bit>false</Prefer32Bit>
4+
<TargetFrameworks>net40;net45; netstandard2.0
5+
</TargetFrameworks>
6+
7+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
8+
<Description>Provides a .NET REST client implementation of GitLab API.Support Version : V3、V4 and OAuth!</Description>
9+
<Authors>Scooletz, Franklin89,krac,Xarlot,Mysticboy</Authors>
10+
<Version>2.0.0</Version>
11+
<PackageId>NGitLab.Plus</PackageId>
12+
<PackageProjectUrl>https://github.com/maikebing/NGitLab</PackageProjectUrl>
13+
<RepositoryUrl></RepositoryUrl>
14+
<PackageTags>GitLab, API, NGitlab</PackageTags>
15+
<PackageLicenseUrl>https://raw.githubusercontent.com/maikebing/NGitLab/v4api/LICENSE</PackageLicenseUrl>
3916
</PropertyGroup>
17+
4018
<ItemGroup>
41-
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
42-
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
43-
</Reference>
44-
<Reference Include="System" />
19+
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
20+
</ItemGroup>
21+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
22+
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.1" />
23+
</ItemGroup>
24+
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
4525
<Reference Include="System.ComponentModel.DataAnnotations" />
46-
<Reference Include="System.Core" />
4726
<Reference Include="Microsoft.CSharp" />
48-
<Reference Include="System.Data" />
4927
<Reference Include="System.Runtime.Serialization" />
5028
<Reference Include="System.Web" />
5129
<Reference Include="System.Xml" />
5230
</ItemGroup>
53-
<ItemGroup>
54-
<Compile Include="GitLabClient.cs" />
55-
<Compile Include="IBranchClient.cs" />
56-
<Compile Include="IFilesClient.cs" />
57-
<Compile Include="IIssueClient.cs" />
58-
<Compile Include="IMergeRequestChangesClient.cs" />
59-
<Compile Include="IMergeRequestClient.cs" />
60-
<Compile Include="IMergeRequestCommitClient.cs" />
61-
<Compile Include="Impl\API.cs" />
62-
<Compile Include="Impl\BranchClient.cs" />
63-
<Compile Include="IMergeRequestCommentClient.cs" />
64-
<Compile Include="Impl\IssueClient.cs" />
65-
<Compile Include="Impl\JobsClient.cs" />
66-
<Compile Include="Impl\MergeRequestChangesClient.cs" />
67-
<Compile Include="Impl\MergeRequestClient.cs" />
68-
<Compile Include="Impl\MergeRequestCommentClient.cs" />
69-
<Compile Include="Impl\MergeRequestCommitClient.cs" />
70-
<Compile Include="Impl\PipelinesClient.cs" />
71-
<Compile Include="Impl\ProjectSnippetsClient.cs" />
72-
<Compile Include="Impl\ProjectHooksClient.cs" />
73-
<Compile Include="Impl\FileClient.cs" />
74-
<Compile Include="Impl\HttpRequestor.cs" />
75-
<Compile Include="Impl\MethodType.cs" />
76-
<Compile Include="Impl\ProjectClient.cs" />
77-
<Compile Include="Impl\RepositoryClient.cs" />
78-
<Compile Include="Impl\UserClient.cs" />
79-
<Compile Include="IPipelinesClient.cs" />
80-
<Compile Include="IProjectClient.cs" />
81-
<Compile Include="IProjectSnippetsClient.cs" />
82-
<Compile Include="IProjectHooksClient.cs" />
83-
<Compile Include="IRepositoryClient.cs" />
84-
<Compile Include="IUserClient.cs" />
85-
<Compile Include="Json\Sha1Converter.cs" />
86-
<Compile Include="Models\ArtifactsFile.cs" />
87-
<Compile Include="Models\Assignee.cs" />
88-
<Compile Include="Models\Author.cs" />
89-
<Compile Include="Models\Branch.cs" />
90-
<Compile Include="Models\BranchCreate.cs" />
91-
<Compile Include="Models\BranchRemovalStatus.cs" />
92-
<Compile Include="Models\Comment.cs" />
93-
<Compile Include="Models\Commit.cs" />
94-
<Compile Include="Models\CommitInfo.cs" />
95-
<Compile Include="Models\CommitStatus.cs" />
96-
<Compile Include="Models\CompareInfo.cs" />
97-
<Compile Include="Models\Diff.cs" />
98-
<Compile Include="Models\FileData.cs" />
99-
<Compile Include="Models\FileDelete.cs" />
100-
<Compile Include="Models\FileUpsert.cs" />
101-
<Compile Include="IJobsClient.cs" />
102-
<Compile Include="Models\Issue.cs" />
103-
<Compile Include="Models\Job.cs" />
104-
<Compile Include="Models\MergeCommitMessage.cs" />
105-
<Compile Include="Models\MergeRequest.cs" />
106-
<Compile Include="Models\MergeRequestChanges.cs" />
107-
<Compile Include="Models\MergeRequestComment.cs" />
108-
<Compile Include="Models\MergeRequestCreate.cs" />
109-
<Compile Include="Models\MergeRequestFileData.cs" />
110-
<Compile Include="Models\MergeRequestState.cs" />
111-
<Compile Include="Models\MergeRequestUpdate.cs" />
112-
<Compile Include="Models\Milestone.cs" />
113-
<Compile Include="Models\Namespaces.cs" />
114-
<Compile Include="Models\Namespace.cs" />
115-
<Compile Include="Models\ObjectType.cs" />
116-
<Compile Include="Models\PersonInfo.cs" />
117-
<Compile Include="Models\Pipeline.cs" />
118-
<Compile Include="Models\PipelineData.cs" />
119-
<Compile Include="Models\Project.cs" />
120-
<Compile Include="Models\ProjectCreate.cs" />
121-
<Compile Include="Models\ProjectSnippetUpdate.cs" />
122-
<Compile Include="Models\ProjectSnippetInsert.cs" />
123-
<Compile Include="Models\ProjectSnippet.cs" />
124-
<Compile Include="Models\ProjectHook.cs" />
125-
<Compile Include="Models\ProjectHookUpdate.cs" />
126-
<Compile Include="Models\ProjectHookInsert.cs" />
127-
<Compile Include="Models\Session.cs" />
128-
<Compile Include="Models\SingleCommit.cs" />
129-
<Compile Include="Models\Tag.cs" />
130-
<Compile Include="Models\TagCreate.cs" />
131-
<Compile Include="Models\TreeOrBlob.cs" />
132-
<Compile Include="Models\User.cs" />
133-
<Compile Include="Models\UserUpsert.cs" />
134-
<Compile Include="Models\VisibilityLevel.cs" />
135-
<Compile Include="Properties\AssemblyInfo.cs" />
136-
<Compile Include="Sha1.cs" />
137-
<Compile Include="INamespaceClient.cs" />
138-
<Compile Include="Impl\NamespaceClient.cs" />
139-
<Compile Include="Models\NamespaceCreate.cs" />
31+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
32+
<Reference Include="System.ComponentModel.DataAnnotations" />
33+
<Reference Include="Microsoft.CSharp" />
34+
<Reference Include="System.Runtime.Serialization" />
35+
<Reference Include="System.Web" />
36+
<Reference Include="System.Xml" />
14037
</ItemGroup>
14138
<ItemGroup>
142-
<None Include="packages.config" />
39+
<Folder Include="Properties\" />
14340
</ItemGroup>
144-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
145-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
146-
Other similar extension points exist, see Microsoft.Common.targets.
147-
<Target Name="BeforeBuild">
148-
</Target>
149-
<Target Name="AfterBuild">
150-
</Target>
151-
-->
152-
</Project>
41+
42+
</Project>

NGitLab/NGitLab/Properties/AssemblyInfo.cs

-18
This file was deleted.

NGitLab/NGitLab/packages.config

-4
This file was deleted.

0 commit comments

Comments
 (0)