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

Remove extra usings #7193

Merged
merged 5 commits into from
Jan 24, 2022
Merged

Remove extra usings #7193

merged 5 commits into from
Jan 24, 2022

Conversation

Forgind
Copy link
Member

@Forgind Forgind commented Jan 1, 2022

Basically just made all the warnings in VS related to unnecessary using statements go away.

@rainersigwald
Copy link
Member

I love removing the ones that are really unused, but the added #ifs are pretty ugly and don't seem to me worth the effort. What motivated this?

@Forgind
Copy link
Member Author

Forgind commented Jan 4, 2022

I love removing the ones that are really unused, but the added #ifs are pretty ugly and don't seem to me worth the effort. What motivated this?

When there's some error in VS, and building fails, I end up scrolling through a long list of warnings about unused using statements before I get to the real problem. It isn't a huge deal to me, but it is a little annoying.

@elachlan
Copy link
Contributor

elachlan commented Jan 8, 2022

Thanks for doing this Forgind. It makes actual warnings that need to be addressed more obvious.

@elachlan
Copy link
Contributor

This PR now has conflicts. I am pretty excited for zero warnings.

Comment on lines 13 to 15
#if NETCOREAPP
using System.Linq;
#endif
Copy link
Member

Choose a reason for hiding this comment

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

We can fix this to just actually remove the need: remove FEATURE_TYPE_GETINTERFACE since it's available in all targets now.

Comment on lines 7 to 9
#if FEATURE_CULTUREINFO_CONSOLE_FALLBACK
using System.Globalization;
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this is now available everywhere too, so we can delete the feature flag.

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jan 24, 2022
@ladipro ladipro merged commit 1179b2e into dotnet:main Jan 24, 2022
@rainersigwald
Copy link
Member

Just ran into a couple of these and tried enabling the warning for all files (dotnet/roslyn#41640 (comment)):

150 Warning(s)

This doesn't bother me personally but there's more potential cleanup.

@Forgind Forgind deleted the remove-extra-usings branch March 10, 2022 19:43
@Forgind
Copy link
Member Author

Forgind commented Mar 10, 2022

I'm assuming you ran build.cmd after setting that? Those are presumably all warnings in the 18 projects that aren't part of MSBuild.Dev.slnf, so they don't bother me.

@rainersigwald
Copy link
Member

They are all in the core projects, looks like:

S:\msbuild\src\StringTools\InternableString.Simple.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\StringTools\StringTools.csproj]
S:\msbuild\src\Framework\AssemblyUtilities.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\AssemblyUtilities.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\ErrorUtilities.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\NativeMethods.cs(13,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\Sdk\SdkResultItem.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\Traits.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\ErrorUtilities.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\FileClassifier.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\FileClassifier.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\FileClassifier.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\NativeMethods.cs(13,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\Sdk\SdkResultItem.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\VisualStudioLocationHelper.cs(3,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Framework\Traits.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Framework\Microsoft.Build.Framework.csproj]
S:\msbuild\src\Utilities\ProcessorArchitecture.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\TaskItem.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs(8,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\EscapingUtilities.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\EventArgsFormatting.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\InprocTrackingNativeMethods.cs(15,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\RegistryDelegates.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\RegistryDelegates.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\ProcessorArchitecture.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\TaskItem.cs(8,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\TrackedDependencies\CanonicalTrackedFilesHelper.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\TrackedDependencies\CanonicalTrackedInputFiles.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\TrackedDependencies\CanonicalTrackedOutputFiles.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\TrackedDependencies\DependencyTableCache.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Utilities\TrackedDependencies\FlatTrackingData.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\EscapingUtilities.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\EventArgsFormatting.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\FrameworkLocationHelper.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Utilities\Microsoft.Build.Utilities.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\TaskParameterTypeVerifier.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\TaskParameter.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\CommunicationsUtilities.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Logging\EvaluationLoggingContext.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\RequestBuilder\FullTracking.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Scheduler\Scheduler.cs(18,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Scheduler\SchedulingData.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Scheduler\SchedulingPlan.cs(13,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\SdkResolution\CachingSdkResolverService.cs(12,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.IncludeOperation.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.UpdateOperation.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.cs(12,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.RemoveOperation.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Instance\RunningObjectTable.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Graph\ProjectGraph.cs(18,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\TranslatorExtensions.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\NodeProviderOutOfProc.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs(26,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\NodeProviderInProc.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Definition\ToolsetConfigurationReader.cs(14,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\Conditionals\Scanner.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\IntrinsicFunctions.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\IntrinsicFunctions.cs(8,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\IntrinsicFunctions.cs(15,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Globbing\MSBuildGlob.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Globbing\MSBuildGlob.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Instance\HostServices.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Instance\ProjectInstance.cs(26,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.LazyItemOperation.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BinaryLogger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(14,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(18,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\ParallelLogger\ConsoleOutputAligner.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\ParallelLogger\ParallelConsoleLogger.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Utilities\EngineFileUtilities.cs(12,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\EscapingUtilities.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\EventArgsFormatting.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\FrameworkLocationHelper.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\CoreCLRAssemblyLoader.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\XMakeAttributes.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\StrongNameHelpers.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\EscapingUtilities.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\AssemblyDependency\CopyLocalState.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ResolveComReference.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ResolveComReference.cs(18,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\CreateVisualBasicManifestResourceName.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ManifestUtil\MetadataReader.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ManifestUtil\SecurityUtil.cs(4,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ManifestUtil\TrustInfo.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ResGenDependencies.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ResGenDependencies.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ResolveKeySource.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ResolveKeySource.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ResolveKeySource.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\system.design\stronglytypedresourcebuilder.cs(26,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\WriteCodeFragment.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\WriteCodeFragment.cs(14,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\CodeTaskFactory.cs(8,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\TaskParameterTypeVerifier.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Logging\EvaluationLoggingContext.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Scheduler\Scheduler.cs(18,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Scheduler\SchedulingData.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Scheduler\SchedulingPlan.cs(13,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\SdkResolution\CachingSdkResolverService.cs(12,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Collections\RetrievableEntryHashSet\HashSet.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.cs(12,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.UpdateOperation.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.IncludeOperation.cs(9,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.RemoveOperation.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Graph\ProjectGraph.cs(18,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\NodeProviderOutOfProc.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\TranslatorExtensions.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs(12,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs(26,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Definition\ToolsetConfigurationReader.cs(14,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\Conditionals\Scanner.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\ExpressionShredder.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Globbing\MSBuildGlob.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Instance\ProjectInstance.cs(26,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Evaluation\LazyItemEvaluator.LazyItemOperation.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BinaryLogger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(14,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\BinaryLogger\BuildEventArgsWriter.cs(18,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\ParallelLogger\ConsoleOutputAligner.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Logging\ParallelLogger\ParallelConsoleLogger.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Build\Utilities\EngineFileUtilities.cs(12,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\EscapingUtilities.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\EventArgsFormatting.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\InprocTrackingNativeMethods.cs(15,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\XMakeAttributes.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Build\Microsoft.Build.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\Debugging\PrintLineDebugger.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs(8,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\RegistryDelegates.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\RegistryDelegates.cs(10,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Shared\EscapingUtilities.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\AssemblyDependency\CopyLocalState.cs(5,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\AssemblyFolder.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\CreateVisualBasicManifestResourceName.cs(7,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\LockCheck.cs(11,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\XamlTaskFactory\XamlTaskFactory.cs(23,5): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\AssemblyDependency\GlobalAssemblyCache.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]
S:\msbuild\src\Tasks\ComReference.cs(6,1): warning IDE0005: Using directive is unnecessary. [S:\msbuild\src\Tasks\Microsoft.Build.Tasks.csproj]

@Forgind
Copy link
Member Author

Forgind commented Mar 10, 2022

Interesting; not sure why they aren't showing up in VS, then. If it starts bothering me, I might make another PR; I'm assuming this wasn't bothering you; it was just something you noticed.

@stan-sz
Copy link
Contributor

stan-sz commented Sep 5, 2022

Per the documentation for the rule and the linked dotnet/roslyn#41640 (comment), setting this property globally will turn on the rule at the build time:

<PropertyGroup>
  <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

JaynieBai pushed a commit that referenced this pull request Jan 10, 2023
Fixes #7193

Context
Enforce no unused usings in the code

Changes Made
Removed or conditionalized using statements as reported by the compiler. Set property to true.

Testing
Local build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants