-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rider] formatting on save not working since 0.28.0 #1266
Comments
There have been issues with csharpier server trying to use a reserved windows port, I'm not sure if linux has something similar - #1249 (comment). What happens if you run I did add an option to bypass csharpier server to VS, I'll probably add that option to rider + vscode as well. I've also considered automatically falling back to the older way of communicating. |
Some quick research shows that while Linux (all operating systems, in fact) have the concept of the dynamic/ephemeral port range, it seems like Windows is the only one that will block users from binding to those ports. |
formatting does not work with or without it. Errors did not became more meaningful, it's still just:
I also noticed this at the start:
|
Also having this issue using Rider on Windows. I saw this PR #1329 so I tried turning off VS Code and it seems to work now. If there's a problem with finding an unused port in addition to the problem in #1329 we use this code snippet that might be of help to find an unused port? /// <summary>
/// Tries to get the TCP port in the specified range that is currently unused.
/// </summary>
/// <returns>True if the unusedPort is set, otherwise false.</returns>
public bool TryGetUnusedTcpPort(int start, int end, out int unusedPort)
{
var usedPorts = new HashSet<int>();
var properties = IPGlobalProperties.GetIPGlobalProperties();
var activeTcpListeners = properties.GetActiveTcpListeners();
var activeUdpListeners = properties.GetActiveUdpListeners();
var activeConnections = properties.GetActiveTcpConnections();
for (int port = start; port < end; port++)
{
if (!usedPorts.Contains(port)
&& activeTcpListeners.All(c => c.Port != port)
&& activeUdpListeners.All(c => c.Port != port)
&& activeConnections.All(c => c.LocalEndPoint.Port != port))
{
unusedPort = port;
usedPorts.Add(port);
return true;
}
}
unusedPort = default;
return false;
} |
Environments
will NOT be the same as the extension version
.config/dotnet-tools.json
Log Output
before update:
after update
Steps to reproduce
Downgrading to 0.27.3 works, manual formatting trough terminal works, action does not work with the same problem:
The text was updated successfully, but these errors were encountered: