修改各版本命名空间和语言版本

This commit is contained in:
xjm 2021-01-26 16:35:16 +08:00
parent 9d2f4cc7e0
commit 51b544ce06
11 changed files with 81 additions and 5 deletions

14
Directory.Build.props Normal file
View File

@ -0,0 +1,14 @@
<Project>
<PropertyGroup>
<!--默认统一输出XML注释文档不需要输出的项目可以单独关闭-->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>xuejmnet</Authors>
<RepositoryUrl>https://github.com/xuejmnet/sharding-core</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Company>xuejm</Company>
<LangVersion>8.0</LangVersion>
<Description>easy sharding for efcore 2.x 3.x 5.x lib.</Description>
</PropertyGroup>
</Project>

12
clear.bat Normal file
View File

@ -0,0 +1,12 @@
::删除所有bin与obj下的文件
@echo off
set nowpath=%cd%
cd \
cd %nowpath%
::delete specify file(*.pdb,*.vshost.*)
for /r %nowpath% %%i in (*.pdb,*.vshost.*) do (del %%i && echo delete %%i)
::delete specify folder(obj,bin)
for /r %nowpath% %%i in (obj,bin) do (IF EXIST %%i (RD /s /q %%i && echo delete %%i))
pause

33
nuget-publish.bat Normal file
View File

@ -0,0 +1,33 @@
:start
::定义版本
set EFCORE2=2.0.0.1
set EFCORE3=3.0.0.1
set EFCORE5=5.0.0.1
::删除所有bin与obj下的文件
@echo off
echo input nuget api key
set /p apiKey=
IF "apiKey"=="" (
ECHO No NuGet API key provided &goto :start
)
set nowpath=%cd%
cd \
cd %nowpath%
::delete specify file(*.pdb,*.vshost.*)
for /r %nowpath% %%i in (*.pdb,*.vshost.*) do (del %%i && echo delete %%i)
::delete specify folder(obj,bin)
for /r %nowpath% %%i in (obj,bin) do (IF EXIST %%i (RD /s /q %%i && echo delete %%i))
echo 清理完成
::构建
dotnet build -c Release
::推送
for /r %nowpath% %%i in (*.nupkg) do (dotnet nuget push %%i -k %apiKey% --source https://api.nuget.org/v3/index.json)
echo 完成
pause

View File

@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
@ -7,6 +7,8 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants> <DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<AssemblyName>ShardingCore</AssemblyName>
<RootNamespace>ShardingCore</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
@ -6,6 +6,8 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants> <DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<AssemblyName>ShardingCore.MySql</AssemblyName>
<RootNamespace>ShardingCore.MySql</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
@ -7,6 +7,8 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants> <DefineConstants>TRACE;DEBUG;EFCORE2;</DefineConstants>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<AssemblyName>ShardingCore.SqlServer</AssemblyName>
<RootNamespace>ShardingCore.SqlServer</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
@ -7,6 +7,8 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants> <DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<AssemblyName>ShardingCore</AssemblyName>
<RootNamespace>ShardingCore</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

View File

@ -6,6 +6,7 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants> <DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<AssemblyName>ShardingCore.MySql</AssemblyName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
@ -7,6 +7,8 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants> <DefineConstants>TRACE;DEBUG;EFCORE3;</DefineConstants>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<AssemblyName>ShardingCore.SqlServer</AssemblyName>
<RootNamespace>ShardingCore.SqlServer</RootNamespace>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

View File

@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -9,6 +10,10 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Xunit.DependencyInjection" Version="7.1.0" /> <PackageReference Include="Xunit.DependencyInjection" Version="7.1.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>