Skip to content

Commit 24fbf05

Browse files
committed
Add roslyn-analyzer projects to solution
1 parent facbf82 commit 24fbf05

File tree

87 files changed

+3944
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+3944
-228
lines changed

Roslyn.sln

Lines changed: 454 additions & 0 deletions
Large diffs are not rendered by default.

eng/Directory.Packages.props

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<MicrosoftWindowsDesktopAppRuntimePackagesVersion>8.0.10</MicrosoftWindowsDesktopAppRuntimePackagesVersion>
2222
<_xunitVersion>2.9.2</_xunitVersion>
2323
<SqliteVersion>2.1.0</SqliteVersion>
24+
<!-- HumanizerVersion is referenced from the Text.Analyzers.Package.csproj -->
25+
<HumanizerVersion>2.14.1</HumanizerVersion>
2426
</PropertyGroup>
2527

2628
<!--
@@ -116,7 +118,7 @@
116118
<PackageVersion Include="Nerdbank.Streams" Version="2.11.79" />
117119
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
118120
<PackageVersion Include="StreamJsonRpc" Version="2.21.10" />
119-
121+
120122
<!--
121123
VS Debugger
122124
-->
@@ -225,8 +227,12 @@
225227
<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="$(SqliteVersion)" />
226228
<PackageVersion Include="SQLitePCLRaw.lib.e_sqlite3" Version="$(SqliteVersion)" />
227229
<PackageVersion Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="$(SqliteVersion)" />
230+
<PackageVersion Include="SQLitePCLRaw.lib.e_sqlite3.linux" Version="$(SqliteVersion)" />
231+
<PackageVersion Include="SQLitePCLRaw.lib.e_sqlite3.osx" Version="$(SqliteVersion)" />
232+
<PackageVersion Include="SQLitePCLRaw.lib.e_sqlite3.v110_xp" Version="$(SqliteVersion)" />
233+
<PackageVersion Include="SQLitePCLRaw.provider.e_sqlite3.net45" Version="$(SqliteVersion)" />
228234

229-
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
235+
<PackageVersion Include="Humanizer.Core" Version="$(HumanizerVersion)" />
230236
<PackageVersion Include="ICSharpCode.Decompiler" Version="8.2.0.7535" />
231237
<PackageVersion Include="Microsoft.CodeAnalysis.Elfie" Version="1.0.0" />
232238

@@ -237,10 +243,15 @@
237243
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.0" />
238244
<PackageVersion Include="BasicUndo" Version="0.9.3" />
239245
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
246+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
240247
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
248+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
241249
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing.XUnit" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
250+
<PackageVersion Include="Microsoft.CodeAnalysis.Test.Resources.Proprietary" Version="2.0.0-pre-20160714" />
242251
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Analyzer.Testing.XUnit" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
252+
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
243253
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing.XUnit" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
254+
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeRefactoring.Testing" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
244255
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeRefactoring.Testing.XUnit" Version="$(MicrosoftCodeAnalysisTestingVersion)" />
245256
<PackageVersion Include="Microsoft.DiaSymReader.Converter" Version="1.1.0-beta2-22302-02" />
246257
<PackageVersion Include="Microsoft.DiaSymReader.Converter.Xml" Version="1.1.0-beta2-22302-02" />
@@ -314,5 +325,15 @@
314325
the generators we build would load on the command line but not load in IDEs.
315326
-->
316327
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.1.0" />
317-
</ItemGroup>
328+
<!--
329+
The version of Roslyn used in the RoslynAnalyzers varies. These are defaults that
330+
will be overridden in the RoslynAnalyzer project files.
331+
-->
332+
<!--<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.1.0" /> -->
333+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
334+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.1.0" />
335+
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.1.0" />
336+
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.1.0" />
337+
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.1.0" />
338+
</ItemGroup>
318339
</Project>

eng/Versions.props

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,59 @@
9292
<MicrosoftIdentityClientVersion>4.61.3</MicrosoftIdentityClientVersion>
9393
<SystemIdentityModelTokensJwtVersion>6.34.0</SystemIdentityModelTokensJwtVersion>
9494
</PropertyGroup>
95+
<!--
96+
Microsoft.CodeAnalysis.* versions used by the RoslynAnalyzers.
97+
-->
98+
<PropertyGroup>
99+
<!-- Microsoft.CodeAnalysis.* versions. Read this!
100+
This repo uses a wide variety of M.CA.* package versions. This is an atypical pattern in
101+
.NET's repositories but a necessary one for roslyn-analyzers.
102+
103+
Some facts:
104+
- These versions are chosen on purpose.
105+
- They often represent the base required surface area of Microsoft.CA to support for a given feature or analyzer.
106+
This means that the analyzer would be supported in the widest array of C# compilation scenarios.
107+
- Most of these dependencies only represent target surface area. In some cases, the M.CA libraries are
108+
redistributed (tools) or used within the build.
109+
- Some of these versions are used for testing to ensure that analyzers built against older surface area
110+
still work against new implementations.
111+
- Linux source-build only builds a single implementation of M.CA.*.
112+
- Linux source-build does have some ability to provide surface area packages via the source-build-reference-packages repo.
113+
However, because these reference packages do not provide implementations, they cannot be used in any case
114+
where the package contents would be redisted or executed. An SBRP may not be created for a version that is used both
115+
as a reference assembly and redisted.
116+
117+
In this repo, the MicrosoftCodeAnalysis property should **not** be set globally in this file. Instead, it should
118+
be set for each project, based on the properties below. When the project is executable, it should be
119+
set only for non-source build or repo-source build. Product source build will set an incoming MicrosoftCodeAnalysis property
120+
that will denote the available implementation version.
121+
122+
Example of surface area usage:
123+
124+
<MicrosoftCodeAnalysisPackageVersion>$(MicrosoftCodeAnalysisPackageVersionForPerfSensitiveAnalyzers)</MicrosoftCodeAnalysisPackageVersion>
125+
126+
Example of executable usage:
127+
128+
<MicrosoftCodeAnalysisPackageVersion Condition="'$(DotNetBuildSourceOnly)' != 'true' or '$(DotNetBuildOrchestrator)' != 'true'">$(MicrosoftCodeAnalysisPackageVersionForExecution)</MicrosoftCodeAnalysisPackageVersion>
129+
-->
130+
<!-- Microsoft.CodeAnalysis versions for different purposes. -->
131+
<!-- Surface area that various projects compile against. These should have source-build reference packages -->
132+
<MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion>3.11.0</MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion>
133+
<MicrosoftCodeAnalysisPackageVersionForPublicApiAnalyzers>1.2.1</MicrosoftCodeAnalysisPackageVersionForPublicApiAnalyzers>
134+
<MicrosoftCodeAnalysisPackageVersionForBannedApiAnalyzers>3.11.0</MicrosoftCodeAnalysisPackageVersionForBannedApiAnalyzers>
135+
<MicrosoftCodeAnalysisPackageVersionForPerfSensitiveAnalyzers>3.11.0</MicrosoftCodeAnalysisPackageVersionForPerfSensitiveAnalyzers>
136+
<MicrosoftCodeAnalysisPackageVersionForResxSourceGenerators>4.0.1</MicrosoftCodeAnalysisPackageVersionForResxSourceGenerators>
137+
<MicrosoftCodeAnalysisPackageVersionForNetAnalyzers>3.11.0</MicrosoftCodeAnalysisPackageVersionForNetAnalyzers>
138+
<MicrosoftCodeAnalysisPackageVersionForTextAnalyzers>3.11.0</MicrosoftCodeAnalysisPackageVersionForTextAnalyzers>
139+
<MicrosoftCodeAnalysisPackageVersionForCodeAnalysisAnalyzers>3.11.0</MicrosoftCodeAnalysisPackageVersionForCodeAnalysisAnalyzers>
140+
<MicrosoftCodeAnalysisPackageVersionForToolsAndUtilities>3.11.0</MicrosoftCodeAnalysisPackageVersionForToolsAndUtilities>
141+
<MicrosoftCodeAnalysisPackageVersionForMetrics>4.0.1</MicrosoftCodeAnalysisPackageVersionForMetrics>
142+
<!-- Versions for tests and general utility execution. -->
143+
<!-- This version is for utility and executable assemblies. The version here should not overlap with any of the surface
144+
area versions. -->
145+
<MicrosoftCodeAnalysisPackageVersionForTests>4.9.0-3.final</MicrosoftCodeAnalysisPackageVersionForTests>
146+
<MicrosoftCodeAnalysisPackageVersionForExecution>4.6.0-1.final</MicrosoftCodeAnalysisPackageVersionForExecution>
147+
</PropertyGroup>
95148
<PropertyGroup>
96149
<UsingToolVSSDK Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</UsingToolVSSDK>
97150
<UsingToolPdbConverter>false</UsingToolPdbConverter>

0 commit comments

Comments
 (0)