Skip to content

Commit b55ed80

Browse files
author
xiaozhiqing.xzq
committed
Support .NET Standard2.0, Compatible .NET Framework4.0.
1 parent 5cc7f38 commit b55ed80

18 files changed

+1486
-1675
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.user
55
*.userosscache
66
*.sln.docstates
7+
.idea
78

89
packages
910
.DS_Store

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@
3232
- 支持全局二级索引(GlobalIndex)
3333
- 支持原子增
3434

35-
## 版本号 5.0.0 日期:2020/08/15
35+
## 版本号 5.0.0 日期:2022/08/15
3636
### 变更内容
3737
- 多元索引支持统计聚合功能(Aggregation & GroupBy)
3838
- 多元索引支持创建虚拟列、日期列
3939
- 多元索引支持索引TTL
4040
- 支持SQL查询
41+
42+
## 版本号 6.0.0 日期:2022/08/23
43+
### 变更内容
44+
- 支持netstandard2.0框架
45+
- 兼容net40框架

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
- 阿里云表格存储是构建在阿里云飞天分布式系统之上的NoSQL数据存储服务,提供海量结构化数据的存储和实时访问。
1010

1111
## 版本
12-
- 当前版本:5.0.0
12+
- 当前版本:6.0.0
1313

1414
## 运行环境
1515
### Windows
1616
- 适用于`.NET 4.0` 及以上版本
17+
- 适用于`.NETSTANDARD2.0`及以上版本
1718
- 适用于`Visual Studio 2010`及以上版本
1819

1920
## 注意事项

aliyun-tablestore-csharp-sdk.sln

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.32630.194
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk", "sdk\aliyun-tablestore-sdk.csproj", "{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}"
7-
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk-test", "test\aliyun-tablestore-sdk-test.csproj", "{F30E0874-399A-4FBD-B72B-74EE36B31AF6}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aliyun-tablestore-sdk", "sdk\aliyun-tablestore-sdk.csproj", "{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}"
97
EndProject
108
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk-sample", "sample\aliyun-tablestore-sdk-sample.csproj", "{D151C869-BC8F-4465-9460-5103A25D21E9}"
9+
ProjectSection(ProjectDependencies) = postProject
10+
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B} = {AB5EFCA2-53A9-42B5-861E-3FD6F865036B}
11+
EndProjectSection
12+
EndProject
13+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aliyun-tablestore-sdk-netcore-sample", "sample\aliyun-tablestore-sdk-netcore-sample.csproj", "{19084237-90AD-4BDF-B0A9-B4A51B6931DA}"
14+
EndProject
15+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aliyun-tablestore-sdk-netcore-test", "test\aliyun-tablestore-sdk-netcore-test.csproj", "{629D7B33-F623-4663-A8F1-0B9280B781FC}"
1116
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "internalTest", "internalTest\internalTest.csproj", "{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}"
17+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk-test", "test\aliyun-tablestore-sdk-test.csproj", "{9D7540C1-72D3-496E-AB6E-29534A06C037}"
1318
EndProject
1419
Global
1520
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -21,18 +26,22 @@ Global
2126
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}.Debug|Any CPU.Build.0 = Debug|Any CPU
2227
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}.Release|Any CPU.ActiveCfg = Release|Any CPU
2328
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}.Release|Any CPU.Build.0 = Release|Any CPU
24-
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25-
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
26-
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
27-
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Release|Any CPU.Build.0 = Release|Any CPU
2829
{D151C869-BC8F-4465-9460-5103A25D21E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2930
{D151C869-BC8F-4465-9460-5103A25D21E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
3031
{D151C869-BC8F-4465-9460-5103A25D21E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
3132
{D151C869-BC8F-4465-9460-5103A25D21E9}.Release|Any CPU.Build.0 = Release|Any CPU
32-
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33-
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
34-
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
35-
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Release|Any CPU.Build.0 = Release|Any CPU
3645
EndGlobalSection
3746
GlobalSection(SolutionProperties) = preSolution
3847
HideSolutionNode = FALSE

sample/App.config

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

sample/Properties/AssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// 控制。更改这些特性值可修改
77
// 与程序集关联的信息。
88
[assembly: AssemblyTitle("Aliyun.TableStore.Samples")]
9-
[assembly: AssemblyDescription("Aliyun TableStore SDK Samples for .NET.")]
9+
[assembly: AssemblyDescription("Aliyun TableStore SDK Samples for .NETSTANDARD2.0 and .NET40.")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Alibaba Cloud Computing")]
1212
[assembly: AssemblyProduct("Aliyun.TableStore")]
13-
[assembly: AssemblyCopyright("Copyright (c) 2009-2016 aliyun.com")]
13+
[assembly: AssemblyCopyright("Copyright (c) 2009-2022 aliyun.com")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,5 +32,5 @@
3232
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
3333
// 方法是按如下所示使用“*”: :
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("3.1.0")]
36-
[assembly: AssemblyFileVersion("3.1.0")]
35+
[assembly: AssemblyVersion("6.0.0")]
36+
[assembly: AssemblyFileVersion("6.0.0")]

sample/Samples/SearchIndexSample.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,11 @@ public static void GroupBy(OTSClient otsClient)
770770
groupByGeoDistance.FieldName = Geo_type_col;
771771
groupByGeoDistance.GroupByName = "groupByGeoDistance";
772772
groupByGeoDistance.Origin = new GeoPoint(0, 0);
773-
groupByGeoDistance.Ranges = new List<Range>()
773+
groupByGeoDistance.Ranges = new List<DataModel.Search.GroupBy.Range>()
774774
{
775-
new Range(double.MinValue, 100.0),
776-
new Range(100.0, 1000.0),
777-
new Range(1000.0, double.MaxValue)
775+
new DataModel.Search.GroupBy.Range(double.MinValue, 100.0),
776+
new DataModel.Search.GroupBy.Range(100.0, 1000.0),
777+
new DataModel.Search.GroupBy.Range(1000.0, double.MaxValue)
778778
};
779779

780780
GroupByHistogram groupByHistogram = new GroupByHistogram();
@@ -787,11 +787,11 @@ public static void GroupBy(OTSClient otsClient)
787787
GroupByRange groupByRange = new GroupByRange();
788788
groupByRange.GroupByName = "groupByRange";
789789
groupByRange.FieldName = Long_type_col;
790-
groupByRange.Ranges = new List<Range>()
790+
groupByRange.Ranges = new List<DataModel.Search.GroupBy.Range>()
791791
{
792-
new Range(0 , 5),
793-
new Range(5,10),
794-
new Range(10, double.MaxValue)
792+
new DataModel.Search.GroupBy.Range(0 , 5),
793+
new DataModel.Search.GroupBy.Range(5,10),
794+
new DataModel.Search.GroupBy.Range(10, double.MaxValue)
795795
};
796796

797797
GroupByResults results = GroupByRunner(otsClient, groupByField, groupByFilter, groupByGeoDistance, groupByHistogram, groupByRange);
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
7+
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
8+
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
9+
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
10+
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
11+
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
12+
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
13+
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
14+
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
15+
<AppDesignerFolder>Properties</AppDesignerFolder>
16+
<AssemblyName>Aliyun.OTS.Samples</AssemblyName>
17+
</PropertyGroup>
18+
<PropertyGroup>
19+
<RootNamespace>Aliyun.OSS.Samples</RootNamespace>
20+
<StartupObject>Aliyun.OTS.Samples.Samples.SearchIndexSample</StartupObject>
21+
</PropertyGroup>
22+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
23+
<WarningLevel>5</WarningLevel>
24+
</PropertyGroup>
25+
<ItemGroup>
26+
<None Remove="packages.config" />
27+
</ItemGroup>
28+
29+
<ItemGroup>
30+
<Compile Include="Config.cs" />
31+
<Compile Include="Program.cs" />
32+
<Compile Include="Properties\AssemblyInfo.cs" />
33+
<Compile Include="Samples\AtomicIncrementSample.cs" />
34+
<Compile Include="Samples\AutoIncrementSample.cs" />
35+
<Compile Include="Samples\ClientInitialize.cs" />
36+
<Compile Include="Samples\GlobalIndexSample.cs" />
37+
<Compile Include="Samples\MultiRowReadWriteSample.cs" />
38+
<Compile Include="Samples\ConditionUpdateSample.cs" />
39+
<Compile Include="Samples\SearchIndexGeoSample.cs" />
40+
<Compile Include="Samples\SearchIndexSample.cs" />
41+
<Compile Include="Samples\SearchIndexPageSample.cs" />
42+
<Compile Include="Samples\SingleRowReadWriteSample.cs" />
43+
<Compile Include="Samples\CreateTableSample.cs" />
44+
<Compile Include="Samples\SQLSample.cs" />
45+
</ItemGroup>
46+
47+
<ItemGroup>
48+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
49+
</ItemGroup>
50+
51+
<ItemGroup>
52+
<ProjectReference Include="..\sdk\aliyun-tablestore-sdk.csproj" />
53+
</ItemGroup>
54+
55+
</Project>
Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProjectGuid>{D151C869-BC8F-4465-9460-5103A25D21E9}</ProjectGuid>
88
<OutputType>Exe</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
109
<RootNamespace>Aliyun.OTS.Samples</RootNamespace>
11-
<AssemblyName>Aliyun.TableStore.Sample</AssemblyName>
10+
<AssemblyName>Aliyun.TableStore.Net40.Sample</AssemblyName>
11+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
13-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14-
<TargetFrameworkProfile />
15-
<ProductVersion>8.0.30703</ProductVersion>
16-
<SchemaVersion>2.0</SchemaVersion>
13+
<Deterministic>true</Deterministic>
1714
<PublishUrl>publish\</PublishUrl>
1815
<Install>true</Install>
1916
<InstallFrom>Disk</InstallFrom>
@@ -26,11 +23,14 @@
2623
<MapFileExtensions>true</MapFileExtensions>
2724
<ApplicationRevision>0</ApplicationRevision>
2825
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
29-
<IsWebBootstrapper>false</IsWebBootstrapper>
3026
<UseApplicationTrust>false</UseApplicationTrust>
3127
<BootstrapperEnabled>true</BootstrapperEnabled>
28+
<ProductVersion>8.0.30703</ProductVersion>
29+
<SchemaVersion>2.0</SchemaVersion>
30+
<ProjectAssetsFile>notexistfile</ProjectAssetsFile>
3231
</PropertyGroup>
3332
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
33+
<PlatformTarget>AnyCPU</PlatformTarget>
3434
<DebugSymbols>true</DebugSymbols>
3535
<DebugType>full</DebugType>
3636
<Optimize>false</Optimize>
@@ -49,11 +49,10 @@
4949
<WarningLevel>4</WarningLevel>
5050
</PropertyGroup>
5151
<PropertyGroup>
52-
<StartupObject>Aliyun.OTS.Samples.Program</StartupObject>
52+
<StartupObject>Aliyun.OTS.Samples.Samples.SearchIndexSample</StartupObject>
5353
</PropertyGroup>
5454
<ItemGroup>
5555
<Compile Include="Config.cs" />
56-
<Compile Include="Program.cs" />
5756
<Compile Include="Properties\AssemblyInfo.cs" />
5857
<Compile Include="Samples\AtomicIncrementSample.cs" />
5958
<Compile Include="Samples\AutoIncrementSample.cs" />
@@ -69,34 +68,25 @@
6968
<Compile Include="Samples\SQLSample.cs" />
7069
</ItemGroup>
7170
<ItemGroup>
72-
<None Include="App.config" />
73-
<None Include="packages.config" />
74-
</ItemGroup>
75-
<ItemGroup>
76-
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
77-
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
71+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
72+
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
7873
</Reference>
7974
<Reference Include="System" />
75+
<Reference Include="System.Core" />
76+
<Reference Include="System.Xml.Linq" />
77+
<Reference Include="System.Data.DataSetExtensions" />
78+
<Reference Include="Microsoft.CSharp" />
79+
<Reference Include="System.Data" />
80+
<Reference Include="System.Xml" />
81+
</ItemGroup>
82+
<ItemGroup>
83+
<Compile Include="Program.cs" />
8084
</ItemGroup>
8185
<ItemGroup>
8286
<ProjectReference Include="..\sdk\aliyun-tablestore-sdk.csproj">
83-
<Project>{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}</Project>
87+
<Project>{ab5efca2-53a9-42b5-861e-3fd6f865036b}</Project>
8488
<Name>aliyun-tablestore-sdk</Name>
8589
</ProjectReference>
8690
</ItemGroup>
87-
<ItemGroup>
88-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
89-
<Visible>False</Visible>
90-
<ProductName>.NET Framework 3.5 SP1</ProductName>
91-
<Install>false</Install>
92-
</BootstrapperPackage>
93-
</ItemGroup>
9491
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
95-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
96-
Other similar extension points exist, see Microsoft.Common.targets.
97-
<Target Name="BeforeBuild">
98-
</Target>
99-
<Target Name="AfterBuild">
100-
</Target>
101-
-->
10292
</Project>

sample/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net40" />
3+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net40" />
44
</packages>

0 commit comments

Comments
 (0)