Skip to content

Commit 2700138

Browse files
author
John Luo
authored
Merge pull request #20484 from dotnet/johluo/remove-extensions-deps
Migrate analyzers from dotnet/extensions. Pin Microsoft.Extensions.DiagnosticAdapter.
2 parents b463e04 + 1cc6171 commit 2700138

22 files changed

+1318
-26
lines changed

Directory.Build.props

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<IsReferenceAssemblyProject Condition="$(MSBuildProjectDirectory.EndsWith('ref'))">true</IsReferenceAssemblyProject>
1414
<OutDirName Condition="'$(IsReferenceAssemblyProject)' == 'true'">$(MSBuildProjectName)-ref</OutDirName>
1515

16-
<IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Performance')) OR $(RepoRelativeProjectDir.Contains('perf'))">true</IsBenchmarkProject>
16+
<IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Performance')) OR $(RepoRelativeProjectDir.Contains('perf')) OR $(RepoRelativeProjectDir.Contains('benchmarkapps'))">true</IsBenchmarkProject>
1717
<IsSpecificationTestProject Condition="$(MSBuildProjectName.EndsWith('.Specification.Tests'))">true</IsSpecificationTestProject>
1818
<IsUnitTestProject>false</IsUnitTestProject>
1919
<IsUnitTestProject Condition="'$(IsSpecificationTestProject)' != 'true' and ( $(MSBuildProjectName.EndsWith('Tests')) or $(MSBuildProjectName.EndsWith('.Test')) or $(MSBuildProjectName.EndsWith('.FunctionalTest')) )">true</IsUnitTestProject>
@@ -105,8 +105,18 @@
105105
<InternalInstallerBaseName>$(RuntimeInstallerBaseName)-internal</InternalInstallerBaseName>
106106
</PropertyGroup>
107107

108-
<ItemGroup Condition="'$(DisablePubternalApiCheck)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsTestAssetProject)' != 'true'">
109-
<PackageReference Include="Internal.AspNetCore.Analyzers" PrivateAssets="All" Version="$(InternalAspNetCoreAnalyzersPackageVersion)" IsImplicitlyDefined="true" />
108+
<ItemGroup
109+
Condition="'$(DisablePubternalApiCheck)' != 'true'
110+
AND '$(IsTestProject)' != 'true'
111+
AND '$(IsBenchmarkProject)' != 'true'
112+
AND '$(IsTestAssetProject)' != 'true'
113+
AND '$(MSBuildProjectName)' != 'Internal.AspNetCore.Analyzers'
114+
AND '$(MSBuildProjectExtension)' == '.csproj'">
115+
<ProjectReference
116+
Include="$(RepoRoot)src\Analyzers\Internal.AspNetCore.Analyzers\src\Internal.AspNetCore.Analyzers.csproj"
117+
PrivateAssets="All"
118+
Version="$(InternalAspNetCoreAnalyzersPackageVersion)"
119+
IsImplicitlyDefined="true" />
110120
</ItemGroup>
111121

112122
<!-- Compilation options which apply to all languages. Language-specific options should be set in eng/targets/$(lang).Common.props -->

eng/Dependencies.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ and are generated based on the last package release.
104104

105105
<ItemGroup Label=".NET team dependencies (Non-source-build)" Condition="'$(DotNetBuildFromSource)' != 'true'">
106106
<LatestPackageReference Include="Microsoft.AspNet.WebApi.Client" Version="$(MicrosoftAspNetWebApiClientPackageVersion)" />
107-
<LatestPackageReference Include="Microsoft.AspNetCore.Analyzer.Testing" Version="$(MicrosoftAspNetCoreAnalyzerTestingPackageVersion)" />
108107
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.2.1" Version="$(MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion)" />
109108
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.2.2" Version="$(MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion)" />
110109
<LatestPackageReference Include="Microsoft.AspNetCore.AzureAppServices.SiteExtension.3.1.x64" Version="$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion)" />

eng/Version.Details.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@
5757
<Uri>https://github.com/dotnet/efcore</Uri>
5858
<Sha>b0636ed8050797d0a9c16da8b98c2eea7d7e1f16</Sha>
5959
</Dependency>
60-
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="5.0.0-preview.4.20201.2" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
61-
<Uri>https://github.com/dotnet/extensions</Uri>
62-
<Sha>03c40031d618f923aa88da125cb078aabde9ebb1</Sha>
63-
</Dependency>
6460
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-preview.4-runtime.20201.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
6561
<Uri>https://github.com/dotnet/runtime</Uri>
6662
<Sha>e1fa5d7648d46f067e265211fc2c695d409fe788</Sha>
@@ -117,10 +113,6 @@
117113
<Uri>https://github.com/dotnet/runtime</Uri>
118114
<Sha>e1fa5d7648d46f067e265211fc2c695d409fe788</Sha>
119115
</Dependency>
120-
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="5.0.0-preview.4.20201.2" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
121-
<Uri>https://github.com/dotnet/extensions</Uri>
122-
<Sha>03c40031d618f923aa88da125cb078aabde9ebb1</Sha>
123-
</Dependency>
124116
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-preview.4-runtime.20201.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
125117
<Uri>https://github.com/dotnet/runtime</Uri>
126118
<Sha>e1fa5d7648d46f067e265211fc2c695d409fe788</Sha>
@@ -308,10 +300,6 @@
308300
<Uri>https://github.com/dotnet/runtime</Uri>
309301
<Sha>e1fa5d7648d46f067e265211fc2c695d409fe788</Sha>
310302
</Dependency>
311-
<Dependency Name="Internal.AspNetCore.Analyzers" Version="5.0.0-preview.4.20201.2" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
312-
<Uri>https://github.com/dotnet/extensions</Uri>
313-
<Sha>03c40031d618f923aa88da125cb078aabde9ebb1</Sha>
314-
</Dependency>
315303
<Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20180.5">
316304
<Uri>https://github.com/dotnet/arcade</Uri>
317305
<Sha>09bb9d929120b402348c9a0e9c8c951e824059aa</Sha>

eng/Versions.props

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@
128128
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.4.20201.1</MicrosoftNETCorePlatformsPackageVersion>
129129
<!-- Packages from dotnet/blazor -->
130130
<MicrosoftAspNetCoreBlazorMonoPackageVersion>3.2.0-preview1.20067.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
131-
<!-- Packages from dotnet/extensions -->
132-
<InternalAspNetCoreAnalyzersPackageVersion>5.0.0-preview.4.20201.2</InternalAspNetCoreAnalyzersPackageVersion>
133-
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>5.0.0-preview.4.20201.2</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
134-
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>5.0.0-preview.4.20201.2</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
135131
<!-- Packages from dotnet/efcore -->
136132
<dotnetefPackageVersion>5.0.0-preview.4.20203.1</dotnetefPackageVersion>
137133
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-preview.4.20203.1</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
@@ -163,6 +159,8 @@
163159
<MicrosoftNETCoreAppRuntimeVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimeVersion>
164160
</PropertyGroup>
165161
<PropertyGroup Label="Manual">
162+
<!-- DiagnosticAdapter package pinned temporarily until migrated/deprecated -->
163+
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>5.0.0-preview.4.20180.4</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
166164
<!-- Build tool dependencies -->
167165
<InternalAspNetCoreBuildTasksPackageVersion>3.0.0-build-20190530.3</InternalAspNetCoreBuildTasksPackageVersion>
168166
<MicrosoftSymbolUploaderBuildTaskPackageVersion>1.0.0-beta-64023-03</MicrosoftSymbolUploaderBuildTaskPackageVersion>

src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<ProjectReference Include="..\src\Microsoft.AspNetCore.Analyzers.csproj" />
15+
<ProjectReference Include="$(RepoRoot)src\Analyzers\Analyzers\src\Microsoft.AspNetCore.Analyzers.csproj" />
16+
<ProjectReference Include="$(RepoRoot)src\Analyzers\Microsoft.AspNetCore.Analyzer.Testing\src\Microsoft.AspNetCore.Analyzer.Testing.csproj" />
1617

17-
<Reference Include="Microsoft.AspNetCore.Analyzer.Testing" />
1818
<Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
1919

2020
<!--
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Description>ASP.NET Core internal use analyzers.</Description>
5+
<TargetFramework>netstandard1.3</TargetFramework>
6+
<PackageTags>$(PackageTags);analyzers</PackageTags>
7+
<NoWarn>$(NoWarn);CS1591</NoWarn>
8+
<BuildOutputTargetFolder>analyzers/dotnet/cs/</BuildOutputTargetFolder>
9+
<!--
10+
Except for analyzer unit tests, analyzers should not be referenced by other projects in this repo. Analyzers cannot be used as
11+
a project reference. The SDK currently only supports using analyzers as a PackageReference. This flag prevents this project from
12+
being used as a `<Reference>`, which indicates that a reference is interchangeable between ProjectRef and PackageRef.
13+
-->
14+
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
15+
<UseLatestPackageReferences>true</UseLatestPackageReferences>
16+
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
17+
<IsPackable>true</IsPackable>
18+
<!-- This project needs an older version of M.CA.CSharp.Workspaces since it targets netstandard1.3 -->
19+
<DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
20+
</PropertyGroup>
21+
22+
<ItemGroup>
23+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.8.0" PrivateAssets="All" />
24+
</ItemGroup>
25+
26+
</Project>

0 commit comments

Comments
 (0)