From cd26c6ca87c9af2c9a83ca13a1ec7185e4c9d5d9 Mon Sep 17 00:00:00 2001 From: CWX Date: Mon, 10 Feb 2025 16:08:56 +0000 Subject: [PATCH] Update mods to be a SDK.Web project and output library, this enables some features used by ASPNET --- Libraries/SptAssets/SptAssets.csproj | 2 +- .../SptDependencyInjection/SptDependencyInjection.csproj | 3 ++- ModExamples/10CustomRoute/10CustomRoute.csproj | 3 ++- .../11RegisterClassesInDI/11RegisterClassesInDI.csproj | 3 ++- ModExamples/12Bundle/12Bundle.csproj | 3 ++- .../13AddTraderWithAssortJson.csproj | 3 ++- ModExamples/14AfterDBLoadHook/14AfterDBLoadHook.csproj | 3 ++- .../15HttpListenerExample/15HttpListenerExample.csproj | 5 +++-- ModExamples/15HttpListenerExample/HttpListenerExample.cs | 4 ++-- ModExamples/1Logging/1Logging.csproj | 3 ++- ModExamples/2EditDatabase/2EditDatabase.csproj | 3 ++- ModExamples/3EditSptConfig/3EditSptConfig.csproj | 3 ++- .../4ReadCustomJson5Config/4ReadCustomJson5Config.csproj | 3 ++- .../5ReadCustomJsonConfig/5ReadCustomJsonConfig.csproj | 3 ++- ModExamples/6OverrideMethod/6OverrideMethod.csproj | 3 ++- ModExamples/7UseMultipleClasses/7UseMultipleClasses.csproj | 3 ++- ModExamples/8OnLoad/8OnLoad.csproj | 3 ++- ModExamples/9OnUpdate/9OnUpdate.csproj | 3 ++- SptCommon/SptCommon.csproj | 3 ++- .../HideoutCraftQuestIdGenerator.csproj | 2 +- 20 files changed, 39 insertions(+), 22 deletions(-) diff --git a/Libraries/SptAssets/SptAssets.csproj b/Libraries/SptAssets/SptAssets.csproj index 5e8c5371..49e41b0a 100644 --- a/Libraries/SptAssets/SptAssets.csproj +++ b/Libraries/SptAssets/SptAssets.csproj @@ -1,10 +1,10 @@  - Library net9.0 enable enable + Library diff --git a/Libraries/SptDependencyInjection/SptDependencyInjection.csproj b/Libraries/SptDependencyInjection/SptDependencyInjection.csproj index 60bfcbe3..79275ee6 100644 --- a/Libraries/SptDependencyInjection/SptDependencyInjection.csproj +++ b/Libraries/SptDependencyInjection/SptDependencyInjection.csproj @@ -1,9 +1,10 @@ - + net9.0 enable enable + Library diff --git a/ModExamples/10CustomRoute/10CustomRoute.csproj b/ModExamples/10CustomRoute/10CustomRoute.csproj index 40b29f01..df681316 100644 --- a/ModExamples/10CustomRoute/10CustomRoute.csproj +++ b/ModExamples/10CustomRoute/10CustomRoute.csproj @@ -1,10 +1,11 @@ - + net9.0 _10CustomRoute enable enable + Library diff --git a/ModExamples/11RegisterClassesInDI/11RegisterClassesInDI.csproj b/ModExamples/11RegisterClassesInDI/11RegisterClassesInDI.csproj index d6570672..abd6c9a9 100644 --- a/ModExamples/11RegisterClassesInDI/11RegisterClassesInDI.csproj +++ b/ModExamples/11RegisterClassesInDI/11RegisterClassesInDI.csproj @@ -1,10 +1,11 @@ - + net9.0 _11RegisterClassesInDI enable enable + Library diff --git a/ModExamples/12Bundle/12Bundle.csproj b/ModExamples/12Bundle/12Bundle.csproj index 50fab8a5..88b0cf75 100644 --- a/ModExamples/12Bundle/12Bundle.csproj +++ b/ModExamples/12Bundle/12Bundle.csproj @@ -1,10 +1,11 @@ - + net9.0 _12Bundle enable enable + Library diff --git a/ModExamples/13AddTraderWithAssortJson/13AddTraderWithAssortJson.csproj b/ModExamples/13AddTraderWithAssortJson/13AddTraderWithAssortJson.csproj index ba95a92e..44f26dd0 100644 --- a/ModExamples/13AddTraderWithAssortJson/13AddTraderWithAssortJson.csproj +++ b/ModExamples/13AddTraderWithAssortJson/13AddTraderWithAssortJson.csproj @@ -1,10 +1,11 @@ - + net9.0 _13AddTraderWithAssortJson enable enable + Library diff --git a/ModExamples/14AfterDBLoadHook/14AfterDBLoadHook.csproj b/ModExamples/14AfterDBLoadHook/14AfterDBLoadHook.csproj index 2dcb91d8..ec2ea84e 100644 --- a/ModExamples/14AfterDBLoadHook/14AfterDBLoadHook.csproj +++ b/ModExamples/14AfterDBLoadHook/14AfterDBLoadHook.csproj @@ -1,10 +1,11 @@ - + net9.0 _14AfterDBLoadHook enable enable + Library diff --git a/ModExamples/15HttpListenerExample/15HttpListenerExample.csproj b/ModExamples/15HttpListenerExample/15HttpListenerExample.csproj index 27c194cc..1f876bea 100644 --- a/ModExamples/15HttpListenerExample/15HttpListenerExample.csproj +++ b/ModExamples/15HttpListenerExample/15HttpListenerExample.csproj @@ -1,10 +1,11 @@ - + net9.0 _15HttpListenerExample enable enable + Library @@ -29,6 +30,6 @@ - + diff --git a/ModExamples/15HttpListenerExample/HttpListenerExample.cs b/ModExamples/15HttpListenerExample/HttpListenerExample.cs index 1b644a6f..47cd9ee0 100644 --- a/ModExamples/15HttpListenerExample/HttpListenerExample.cs +++ b/ModExamples/15HttpListenerExample/HttpListenerExample.cs @@ -1,6 +1,5 @@ using System.Text; using Core.Servers.Http; -using Microsoft.AspNetCore.Http; using SptCommon.Annotations; namespace _15HttpListenerExample; @@ -17,6 +16,7 @@ public class HttpListenerExample : IHttpListener { resp.StatusCode = 200; resp.Body.WriteAsync(Encoding.UTF8.GetBytes("[1] This is the first example of a mod hooking into the HttpServer")).AsTask().Wait(); - resp. + resp.StartAsync().Wait(); + resp.CompleteAsync().Wait(); } } diff --git a/ModExamples/1Logging/1Logging.csproj b/ModExamples/1Logging/1Logging.csproj index c34a4a82..4a559a9b 100644 --- a/ModExamples/1Logging/1Logging.csproj +++ b/ModExamples/1Logging/1Logging.csproj @@ -1,10 +1,11 @@ - + net9.0 _1Logging enable enable + Library diff --git a/ModExamples/2EditDatabase/2EditDatabase.csproj b/ModExamples/2EditDatabase/2EditDatabase.csproj index ae5c2b6b..ede84417 100644 --- a/ModExamples/2EditDatabase/2EditDatabase.csproj +++ b/ModExamples/2EditDatabase/2EditDatabase.csproj @@ -1,10 +1,11 @@ - + net9.0 _2EditDatabase enable enable + Library diff --git a/ModExamples/3EditSptConfig/3EditSptConfig.csproj b/ModExamples/3EditSptConfig/3EditSptConfig.csproj index f4c94218..94beab90 100644 --- a/ModExamples/3EditSptConfig/3EditSptConfig.csproj +++ b/ModExamples/3EditSptConfig/3EditSptConfig.csproj @@ -1,10 +1,11 @@ - + net9.0 _3EditSptConfig enable enable + Library diff --git a/ModExamples/4ReadCustomJson5Config/4ReadCustomJson5Config.csproj b/ModExamples/4ReadCustomJson5Config/4ReadCustomJson5Config.csproj index 16b2cbef..1cb28085 100644 --- a/ModExamples/4ReadCustomJson5Config/4ReadCustomJson5Config.csproj +++ b/ModExamples/4ReadCustomJson5Config/4ReadCustomJson5Config.csproj @@ -1,10 +1,11 @@ - + net9.0 _4ReadCustomJson5Config enable enable + Library diff --git a/ModExamples/5ReadCustomJsonConfig/5ReadCustomJsonConfig.csproj b/ModExamples/5ReadCustomJsonConfig/5ReadCustomJsonConfig.csproj index 97140f9f..4c5726ff 100644 --- a/ModExamples/5ReadCustomJsonConfig/5ReadCustomJsonConfig.csproj +++ b/ModExamples/5ReadCustomJsonConfig/5ReadCustomJsonConfig.csproj @@ -1,10 +1,11 @@ - + net9.0 _5ReadCustomJsonConfig enable enable + Library diff --git a/ModExamples/6OverrideMethod/6OverrideMethod.csproj b/ModExamples/6OverrideMethod/6OverrideMethod.csproj index 446f3b1b..db736a68 100644 --- a/ModExamples/6OverrideMethod/6OverrideMethod.csproj +++ b/ModExamples/6OverrideMethod/6OverrideMethod.csproj @@ -1,10 +1,11 @@ - + net9.0 _6OverrideMethod enable enable + Library diff --git a/ModExamples/7UseMultipleClasses/7UseMultipleClasses.csproj b/ModExamples/7UseMultipleClasses/7UseMultipleClasses.csproj index c81c2fb4..b1b7cd95 100644 --- a/ModExamples/7UseMultipleClasses/7UseMultipleClasses.csproj +++ b/ModExamples/7UseMultipleClasses/7UseMultipleClasses.csproj @@ -1,10 +1,11 @@ - + net9.0 _7UseMultipleClasses enable enable + Library diff --git a/ModExamples/8OnLoad/8OnLoad.csproj b/ModExamples/8OnLoad/8OnLoad.csproj index 3025943c..a8027f8f 100644 --- a/ModExamples/8OnLoad/8OnLoad.csproj +++ b/ModExamples/8OnLoad/8OnLoad.csproj @@ -1,10 +1,11 @@ - + net9.0 _8OnLoad enable enable + Library diff --git a/ModExamples/9OnUpdate/9OnUpdate.csproj b/ModExamples/9OnUpdate/9OnUpdate.csproj index 4ae0ad98..4ca6da00 100644 --- a/ModExamples/9OnUpdate/9OnUpdate.csproj +++ b/ModExamples/9OnUpdate/9OnUpdate.csproj @@ -1,10 +1,11 @@ - + net9.0 _9OnUpdate enable enable + Library diff --git a/SptCommon/SptCommon.csproj b/SptCommon/SptCommon.csproj index 125f4c93..03517360 100644 --- a/SptCommon/SptCommon.csproj +++ b/SptCommon/SptCommon.csproj @@ -1,9 +1,10 @@ - + net9.0 enable enable + Library diff --git a/Tools/HideoutCraftQuestIdGenerator/HideoutCraftQuestIdGenerator.csproj b/Tools/HideoutCraftQuestIdGenerator/HideoutCraftQuestIdGenerator.csproj index 3e9aed02..07491a81 100644 --- a/Tools/HideoutCraftQuestIdGenerator/HideoutCraftQuestIdGenerator.csproj +++ b/Tools/HideoutCraftQuestIdGenerator/HideoutCraftQuestIdGenerator.csproj @@ -3,10 +3,10 @@ true false - Exe net9.0 enable enable + Exe