question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[WIP] Breaking changes in dotnet-format 6.x

See original GitHub issue
  • We are moving into the .NET 6 SDK (See https://github.com/dotnet/format/issues/1268). There will be no need to install dotnet-format as a global tool or local tool.
  • As part of the move into the .NET SDK, we have changed our command line options. (see https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-format)
  • Organize imports was moved from being a whitespace formatter to running as a code style formatter.
  • CodeStyle and 3rd Party Analyzers will only run if they are specifically configured in your .editorconfig.
  • Default severity for CodeStyle and 3rd Party Analysis is now warning.
  • We now use the highest version .NET 6 SDK that is installed rather than trying to match the global.json configuration.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
DavidZidarcommented, Jan 31, 2022

@JoeRobich Hi, please consider reverting that last bullet point:

We now use the highest version .NET 6 SDK that is installed rather than trying to match the global.json configuration.

It seems to break dotnet format completely when preview versions are installed because it is now trying to load the wrong assemblies. See #1500 for logs. When a project has a global.json file in place there is probably a very good reason why, don’t side step that and use a different SDK version than what is asked for.

4reactions
alirezanetcommented, Dec 25, 2021

Hi @JoeRobich, I’m the maintainer of Husky.Net tool, as feedback, you have more breaking changes in the v6. In big projects using dotnet-format is a real pain, it takes a lot of time to complete. This is one of the reasons that I created Husky.Net. usually, people only want to format changed files( or staged files). In the previous versions (e.g v5) we could’ve easily limited the dotnet-format working area to the specific files using --include but in the last version looks like dotnet-format doing something else in the background and don’t respect that option.

dotnet format --include folder/targetFile.cs

The expected behavior is ignoring everything else except the target file. or providing an option to change its behavior. This is the biggest downside of v6 in my opinion. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking changes in .NET 6
NET 6, the breaking changes listed here might affect you. Changes are grouped by technology area, such as ASP.NET Core or Windows Forms....
Read more >
Automatically version and release .Net Application
In this post you will see how to automatically version and release a .Net Application using GitHub Actions.
Read more >
NET breaking changes reference
Use this reference section to find breaking changes that might apply to you if you're upgrading your app to a newer version of...
Read more >
Deprecations and removals by version | GitLab
Each deprecated feature will be removed in a future release. Some features cause breaking changes when they are removed. On GitLab.com, deprecated features...
Read more >
Breaking changes and .NET libraries
A binary breaking change happens when you change the public API of your library, so assemblies compiled against older versions of your library ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found