Skip to content
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

dotnet format is in dotnet sdk since dotnet 6 #849

Closed
maxisam opened this issue Apr 16, 2024 · 4 comments
Closed

dotnet format is in dotnet sdk since dotnet 6 #849

maxisam opened this issue Apr 16, 2024 · 4 comments
Labels

Comments

@maxisam
Copy link

maxisam commented Apr 16, 2024

if (majorVersion === 6) {
dotnetClient.installTool(
'dotnet-format',
'6.*',
'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json',
);
} else if (majorVersion === 7) {
dotnetClient.installTool(
'dotnet-format',
'7.*',
'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json',
);
} else {

Question about this,

I wonder if we need this for dotnet version >= 6

according to the doc, dotnet format should be included

  if (forceToolUsage || majorVersion < 6) {
    ensureFormatToolInstalled(context, dotnetClient, majorVersion);
  }

based on above logic, it seems like only dotnet 6.0.0 - 6.0.203 or dotnet <6 might run it.

@AgentEnder
Copy link
Member

For .NET 6 - 6.203 or whatever there was a bug where we had to still use the tool

@maxisam
Copy link
Author

maxisam commented Apr 19, 2024

Thanks for explanation.

I guess this is not needed. Originally I was wonder if I need to add dotnet 8. Now I think we don't even need 7 here.

else if (majorVersion === 7) {
    dotnetClient.installTool(
      'dotnet-format',
      '7.*',
      'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json',
    );
  }

@AgentEnder
Copy link
Member

IIRC there was a different bug with earlier versions of the built in tool in the .NET 7 releases, after that was fixed I may have cleaned up when it would be required.

@AgentEnder AgentEnder closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2024
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants