Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Issues with latest NetServer Core release

Hello,

With the latest NetServer core releases with noticed a few issues:

1. When adding the latest 'SuperOffice.NetServer.Core' nuget package to an empty/new C# project the folllowing error is logged on startup:

Level:   Error
At:      09:28:13

Element:
Message: Unable to load one or more of the requested types from assembly. Missing dependencies?
Type:    SuperOffice.Factory.TypeFactoriesCollection
Details:
Failed to parse Assembly 'SoMail, Version=9.2.0.0, Culture=neutral, PublicKeyToken=bdda2d694ae22a86', file:///C:/Users/All-CRM/source/repos/TestNetServerCore/bin/Debug/SoMail.DLL
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Exceptions from type loader:
Could not load file or assembly 'AngleSharp.Css, Version=0.14.2.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'AngleSharp.Css, Version=0.14.2.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'AngleSharp.Css, Version=0.14.2.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'MailKit, Version=2.1.0.0, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b' or one of its dependencies. The system cannot find the file specified.
Concerning types:
OutlookStorage
OutlookDataObject
OutputFormat
MailSanitizer
MailAddress
MailAttachment
MailEnvelope
MailFolder
MailItem
MailSoInfo
IMailSoInfoProvider
MimeKitHelper
MailAttachmentSummary
MailSortCriterion
ISoIncomingMailInterface
SoMailFolder
SoMailFolderInfo
ISoMailParser
ISoOutgoingMailInterface
AsponseInitializer
DocToHtml
MailItemVisitor
MsgParser
SoEasyMailAttachment
SoEasyMailHelper
SoEasyMailWrapper
SoEasyMailOutgoingMail
SoMailKitHelper
SoMailKitOutgoingMail
SomailParser
SomParser
IncomingMailAttribute
MailParserAttribute
OutgoingMailAttribute
CustomProxySocket
CalendarMimeTypeVisitor
IniFileParser
IOverwritable`1
IDeepCloneable`1
StringBuffer
IniDataParser
IniDataCaseInsensitive
IniData
Property
PropertyCollection
Section
SectionCollection
IniParserConfiguration
IIniScheme
IniScheme
DnsMx
ConnectSpec
ConnectSpecs
AutoResolver
GetBaseDomain
HtmlTruncater
<PrivateImplementationDetails>
CLZF
NativeMethods
ReferenceManager
RecipientType
Attachment
Message
Recipient
NativeMethods
<>c
<>c
<>c__DisplayClass10_0
<>c
<>c
CertState
<>c
<>c__DisplayClass10_0
MessageSet
<>c__DisplayClass30_0
<>c
<>c__DisplayClass35_0
<>c__DisplayClass81_0
<>c__DisplayClass81_1
Range
<GetEnumerator>d__19
<GetEnumerator>d__16
EDuplicatePropertiesBehaviour
QueryOptions
QueryTypes
MXRecord
<>c
TldPatterns
__StaticArrayInitTypeSize=1024
STGM
IEnumSTATSTG
ILockBytes
IStorage
FILEDESCRIPTORA
FILEDESCRIPTORW
FILEGROUPDESCRIPTORA
FILEGROUPDESCRIPTORW
ILockBytes
IStorage
POINTL
SIZEL

Environment info:
SingleThreadMode:               False
LoadingAssembly:                SoDataBase
Version:                        SuperOffice 9.2 R3 NetServer 9.2 Release (Build: Release92_C-2020.12.09-02)
Version.Assembly:               9.2.0.0
Version.File:                   9.2.7648.1007
Version.BuildLabel:             Release92_C-2020.12.09-02
ContextIdentifier:              Default
MachineName:                    PC-ONTW-1
StackTrace:                        at SuperOffice.Diagnostics.SoLogger.LogError(Type sourceType, String message, String details)
   at SuperOffice.Factory.TypeFactoriesCollection.ParseAssembly(Assembly assembly)
   at SuperOffice.Factory.TypeFactoriesCollection.CurrentDomain_AssemblyLoad(Object sender, AssemblyLoadEventArgs args)
   at System.AppDomain.OnAssemblyLoadEvent(RuntimeAssembly LoadedAssembly)
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at SuperOffice.Factory.TypeFactoriesCollection.ParseAssembly(Assembly assembly)
   at SuperOffice.Factory.TypeFactoriesCollection.LoadAssembly(String assemblyName)
   at SuperOffice.Factory.TypeFactoriesCollection.ParseConfiguration()
   at SuperOffice.Factory.ClassFactory..cctor()
   at SuperOffice.Factory.ClassFactory.Init()
   at SuperOffice.SoContext.Authenticate(SecurityToken[] tokens)
   at SuperOffice.SoSession.Authenticate(String user, String password)
   at TestNetServerCore.Program.Main(String[] args) in C:\Users\All-CRM\source\repos\TestNetServerCore\Program.cs:line 16

ClassFactoryState:              Initializing
EntryAssembly:                  file:///C:/Users/All-CRM/source/repos/TestNetServerCore/bin/Debug/TestNetServerCore.exe


-------------------------

 

2. The AssemblyVersion of 'SuperOffice.CD.DSL.Implementation' and 'SuperOffice.CD.DSL.Database' has been changed to '0.0.0.0' instead of the SuperOffice build version. This is kinda annoying when using BindingRedirects.

 

Could this be fixed in a new NuGet release?

 

 

RE: Issues with latest NetServer Core release

Oh dear... 

I tested these prior to deploying and did not observe any errors. I'll look into this...

To reproduce this, just create a single console app with SuperOffice.NetServer.Core, or was there more to reproduce the error?

 

~Tony

By: Tony Yates 15 Dec 2020

RE: Issues with latest NetServer Core release

Hello Tony,

Yes just create an console app and add the NuGet package.

By: David Hollegien 15 Dec 2020

RE: Issues with latest NetServer Core release

HI David, 

I started with a clean console app, installed just the SuperOffice.NetServer.Core package and am able to successfully authenticate into a local SuperOfice installation.

Here is a copy of my packages.config file...

Here are my runtime assemblyBindings...

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.6.0.0" newVersion="5.6.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="HtmlSanitizer" publicKeyToken="61c49a1a9e79cc28" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="AngleSharp" publicKeyToken="e83494dcdc6d31ea" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-0.9.9.0" newVersion="0.9.9.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Help me reproduce what you are observing...

 

By: Tony Yates 15 Dec 2020

RE: Issues with latest NetServer Core release

Hello Tony,

Sorry, had to clarify, authenticating works fine! Its just the error mentioned is logged on startup everytime

By: David Hollegien 15 Dec 2020

RE: Issues with latest NetServer Core release

Ah right! A new nuget package could fix the SoMail dependencies... nothing like adding a few more explicit dependencies.. 

The CDD assembly version though.. that's trickier... would change the whole version line up, etc... 

 

By: Tony Yates 15 Dec 2020

RE: Issues with latest NetServer Core release

A fix for the dependencies would be great! AssemblyBinding issue with the CDD dll's is annoying but workable.

Just curious why it was set to 0.0.0.0?

By: David Hollegien 15 Dec 2020

RE: Issues with latest NetServer Core release

New packages with fixed dependencies are being deployed as I type...

The AssemblyVersion problem however, which has been around since v8.5.7437.11 (7 months ago), is logged as a bug and will get fixed for January release. BUG 77702

Reasoning: Possibly related to certificate update around the same timeframe.

Thanks for reporting this! 

Best regards.

By: Tony Yates 15 Dec 2020

RE: Issues with latest NetServer Core release

Thank Tony, tried the latest package and no errors now!

By: David Hollegien 15 Dec 2020