Skip to content

Conversation

@adegeo
Copy link
Contributor

@adegeo adegeo commented Sep 23, 2021

Summary

  • Changed references to <ImplicitUsings>
  • Split some of the other features into sections to clarify
  • Update the MSBuild property reference.

Fixes #26146

@gewarren @BillWagner @DamianEdwards

For most users, you need take no action. However, this change can cause type-name conflicts with the namespaces that are implicitly included. If that happens, modify the list of `global using` directives or fully qualify your type references. You can modify the list of `global using` directives in several ways:

- Disable the feature completely by setting `<DisableImplicitNamespaceImports>` to `true` in the project file. For more information, see [DisableImplicitNamespaceImports](../../../project-sdk/msbuild-props.md#disableimplicitnamespaceimports).
- Disable the feature completely by setting `<ImplicitUsings>` to `false` in the project file. For more information, see [ImplicitUsings](../../../project-sdk/msbuild-props.md#implicitusings).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that we should update this specific article. It is specific to .NET 6 Preview 7, as noted in the intro, and so it refers to the older syntax (that was changed in RC 1).

Copy link
Contributor

@tdykstra tdykstra Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it would make sense to leave this stuck at Preview 7. It's effectively an article about changes introduced in .NET 6, and after GA it will cover what's different from 5.0 to 6.0.
EDIT: I was thinking this comment was about the top-level-templates article, but I think this article too could be rewritten to function as .NET 5 to .NET 6 GA.

Copy link
Contributor

@gewarren gewarren Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more complicated than that. Preview 7 turned on implicit usings for new and existing projects. RC 1 introduced a new breaking change where implicit usings were disabled for existing projects. So that single breaking change article really is specific to Preview 7. The new syntax is already covered in the RC 1 breaking change article at https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/implicit-namespaces-rc1. And since it's only enabled for new projects going forward, that's not considered a breaking change - so both breaking change articles should be deleted once .NET 6 GAs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revert this file.

@adegeo adegeo enabled auto-merge (squash) September 24, 2021 00:44
@adegeo adegeo requested a review from gewarren September 24, 2021 00:45
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @adegeo

You can :shipit: when ready.

@adegeo adegeo merged commit a853815 into main Sep 24, 2021
@adegeo adegeo deleted the adegeo-26146-toplevel branch September 24, 2021 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update tutorial for changes to implicit usings in .NET 6 rc.1

5 participants