Unable to load one or more of the requested types

2019-04-24 15:22:20.210 FATAL NServiceBus.GenericHost Exception when starting endpoint.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at System.Linq.Enumerable.d__172.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at NServiceBus.Hosting.Profiles.ProfileManager.ActivateProfileHandlers(EndpointConfiguration config) in C:\BuildAgent\work\3fdd02ec65f005b\src\NServiceBus.Hosting.Windows\Profiles\ProfileManager.cs:line 104 at NServiceBus.GenericHost.PerformConfiguration(Action1 moreConfiguration) in C:\BuildAgent\work\3fdd02ec65f005b\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 82
at NServiceBus.GenericHost.d__1.MoveNext() in C:\BuildAgent\work\3fdd02ec65f005b\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 0

Hi, the stacktrace that you posted includes the following

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Did you take a look at this property?

Yes. NServiceBus.Hosting.Helpers.AssemblyScanner Could not enumerate all types for ‘PurchaseOrderSubscriber, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’. The same package was able to scan in Nservicebus v5

You mentioned v5. Have you changed the major version of NServiceBus lately? If yes, have you recompiled PurchaseOrderSubscriber (of course if it depends on NServiceBus library).