Add `ImplicitUsings` to Common.props (#3959)

This commit is contained in:
Timothy Mothra 2022-12-02 15:01:27 -08:00 committed by GitHub
parent dfd1f25c95
commit 6bcb70b1fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 72 additions and 5 deletions

View File

@ -6,6 +6,7 @@
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisLevel>latest-All</AnalysisLevel>
</PropertyGroup>

View File

@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -12,4 +12,13 @@
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net462'">
<!--ImplicitUsings will add this namespace that is not available for NetFX.
https://github.com/dotnet/sdk/issues/24146
https://github.com/dotnet/runtime/issues/59163
https://github.com/dotnet/sdk/issues/22515
-->
<Using Remove="System.Net.Http" />
</ItemGroup>
</Project>

View File

@ -7,6 +7,9 @@
<NoWarn>$(NoWarn),CS0618</NoWarn>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -6,6 +6,9 @@
<Description>Console exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);Console;distributed-tracing</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>

View File

@ -6,6 +6,9 @@
<Description>In-memory exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags)</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>

View File

@ -6,6 +6,9 @@
<Description>Jaeger exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);Jaeger;distributed-tracing</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>

View File

@ -5,6 +5,9 @@
<Description>OpenTelemetry protocol exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);OTLP</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<!--Do not run ApiCompat as this package has never released a stable version.

View File

@ -5,6 +5,9 @@
<Description>OpenTelemetry protocol exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);OTLP</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">

View File

@ -7,6 +7,9 @@
<PackageTags>$(PackageTags);prometheus;metrics</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<DefineConstants>$(DefineConstants);PROMETHEUS_ASPNETCORE</DefineConstants>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<!--Do not run ApiCompat as this package has never released a stable version.

View File

@ -6,6 +6,9 @@
<Description>Stand-alone HttpListener for hosting OpenTelemetry .NET Prometheus Exporter</Description>
<PackageTags>$(PackageTags);prometheus;metrics</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<!--Do not run ApiCompat as this package has never released a stable version.

View File

@ -5,6 +5,9 @@
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<Description>ZPages exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);ZPages;distributed-tracing</PackageTags>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -5,6 +5,9 @@
<Description>Zipkin exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);Zipkin;distributed-tracing</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -4,6 +4,9 @@
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Description>Contains extensions to register and start OpenTelemetry in applications using Microsoft.Extensions.Hosting</Description>
<RootNamespace>OpenTelemetry</RootNamespace>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -6,6 +6,9 @@
<PackageTags>$(PackageTags);distributed-tracing;AspNet;AspNetCore;B3</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<IncludeInstrumentationHelpers>true</IncludeInstrumentationHelpers>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -5,6 +5,9 @@
<Description>ASP.NET Core instrumentation for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);distributed-tracing;AspNetCore</PackageTags>
<IncludeDiagnosticSourceInstrumentationHelpers>true</IncludeDiagnosticSourceInstrumentationHelpers>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -5,6 +5,9 @@
<Description>gRPC for .NET client instrumentation for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);distributed-tracing</PackageTags>
<IncludeDiagnosticSourceInstrumentationHelpers>true</IncludeDiagnosticSourceInstrumentationHelpers>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -6,6 +6,9 @@
<Description>Http instrumentation for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);distributed-tracing</PackageTags>
<IncludeDiagnosticSourceInstrumentationHelpers>true</IncludeDiagnosticSourceInstrumentationHelpers>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -6,6 +6,9 @@
<Description>SqlClient instrumentation for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);distributed-tracing</PackageTags>
<IncludeDiagnosticSourceInstrumentationHelpers>true</IncludeDiagnosticSourceInstrumentationHelpers>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
@ -9,6 +9,9 @@
TODO: Disable this exception, and actually do document all public API.
-->
<NoWarn>$(NoWarn),1591</NoWarn>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -8,6 +8,9 @@
-->
<NoWarn>$(NoWarn),1591,CS0618</NoWarn>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<!-- this is temporary. will remove in future PR. -->
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>
<!--Do not run ApiCompat for netstandard2.1/net6.0 as this is newly added. Remove this property once we have released a stable version.-->

View File

@ -1,4 +1,10 @@
<Project>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net462'">
<!--ImplicitUsings will add this namespace that is not available for NetFX.
https://github.com/dotnet/sdk/issues/24146
https://github.com/dotnet/runtime/issues/59163
https://github.com/dotnet/sdk/issues/22515
-->
<Using Remove="System.Net.Http" />
</ItemGroup>
</Project>

View File

@ -6,7 +6,6 @@
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>

View File

@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>