Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,20 @@ Copyright (c) .NET Foundation. All rights reserved.

</ItemGroup>

<!-- C# implicit imports -->
<!-- Implicit imports -->
<ItemGroup Condition=" '$(DisableImplicitNamespaceImports_DotNet)' != 'true'
and '$(Language)' == 'C#'
and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
<Import Include="System" />
<Import Include="System.Collections.Generic" />

<!-- Imports already defined as VB implicit imports are conditioned to not be added twice -->
<Import Include="System" Condition="'$(Language)' != 'VB'" />
<Import Include="System.Collections.Generic" Condition="'$(Language)' != 'VB'" />
<Import Include="System.IO" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit.

It would be nice to sort the Import items when generating the file now that we organize them logically. We used to preserve the alphabetical order as a side effect of how they are organized but it will no longer be the case after this change. I know it's rare for users to browse to this file, but the fact that it's a visible .cs file for C# projects in the obj directory makes me want to strive for more clean looking file.

<Import Include="System.Linq" />
<Import Include="System.Linq" Condition="'$(Language)' != 'VB'" />
<Import Include="System.Net.Http" />
<Import Include="System.Threading" />
<Import Include="System.Threading.Tasks" />
<Import Include="System.Threading.Tasks" Condition="'$(Language)' != 'VB'" />

</ItemGroup>

<!-- VB implicit imports -->
Expand Down