diff --git a/OpenSim.Modules.Currency/NSLCertificateTools.cs b/OpenSim.Modules.Currency/NSLCertificateTools.cs index b0c3034..caaeca1 100644 --- a/OpenSim.Modules.Currency/NSLCertificateTools.cs +++ b/OpenSim.Modules.Currency/NSLCertificateTools.cs @@ -75,7 +75,10 @@ namespace NSL.Certificate.Tools public void SetPrivateCert(string certfile, string passwd) { try { + +#pragma warning disable SYSLIB0057 // Use X509CertificateLoader instead to load certificates (.NET9) m_mycert = new X509Certificate2(certfile, passwd); +#pragma warning restore SYSLIB0057 } catch (Exception ex) { m_mycert = null; @@ -100,7 +103,9 @@ namespace NSL.Certificate.Tools public void SetPrivateCA(string certfile) { try { +#pragma warning disable SYSLIB0057 // Use X509CertificateLoader instead to load certificates (.NET9) m_cacert = new X509Certificate2(certfile); +#pragma warning restore SYSLIB0057 } catch (Exception ex) { m_cacert = null; diff --git a/OpenSim.Modules.Currency/NSLXmlRpc.cs b/OpenSim.Modules.Currency/NSLXmlRpc.cs index 025236a..095f7ff 100644 --- a/OpenSim.Modules.Currency/NSLXmlRpc.cs +++ b/OpenSim.Modules.Currency/NSLXmlRpc.cs @@ -48,9 +48,9 @@ namespace NSL.Network.XmlRpc { m_log.InfoFormat("[MONEY NSL XMLRPC]: XmlRpcResponse certSend: connect to {0}", url); -//#pragma warning disable SYSLIB0014 // Use HttpClient instead of WebRequest.Create. +#pragma warning disable SYSLIB0014 // Use HttpClient instead of WebRequest.Create. HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); -//#pragma warning restore SYSLIB0014 +#pragma warning restore SYSLIB0014 if (request==null) { throw new XmlRpcException(XmlRpcErrorCodes.TRANSPORT_ERROR, XmlRpcErrorCodes.TRANSPORT_ERROR_MSG +": Could not create request with " + url); } diff --git a/build.net.sh b/build.net.sh index f30d813..ebbca89 100755 --- a/build.net.sh +++ b/build.net.sh @@ -1,23 +1,31 @@ #!/bin/bash +# +# Usage ... ./build.net.sh [dotnet_version] +# + +DOTNETVER=9.0 CONFIGPATH=./config OPNSIMPATH=../bin -DOTNETVER=9 -echo "===================" -echo "DTL/NSL_CURRENCY" -echo "===================" +echo "====================" +echo " DTL/NSL_CURRENCY" +echo "====================" + +if [ "$1" != "" ]; then + DOTNETVER=$1 +fi ./clean.sh ./runprebuild.net.sh $DOTNETVER dotnet build -c Release OpenSim.Currency.sln || exit 1 echo -cp -f bin/net${DOTNETVER}.0/OpenSim.Data.MySQL.MySQLMoneyDataWrapper.dll $OPNSIMPATH -cp -f bin/net${DOTNETVER}.0/OpenSim.Modules.Currency.dll $OPNSIMPATH -cp -f bin/net${DOTNETVER}.0/MoneyServer.dll $OPNSIMPATH -cp -f bin/net${DOTNETVER}.0/MoneyServer $OPNSIMPATH -cp -f bin/net${DOTNETVER}.0/MoneyServer.runtimeconfig.json $OPNSIMPATH +cp -f bin/net${DOTNETVER}/OpenSim.Data.MySQL.MySQLMoneyDataWrapper.dll $OPNSIMPATH +cp -f bin/net${DOTNETVER}/OpenSim.Modules.Currency.dll $OPNSIMPATH +cp -f bin/net${DOTNETVER}/MoneyServer.dll $OPNSIMPATH +cp -f bin/net${DOTNETVER}/MoneyServer $OPNSIMPATH +cp -f bin/net${DOTNETVER}/MoneyServer.runtimeconfig.json $OPNSIMPATH # rm -f $OPNSIMPATH/OpenSim.Forge.Currency.dll diff --git a/runprebuild.net.sh b/runprebuild.net.sh index c90394a..752114e 100755 --- a/runprebuild.net.sh +++ b/runprebuild.net.sh @@ -1,12 +1,12 @@ #!/bin/bash # -DOTNETVER=8 +DOTNETVER=9.0 if [ "$1" != "" ]; then DOTNETVER=$1 fi +VER=`echo $DOTNETVER | sed -e "s/\./_/"` echo y | dotnet ../bin/prebuild.dll /file prebuild.net.xml /clean - -dotnet ../bin/prebuild.dll /target vs2022 /targetframework net${DOTNETVER}_0 /excludedir = "obj | bin" /file prebuild.net.xml +dotnet ../bin/prebuild.dll /target vs2022 /targetframework net${VER} /excludedir = "obj | bin" /file prebuild.net.xml