Unable to use UDP port {messagingPort} for VS/Unity messaging

This continues to be an issue in 2022LTS - previous posts have ended up in legacy topics now in this %$£"&:confused: new forum/messaging board.

Getting console messages on every startup and perhaps more often: “Unable to use UDP port {messagingPort} for VS/Unity messaging…”

It appears to be an issue with the VisualStudioIntegration.cs in the visualstudio package.
Which is also marked Copyright MS so do we have to take it up with MS?!

There have been suggestions of looking at the firewall settings but surely that would have been taken into account…! Do we have to add access for each Unity version to stop this warning?

This is how the code chooses a port (different per process I guess, so Unity version?!):

private static int DebuggingPort()
{
	return 56000 + (System.Diagnostics.Process.GetCurrentProcess().Id % 1000);
}

private static int MessagingPort()
{
	return DebuggingPort() + 2;
}

Previous topic: Unity Editor has not permission on UDP port - Questions & Answers - Unity Discussions

Manual fixing of firewall seems relevant - but why would it be required on default Windows 11 settings?!

For Unity the default Inbound rules for Unity are allow for Domain profile, disable for Public profile. Allowing for public profile may be the fix - but so why is not enabled on install? Bug?

Bump still happening: Unable to use UDP port 56618 for VS/Unity messaging. You should check if another process is already bound to this port or if your firewall settings are compatible