MessageQueue.GetPrivateQueuesByMachineName() returns an array of MessageQueue objects.
When executed on a workgroup computer, passing the name of a remote computer, the returned MessageQueue objects throw an exception when their FormatName property is accessed:
System.Messaging.MessageQueueException (0x80004005): Invalid queue path name.
This is a regression, because accessing this property worked in .NET 2.0 and 4.0.
When the FormatName property getter is viewed in ILSpy/Reflector, the difference between .NET 4.5 and earlier is obvious. For the case where queue path is in fact a format name, previous versions did a simple substring operation (to strip the FormatName: prefix). In .NET 4.5, the code is more complicated and ultimately calls the native MQPathNameToFormatName API - which does not support remote paths in workgroup mode and returns an error, causing the exception to be thrown.
Note that the code path which results in a call to MQPathNameToFormatName is taken because GetPrivateQueuesByMachineName sets a private field named queuePath. The MessageQueue constructor does not do this, so for queues constructed from a format name by user code this error does not occur.