I used VS 2017 with UE 4 and I’m able to package shipping builds no issue.
UE 5 initially claimed it couldn’t even find Visual Studio, so I installed VS 2019 instead.
Now, I’m still able to package UE 4 projects, but UE 5 changed it’s tune to say the following before throwing “cook failed”:
LogDirectLinkNet: Error: Endpoint 'UE5-Editor': Unable to start communication (error code:2)
EDIT: Here’s a variation when I chose to just cook stuff instead…
UATHelper: Cooking (Windows): LogDirectLinkNet: Error: Endpoint 'UE5-Editor': Unable to start communication (error code:2):
PackagingResults: Error: Endpoint 'UE5-Editor': Unable to start communication (error code:2):