PHOENIXCONTACT/MORYX-Framework

HeardOfGold crashes if no hosting is available as package

Closed this issue · 2 comments

Describe the bug
With .NET 5 we introduced optional hosting WCF or ASP. If the application targets .NET5 it raises NullReferenceException while activate the hosting in a module.

Expected behavior
As a minimal behavior, I expect a clean exception what I have to do or what is missing. The better option will be that the module shipps the required dependency (as reference)

@Toxantron what do you think?

Another suggestion: A backup NullHosting strategy that logs an error or similar. Application starts, but I have no endpoints.

The NullHosting could also create a crashlog: "Hosting dependency found but no hosting installed" and then close the application.

@Toxantron can we close this as we moved to the asp hosting anyway?