【升级】升级到.net6

main
walon 2021-11-09 10:08:49 +08:00
parent 3612d4e2d8
commit 66db58d3fb
15 changed files with 85 additions and 25 deletions

View File

@ -29,16 +29,8 @@ luban相较于常规的excel导表工具有以下核心优势
- 通用型生成工具。也可以用于生成协议、数据库之类的代码,甚至可以用作对象缓存服务。
## 文档
- [主页](https://focus-creative-games.github.io/luban/index.html)
- [特性](docs/traits.md)
- [快速上手](docs/start_up.md)
- [wiki](https://github.com/focus-creative-games/luban/wiki)。 有使用疑问请先查看此wiki。
- [Excel 配置数据简介](docs/data_excel.md)
- [client&server安装与使用说明](docs/luban_install_manual.md)
- [本地化](docs/l10n.md)
- [文档目录](docs/catalog.md)
- [完整手册](docs/manual.md)
- [wiki](https://github.com/focus-creative-games/luban/wiki) 有使用疑问请先查看此wiki。
- **示例项目** ([github](https://github.com/focus-creative-games/luban_examples)) ([gitee](https://gitee.com/focus-creative-games/luban_examples))
- [版本变更记录](https://github.com/focus-creative-games/luban/wiki/%E7%89%88%E6%9C%AC%E5%8F%98%E6%9B%B4%E8%AE%B0%E5%BD%95)
@ -898,7 +890,7 @@ println(tables.TbItem.Get(12).Name)
## 开发环境架设
- 安装 [VS2019 社区版](https://visualstudio.microsoft.com/zh-hans/vs/)
- 安装 [.dotnet core sdk 5.0](https://dotnet.microsoft.com/download/dotnet/5.0)
- 安装 [.dotnet core sdk 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
## 安装与使用

View File

@ -2,7 +2,7 @@
## 安装
1. dotnet sdk 5.0
1. [dotnet sdk 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
1. 下载luban_examples项目
下载项目 [luban_examples](https://github.com/focus-creative-games/luban_examples)。

View File

@ -2,7 +2,11 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<StartupObject>Luban.Client.Program</StartupObject>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
@ -11,6 +15,13 @@
<None Remove="Scripts\**" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
</ItemGroup>

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 as build
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
WORKDIR /app/Luban.Common
COPY Luban.Common/*.csproj ./
@ -14,7 +14,7 @@ COPY nuget.config ./nuget.config
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS runtime
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/Luban.Client/out ./

View File

@ -2,9 +2,20 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<StartupObject>Luban.ClientServer.Program</StartupObject>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Luban.Client\Luban.Client.csproj" />
<ProjectReference Include="..\Luban.Server\Luban.Server.csproj" />

View File

@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>

View File

@ -2,7 +2,9 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>

View File

@ -1,7 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
@ -10,6 +13,13 @@
<None Remove="Source\TypeVisitors\Proto\**" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="Scriban" Version="4.1.0" />

View File

@ -2,7 +2,10 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
@ -11,6 +14,13 @@
<None Remove="Source\TypeVisitors\Proto\**" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Luban.Job.Common\Luban.Job.Common.csproj" />
</ItemGroup>

View File

@ -2,7 +2,10 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
@ -11,6 +14,13 @@
<None Remove="Source\TypeVisitors\**" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Luban.Job.Common\Luban.Job.Common.csproj" />
</ItemGroup>

View File

@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>

View File

@ -2,7 +2,10 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageProjectUrl>https://github.com/focus-creative-games/luban</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -24,6 +27,13 @@
<None Remove="Scripts\**" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="ExcelDataReader" Version="3.6.0" />

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 as build
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
WORKDIR /app/Luban.Common
COPY Luban.Common/*.csproj ./
@ -40,7 +40,7 @@ COPY nuget.config ./nuget.config
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS runtime
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS runtime
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
WORKDIR /app
COPY --from=build /app/Luban.Server/out ./

View File

@ -97,7 +97,7 @@
<OutputPath>bin\Debug\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>TRACE;DEBUG;VSTO40,LUBAN_LITE</DefineConstants>
<WarningLevel>4</WarningLevel>
<WarningLevel>3</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<!--