Browse Source

发布时未能正常加载依赖bug修复

lifa 1 year ago
parent
commit
4186c46577

+ 5 - 0
ZhonTai.sln

@@ -27,6 +27,11 @@ EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZhonTai.ApiUI", "src\platform\ZhonTai.ApiUI\ZhonTai.ApiUI.csproj", "{A6911102-A4F8-4000-A997-045F84F73060}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiTui.Host", "src\hosts\DiTui.Host\DiTui.Host.csproj", "{5202EA7B-B985-4237-9629-883A76ABD359}"
+	ProjectSection(ProjectDependencies) = postProject
+		{6F47A41A-085E-4422-BB73-5A2CBAA07D9F} = {6F47A41A-085E-4422-BB73-5A2CBAA07D9F}
+		{97D32A49-994C-44C5-A167-51E71D173B6F} = {97D32A49-994C-44C5-A167-51E71D173B6F}
+		{BDD8E9DB-896C-4340-A7E6-DFE341DE86C2} = {BDD8E9DB-896C-4340-A7E6-DFE341DE86C2}
+	EndProjectSection
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

+ 4 - 4
src/hosts/DiTui.Host/Configs/dbconfig.json

@@ -21,12 +21,12 @@
   //MySql "Server=localhost; Port=3306; Database=mysql; Uid=root; Pwd=pwd; Charset=utf8mb4;SslMode=none;Min pool size=1"
   //SqlServer "Data Source=.;User Id=sa;Password=pwd;Initial Catalog=master;TrustServerCertificate=true;Pooling=true;Min Pool Size=1"
   //PostgreSQL "Host=localhost;Port=5432;Username=postgres;Password=; Database=postgres;Pooling=true;Minimum Pool Size=1",
-  "createDbConnectionString": "Server=localhost; Port=3306; Database=mysql; Uid=root; Pwd=pwd; Charset=utf8mb4;",
+  "createDbConnectionString": "Server=192.144.191.50; Port=3306; Database=jiujiu_zhongjie5; Uid=jiujiu_zhongjie5; Pwd=EjmCA6Ff4bSmKk32; Charset=utf8mb4;",
   //建库脚本,复杂建库脚本可放到createdbsql.txt中
   //MySql "CREATE DATABASE `admindb` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'"
   //SqlServer "CREATE DATABASE [admindb]"
   //PostgreSQL "CREATE DATABASE \"admindb\" WITH ENCODING = 'UTF8'"
-  "createDbSql": "CREATE DATABASE `admindb` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'",
+  "createDbSql": "CREATE DATABASE `jiujiu_zhongjie5` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'",
 
   //同步结构
   "syncStructure": true,
@@ -57,13 +57,13 @@
 
   //数据库配置 https://github.com/dotnetcore/FreeSql/wiki/入门
   //数据库类型 MySql = 0, SqlServer = 1, PostgreSQL = 2, Oracle = 3, Sqlite = 4, OdbcOracle = 5, OdbcSqlServer = 6, OdbcMySql = 7, OdbcPostgreSQL = 8, Odbc = 9, OdbcDameng = 10, MsAccess = 11, Dameng = 12, OdbcKingbaseES = 13, ShenTong = 14, KingbaseES = 15, Firebird = 16
-  "type": "Sqlite",
+  "type": "MySql",
   //连接字符串
   //MySql "Server=localhost; Port=3306; Database=admindb; Uid=root; Pwd=pwd; Charset=utf8mb4;SslMode=none;Min pool size=1"
   //SqlServer "Data Source=.;User Id=sa;Password=pwd;Initial Catalog=admindb;TrustServerCertificate=true;Pooling=true;Min Pool Size=1"
   //PostgreSQL "Host=localhost;Port=5432;Username=postgres;Password=; Database=admindb;Pooling=true;Minimum Pool Size=1"
   //Sqlite "Data Source=|DataDirectory|\\admindb.db; Pooling=true;Min Pool Size=1"
-  "connectionString": "Data Source=|DataDirectory|\\admindb.db; Pooling=true;Min Pool Size=1",
+  "connectionString": "Server=192.144.191.50; Port=3306; Database=jiujiu_zhongjie5; Uid=jiujiu_zhongjie5; Pwd=EjmCA6Ff4bSmKk32; Charset=utf8mb4;SslMode=none;Min pool size=1",
 
   //指定程序集
   //FreeSql.MySql.MySqlProvider`1,FreeSql.Provider.MySqlConnector

+ 24 - 8
src/hosts/DiTui.Host/DiTui.Host.csproj

@@ -2,6 +2,7 @@
 	<PropertyGroup>
 		<TargetFramework>net7.0</TargetFramework>
 		<Description>中台接口宿主</Description>
+		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
 	</PropertyGroup>
 
 	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -16,13 +17,21 @@
 	</ItemGroup>
 
 	<ItemGroup Condition="'$(Configuration)'=='Debug'">
-		<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.693" />
-		<PackageReference Include="FreeSql.Provider.SqlServer" Version="3.2.693" />
-		<PackageReference Include="FreeSql.Provider.PostgreSQL" Version="3.2.693" />
-		<PackageReference Include="FreeSql.Provider.Oracle" Version="3.2.693" />
-		<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.693" />
-		<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.693" />
+		<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.695">
+		  <GeneratePathProperty></GeneratePathProperty>
+		</PackageReference>
+		<PackageReference Include="FreeSql.Provider.SqlServer" Version="3.2.695" />
+		<PackageReference Include="FreeSql.Provider.PostgreSQL" Version="3.2.695" />
+		<PackageReference Include="FreeSql.Provider.Oracle" Version="3.2.695" />
+		<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.695" />
+		<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.695" />
 	</ItemGroup>
+
+	<ItemGroup >
+		<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.695"/>
+		<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.695" />
+	</ItemGroup>
+	
 	
 	<ItemGroup>
 		<ProjectReference Include="..\..\platform\ZhonTai.Admin\ZhonTai.Admin.csproj" />
@@ -34,12 +43,19 @@
 	</ItemGroup>
 
 	<ItemGroup>
-		<PackageReference Include="DotNetCore.CAP.Dashboard" Version="7.1.1" />
-		<PackageReference Include="DotNetCore.CAP.InMemoryStorage" Version="7.1.1" />
+		<PackageReference Include="DotNetCore.CAP.Dashboard" Version="7.1.2" />
+		<PackageReference Include="DotNetCore.CAP.InMemoryStorage" Version="7.1.2" />
+		<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.15.0" />
 		<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="7.0.0" />
 		<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
 	</ItemGroup>
 
+	<ItemGroup>
+	  <Reference Include="FreeSql.Provider.MySql">
+	    <HintPath>C:\Users\Frank\.nuget\packages\freesql.provider.mysql\3.2.695\lib\net452\FreeSql.Provider.MySql.dll</HintPath>
+	  </Reference>
+	</ItemGroup>
+
 	<ItemGroup>
 		<Content Update="wwwroot\*\*">
 			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 5 - 5
src/hosts/ZhonTai.Host/Configs/dbconfig.json

@@ -21,12 +21,12 @@
   //MySql "Server=localhost; Port=3306; Database=mysql; Uid=root; Pwd=pwd; Charset=utf8mb4;SslMode=none;Min pool size=1"
   //SqlServer "Data Source=.;User Id=sa;Password=pwd;Initial Catalog=master;TrustServerCertificate=true;Pooling=true;Min Pool Size=1"
   //PostgreSQL "Host=localhost;Port=5432;Username=postgres;Password=; Database=postgres;Pooling=true;Minimum Pool Size=1",
-  "createDbConnectionString": "Server=localhost; Port=3306; Database=mysql; Uid=root; Pwd=pwd; Charset=utf8mb4;",
+  "createDbConnectionString": "Server=192.144.191.50; Port=3306; Database=jiujiu_zhongjie5; Uid=jiujiu_zhongjie5; Pwd=EjmCA6Ff4bSmKk32; Charset=utf8mb4;",
   //建库脚本,复杂建库脚本可放到createdbsql.txt中
   //MySql "CREATE DATABASE `admindb` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'"
   //SqlServer "CREATE DATABASE [admindb]"
   //PostgreSQL "CREATE DATABASE \"admindb\" WITH ENCODING = 'UTF8'"
-  "createDbSql": "CREATE DATABASE `admindb` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'",
+  "createDbSql": "CREATE DATABASE `jiujiu_zhongjie5` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'",
 
   //同步结构
   "syncStructure": true,
@@ -57,17 +57,17 @@
 
   //数据库配置 https://github.com/dotnetcore/FreeSql/wiki/入门
   //数据库类型 MySql = 0, SqlServer = 1, PostgreSQL = 2, Oracle = 3, Sqlite = 4, OdbcOracle = 5, OdbcSqlServer = 6, OdbcMySql = 7, OdbcPostgreSQL = 8, Odbc = 9, OdbcDameng = 10, MsAccess = 11, Dameng = 12, OdbcKingbaseES = 13, ShenTong = 14, KingbaseES = 15, Firebird = 16
-  "type": "Sqlite",
+  "type": "MySql",
   //连接字符串
   //MySql "Server=localhost; Port=3306; Database=admindb; Uid=root; Pwd=pwd; Charset=utf8mb4;SslMode=none;Min pool size=1"
   //SqlServer "Data Source=.;User Id=sa;Password=pwd;Initial Catalog=admindb;TrustServerCertificate=true;Pooling=true;Min Pool Size=1"
   //PostgreSQL "Host=localhost;Port=5432;Username=postgres;Password=; Database=admindb;Pooling=true;Minimum Pool Size=1"
   //Sqlite "Data Source=|DataDirectory|\\admindb.db; Pooling=true;Min Pool Size=1"
-  "connectionString": "Data Source=|DataDirectory|\\admindb.db; Pooling=true;Min Pool Size=1",
+  "connectionString": "Server=192.144.191.50; Port=3306; Database=jiujiu_zhongjie5; Uid=jiujiu_zhongjie5; Pwd=EjmCA6Ff4bSmKk32; Charset=utf8mb4;SslMode=none;Min pool size=1",
 
   //指定程序集
   //FreeSql.MySql.MySqlProvider`1,FreeSql.Provider.MySqlConnector
-  "providerType": "",
+  "providerType": "FreeSql.Provider.MySqlConnector",
 
   //读写分离从库列表
   "slaveList": [

+ 5 - 0
src/hosts/ZhonTai.Host/ZhonTai.Host.csproj

@@ -23,6 +23,11 @@
 		<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.693" />
 		<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.693" />
 	</ItemGroup>
+
+	<ItemGroup>
+		<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.693" />
+		<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.693" />
+	</ItemGroup>
 	
 	<ItemGroup>
 		<ProjectReference Include="..\..\platform\ZhonTai.Admin\ZhonTai.Admin.csproj" />