The new implicit global usings feature added to the SDK in 6.0.100-preview.7 has caused a few issues in some important scenarios such that some changes will be made to mitigate them and generally improve its usability.
These changes are targeting 6.0.100-rc.1
Items:
Example project file content after these changes:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Using Include="My.Awesome.Namespace" />
</ItemGroup>
</Project>
The new implicit global usings feature added to the SDK in 6.0.100-preview.7 has caused a few issues in some important scenarios such that some changes will be made to mitigate them and generally improve its usability.
These changes are targeting 6.0.100-rc.1
Items:
<DisableImplicitNamespaceImports>to<ImplicitUsings><DisableImplicitNamespaceImports>property for disabling implicit namespace imports<ImplicitUsings>property to the schema file so it appears in statement completion<ImplictUsings>property is set to "true" or "enable"<ImplicitUsings>is equal to "true" or "enable"<Import>to<Using><Import>item type for specifying namespaces to import<Using>items are declared (even if<ImplicitUsings>is false)<Import>items for Visual Basic are not changed from what they were in .NET 5<Using>items to support definingusing [alias]andusing static [type]as well asusing [namespace], e.g.:<Using Include="Microsoft.AspNetCore.Http.Results" Alias="Results" />emits
global using Results = global::Microsoft.AspNetCore.Http.Results;<Using Include="Microsoft.AspNetCore.Http.Results" Static="True" />emits
global using static global::Microsoft.AspNetCore.Http.Results;<Using Include="Microsoft.AspNetCore.Http" />emits
global using global::Microsoft.AspNetCore.Http;<ImplicitUsings>enable</ImplicitUsings>in the.csprojfileExample project file content after these changes: