--- /dev/null
+<Project>
+ <Target Name="_{TargetPrefix}GatherAnalyzers">
+
+ <ItemGroup>
+ <_{TargetPrefix}Analyzer Include="@(Analyzer)" Condition="'%(Analyzer.NuGetPackageId)' == '{NuGetPackageId}'" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="_{TargetPrefix}AnalyzerMultiTargeting"
+ Condition="'$(SupportsRoslynComponentVersioning)' != 'true'"
+ AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
+ DependsOnTargets="_{TargetPrefix}GatherAnalyzers">
+
+ <ItemGroup>
+ <!-- Remove our analyzers targeting roslyn4.x -->
+ <Analyzer Remove="@(_{TargetPrefix}Analyzer)"
+ Condition="$([System.String]::Copy('%(_{TargetPrefix}Analyzer.Identity)').IndexOf('roslyn4')) >= 0"/>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="_{TargetPrefix}RemoveAnalyzers"
+ Condition="'$({DisableSourceGeneratorPropertyName})' == 'true'"
+ AfterTargets="ResolvePackageDependenciesForBuild;ResolveNuGetPackageAssets"
+ DependsOnTargets="_{TargetPrefix}GatherAnalyzers">
+
+ <!-- Remove all our analyzers -->
+ <ItemGroup>
+ <Analyzer Remove="@(_{TargetPrefix}Analyzer)" />
+ </ItemGroup>
+ </Target>
+</Project>
<ProjectServicingConfiguration Include="Microsoft.NETCore.App.Ref" PatchVersion="0" />
</ItemGroup>
<PropertyGroup>
- <!-- For source generator support we are targeting the latest version of Roslyn for now, until we can support multi-targeting -->
+ <!-- For source generator support we need to target multiple versions of Rolsyn in order to be able to run on older versions of Roslyn -->
+ <MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11>3.11.0</MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11>
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.0.0-3.final</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisVersion>4.0.0-3.final</MicrosoftCodeAnalysisVersion>
</PropertyGroup>
</ItemGroup>
</Target>
+ <PropertyGroup>
+ <_MultiTargetRoslynComponentTargetsTemplate>$(MSBuildThisFileDirectory)MultiTargetRoslynComponent.targets.template</_MultiTargetRoslynComponentTargetsTemplate>
+ <MultiTargetRoslynComponentTargetsFileIntermediatePath>$(IntermediateOutputPath)MultiTargetRoslynComponent.targets</MultiTargetRoslynComponentTargetsFileIntermediatePath>
+ <IncludeMultiTargetRoslynComponentTargets Condition="'$(IncludeMultiTargetRoslynComponentTargets)' == ''">true</IncludeMultiTargetRoslynComponentTargets>
+ </PropertyGroup>
+
+ <!-- In packages that contain Analyzers, include a .targets file that will select the correct analyzer. -->
+ <Target Name="IncludeMultiTargetRoslynComponentTargetsInPackage"
+ AfterTargets="IncludeAnalyzersInPackage"
+ Condition="'@(AnalyzerReference)' != '' and '$(IncludeMultiTargetRoslynComponentTargets)' == 'true'"
+ DependsOnTargets="GenerateMultiTargetRoslynComponentTargetsFile">
+ <ItemGroup>
+ <Content Include="$(MultiTargetRoslynComponentTargetsFileIntermediatePath)"
+ PackagePath="build\$(PackageId).targets"
+ Pack="True" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="GenerateMultiTargetRoslynComponentTargetsFile"
+ Inputs="$(MSBuildProjectFullPath);_MultiTargetRoslynComponentTargetsTemplate"
+ Outputs="$(MultiTargetRoslynComponentTargetsFileIntermediatePath)">
+ <PropertyGroup>
+ <_MultiTargetRoslynComponentTargetPrefix>$(PackageId.Replace('.', '_'))</_MultiTargetRoslynComponentTargetPrefix>
+ <_MultiTargetRoslynComponentDisableSourceGeneratorPropertyName>Disable$(PackageId.Replace('.', ''))SourceGenerator</_MultiTargetRoslynComponentDisableSourceGeneratorPropertyName>
+ <_MultiTargetRoslynComponentDisableSourceGeneratorPropertyName>$(_MultiTargetRoslynComponentDisableSourceGeneratorPropertyName.Replace('Abstractions', ''))</_MultiTargetRoslynComponentDisableSourceGeneratorPropertyName>
+ </PropertyGroup>
+
+ <WriteLinesToFile File="$(MultiTargetRoslynComponentTargetsFileIntermediatePath)"
+ Lines="$([System.IO.File]::ReadAllText('$(_MultiTargetRoslynComponentTargetsTemplate)')
+ .Replace('{TargetPrefix}', '$(_MultiTargetRoslynComponentTargetPrefix)')
+ .Replace('{NuGetPackageId}', '$(PackageId)')
+ .Replace('{DisableSourceGeneratorPropertyName}', '$(_MultiTargetRoslynComponentDisableSourceGeneratorPropertyName)'))"
+ Overwrite="true" />
+ </Target>
+
<!-- Include a netstandard compat error if the project targets both .NETStandard and
.NETCoreApp. This prohibits users to consume packages on an older .NETCoreApp version
than the minimum supported one. -->
/// Runs a Roslyn generator over a set of source files.
/// </summary>
public static async Task<(ImmutableArray<Diagnostic>, ImmutableArray<GeneratedSourceResult>)> RunGenerator(
+#if ROSLYN4_0_OR_GREATER
IIncrementalGenerator generator,
+#else
+ ISourceGenerator generator,
+#endif
IEnumerable<Assembly>? references,
IEnumerable<string> sources,
bool includeBaseReferences = true,
Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
+#if ROSLYN4_0_OR_GREATER
// workaround https://github.com/dotnet/roslyn/pull/55866. We can remove "LangVersion=Preview" when we get a Roslyn build with that change.
CSharpParseOptions options = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview);
CSharpGeneratorDriver cgd = CSharpGeneratorDriver.Create(new[] { generator.AsSourceGenerator() }, parseOptions: options);
+#else
+ CSharpGeneratorDriver cgd = CSharpGeneratorDriver.Create(new[] { generator });
+#endif
+
GeneratorDriver gd = cgd.RunGenerators(comp!, cancellationToken);
GeneratorDriverRunResult r = gd.GetRunResult();
Returns="@(_AnalyzerPackFile)">
<PropertyGroup>
<_analyzerPath>analyzers/dotnet</_analyzerPath>
+ <_analyzerPath Condition="'$(AnalyzerRoslynVersion)' != ''">$(_analyzerPath)/roslyn$(AnalyzerRoslynVersion)</_analyzerPath>
<_analyzerPath Condition="'$(AnalyzerLanguage)' != ''">$(_analyzerPath)/$(AnalyzerLanguage)</_analyzerPath>
</PropertyGroup>
<ItemGroup>
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{78971B06-2519-45B7-B761-C8A30C168EBE}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{727A5FD3-0146-4E1E-81B6-E71D0C1A055E}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{BDC4E2D9-627A-4DE2-BF31-A95351C1CB7C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{C76753D0-F564-45E9-AA60-A846EFE0A414}"
{21CD6C35-65E2-414A-B9A1-22A0DD57977A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21CD6C35-65E2-414A-B9A1-22A0DD57977A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21CD6C35-65E2-414A-B9A1-22A0DD57977A}.Release|Any CPU.Build.0 = Release|Any CPU
- {727A5FD3-0146-4E1E-81B6-E71D0C1A055E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {727A5FD3-0146-4E1E-81B6-E71D0C1A055E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {727A5FD3-0146-4E1E-81B6-E71D0C1A055E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {727A5FD3-0146-4E1E-81B6-E71D0C1A055E}.Release|Any CPU.Build.0 = Release|Any CPU
{B6D30918-C1B7-4225-A809-E13A5817DE22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6D30918-C1B7-4225-A809-E13A5817DE22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6D30918-C1B7-4225-A809-E13A5817DE22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA43AA92-35BA-4B84-BAA2-C3BB56C8BB3B} = {67719AA1-52DC-4E35-B6F7-2F53A50B913A}
{78971B06-2519-45B7-B761-C8A30C168EBE} = {67719AA1-52DC-4E35-B6F7-2F53A50B913A}
{21CD6C35-65E2-414A-B9A1-22A0DD57977A} = {67719AA1-52DC-4E35-B6F7-2F53A50B913A}
- {727A5FD3-0146-4E1E-81B6-E71D0C1A055E} = {67719AA1-52DC-4E35-B6F7-2F53A50B913A}
{B6D30918-C1B7-4225-A809-E13A5817DE22} = {67719AA1-52DC-4E35-B6F7-2F53A50B913A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{BD19B1E7-CAFF-4009-874A-760D5A466E28}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{160C3D6B-D90A-40B1-A695-81DB79EB24C4}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{A49023C8-173A-4B8F-84B3-2FF37FE8344A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{1F57E720-CBFF-4648-A507-EFCBCECB5FD3}"
{BD19B1E7-CAFF-4009-874A-760D5A466E28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD19B1E7-CAFF-4009-874A-760D5A466E28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD19B1E7-CAFF-4009-874A-760D5A466E28}.Release|Any CPU.Build.0 = Release|Any CPU
- {160C3D6B-D90A-40B1-A695-81DB79EB24C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {160C3D6B-D90A-40B1-A695-81DB79EB24C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {160C3D6B-D90A-40B1-A695-81DB79EB24C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {160C3D6B-D90A-40B1-A695-81DB79EB24C4}.Release|Any CPU.Build.0 = Release|Any CPU
{7517D0A0-5596-48B7-96EF-CB24DAD72675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7517D0A0-5596-48B7-96EF-CB24DAD72675}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7517D0A0-5596-48B7-96EF-CB24DAD72675}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A80D098-69EC-45FE-A064-4CBDFA44BA43} = {1789A282-9C08-40AB-9FD0-0FB1FAB99621}
{B1723D4C-15E3-4A39-8976-C3E1740E5F00} = {1789A282-9C08-40AB-9FD0-0FB1FAB99621}
{BD19B1E7-CAFF-4009-874A-760D5A466E28} = {1789A282-9C08-40AB-9FD0-0FB1FAB99621}
- {160C3D6B-D90A-40B1-A695-81DB79EB24C4} = {1789A282-9C08-40AB-9FD0-0FB1FAB99621}
{7517D0A0-5596-48B7-96EF-CB24DAD72675} = {1789A282-9C08-40AB-9FD0-0FB1FAB99621}
{68210977-E10C-4BC3-B235-31B6E2AF9830} = {1789A282-9C08-40AB-9FD0-0FB1FAB99621}
{FE50757B-7862-49D2-812E-1646F6FE0070} = {1789A282-9C08-40AB-9FD0-0FB1FAB99621}
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{1555B38A-E9CB-4734-AAB1-59CFB833A06D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{30EBBE93-80FC-442D-ADC6-D0BB0A8CFA76}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{82700778-D9AD-4B9D-8A1C-CDC1A19E4D54}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2434A707-1012-4104-81A0-1A1B25D9FEEA}"
{1555B38A-E9CB-4734-AAB1-59CFB833A06D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1555B38A-E9CB-4734-AAB1-59CFB833A06D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1555B38A-E9CB-4734-AAB1-59CFB833A06D}.Release|Any CPU.Build.0 = Release|Any CPU
- {30EBBE93-80FC-442D-ADC6-D0BB0A8CFA76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {30EBBE93-80FC-442D-ADC6-D0BB0A8CFA76}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {30EBBE93-80FC-442D-ADC6-D0BB0A8CFA76}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {30EBBE93-80FC-442D-ADC6-D0BB0A8CFA76}.Release|Any CPU.Build.0 = Release|Any CPU
{96003091-9E9D-42D5-85A6-C2DFBD9DD847}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96003091-9E9D-42D5-85A6-C2DFBD9DD847}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96003091-9E9D-42D5-85A6-C2DFBD9DD847}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82700778-D9AD-4B9D-8A1C-CDC1A19E4D54} = {B5EF5DDD-EB92-414C-B9D2-826BA6CECCBF}
{1EF04395-4D84-43F1-BD99-7F6D6C3D70BB} = {B5EF5DDD-EB92-414C-B9D2-826BA6CECCBF}
{1555B38A-E9CB-4734-AAB1-59CFB833A06D} = {B5EF5DDD-EB92-414C-B9D2-826BA6CECCBF}
- {30EBBE93-80FC-442D-ADC6-D0BB0A8CFA76} = {B5EF5DDD-EB92-414C-B9D2-826BA6CECCBF}
{54B89407-FCD9-4B1A-8F83-04585D437443} = {B5EF5DDD-EB92-414C-B9D2-826BA6CECCBF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{23F4102D-67BD-4865-BB19-195C47945733}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{634542E9-CF9A-4BD2-BC36-71D12BEF2B36}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{41234DB5-1F3A-4E4A-8BD9-4A277C249666}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Extensions", "..\System.Windows.Extensions\ref\System.Windows.Extensions.csproj", "{6CDFD705-28EC-4D58-A2F9-715A3B06661B}"
{23F4102D-67BD-4865-BB19-195C47945733}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23F4102D-67BD-4865-BB19-195C47945733}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23F4102D-67BD-4865-BB19-195C47945733}.Release|Any CPU.Build.0 = Release|Any CPU
- {634542E9-CF9A-4BD2-BC36-71D12BEF2B36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {634542E9-CF9A-4BD2-BC36-71D12BEF2B36}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {634542E9-CF9A-4BD2-BC36-71D12BEF2B36}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {634542E9-CF9A-4BD2-BC36-71D12BEF2B36}.Release|Any CPU.Build.0 = Release|Any CPU
{CDC60461-56B7-4941-AD08-90228BD450CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CDC60461-56B7-4941-AD08-90228BD450CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CDC60461-56B7-4941-AD08-90228BD450CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CFEB13D-63D5-42A7-868C-CE1D0049EAF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CFEB13D-63D5-42A7-868C-CE1D0049EAF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CFEB13D-63D5-42A7-868C-CE1D0049EAF0}.Release|Any CPU.Build.0 = Release|Any CPU
- {6CDFD705-28EC-4D58-A2F9-715A3B06661B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6CDFD705-28EC-4D58-A2F9-715A3B06661B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CDFD705-28EC-4D58-A2F9-715A3B06661B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CDFD705-28EC-4D58-A2F9-715A3B06661B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CDFD705-28EC-4D58-A2F9-715A3B06661B}.Release|Any CPU.Build.0 = Release|Any CPU
{BAA953EF-6529-4F2C-8F89-C76A05258677} = {76107BEB-02C0-4A83-9631-B226340752A7}
{42C10152-F747-443F-9AC1-5738CB62EA6C} = {76107BEB-02C0-4A83-9631-B226340752A7}
{23F4102D-67BD-4865-BB19-195C47945733} = {76107BEB-02C0-4A83-9631-B226340752A7}
- {634542E9-CF9A-4BD2-BC36-71D12BEF2B36} = {76107BEB-02C0-4A83-9631-B226340752A7}
{CDC60461-56B7-4941-AD08-90228BD450CE} = {76107BEB-02C0-4A83-9631-B226340752A7}
{6CCBE9AB-E620-4616-9B80-1F9D3E722B87} = {76107BEB-02C0-4A83-9631-B226340752A7}
{8F65DFBB-9196-4E69-879A-C99C641B3E49} = {76107BEB-02C0-4A83-9631-B226340752A7}
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{7902A0CA-E94D-4C96-A112-455A1E5E2390}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{FA7201FE-097D-4197-BDEC-329986814D8D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{50BA55F5-BD05-4C05-910F-2BFD20BD3465}"
{4A28B457-D950-486B-B59B-A4C977A733B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A28B457-D950-486B-B59B-A4C977A733B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A28B457-D950-486B-B59B-A4C977A733B1}.Release|Any CPU.Build.0 = Release|Any CPU
- {6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}.Release|Any CPU.Build.0 = Release|Any CPU
{F38E2965-8DBB-4795-89AF-C0109EB23574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F38E2965-8DBB-4795-89AF-C0109EB23574}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F38E2965-8DBB-4795-89AF-C0109EB23574}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA7201FE-097D-4197-BDEC-329986814D8D} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{7902A0CA-E94D-4C96-A112-455A1E5E2390} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{4A28B457-D950-486B-B59B-A4C977A733B1} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
- {6699E51A-8DC5-4DBA-A06B-B4A04144E4FA} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Hosting", "..\Microsoft.Extensions.Hosting\src\Microsoft.Extensions.Hosting.csproj", "{AFC1BDAA-7E40-4118-BB80-F8057752A600}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{21A8F1A2-DB8F-40BB-8B41-34FFBFF678BE}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{860B845B-929F-4442-AED1-1F4186DBF497}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{A0AF82AE-ED18-4EEB-AD9A-B44017510F0C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{47A3CDB0-8252-4536-B61F-C2E10F6EC2B9}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{CA49BE02-D809-4F18-8E0B-54FA365429E3}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{25474DE2-4D3D-4950-BDA7-CF6FE3CCD940}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl", "..\System.Threading.AccessControl\ref\System.Threading.AccessControl.csproj", "{6061433D-2A71-47B3-B34B-3EDF523ABB78}"
{1A3EF133-CC86-4CC9-BBB8-333D41563AC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A3EF133-CC86-4CC9-BBB8-333D41563AC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A3EF133-CC86-4CC9-BBB8-333D41563AC3}.Release|Any CPU.Build.0 = Release|Any CPU
- {CA49BE02-D809-4F18-8E0B-54FA365429E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CA49BE02-D809-4F18-8E0B-54FA365429E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CA49BE02-D809-4F18-8E0B-54FA365429E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CA49BE02-D809-4F18-8E0B-54FA365429E3}.Release|Any CPU.Build.0 = Release|Any CPU
{47A3CDB0-8252-4536-B61F-C2E10F6EC2B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47A3CDB0-8252-4536-B61F-C2E10F6EC2B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47A3CDB0-8252-4536-B61F-C2E10F6EC2B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3488D63C-0C29-442C-8145-407DE19C7480} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
{2E027B76-275A-4FCE-9774-A2F8C3CD0C7E} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
{578661A4-C136-4533-819E-AF3352F79953} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
- {CA49BE02-D809-4F18-8E0B-54FA365429E3} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
{47A3CDB0-8252-4536-B61F-C2E10F6EC2B9} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
{C1ACBD81-9577-483B-8E33-819F1313114A} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
{01DB5E6D-40C5-42F7-8F9D-6F8DBC591129} = {192FD259-E55F-40C5-82EE-9E924EA6C3CB}
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Hosting", "..\Microsoft.Extensions.Hosting\src\Microsoft.Extensions.Hosting.csproj", "{36FAE390-EAAE-4193-98E7-34F10D3FA8E1}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{9CECED3B-385A-4C54-9E07-74E8341EB52D}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{723957C4-C433-4B6D-BF0C-28AE36AEDDBD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{E5F61C36-FB9B-4DA7-96C0-056FBEADBB53}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{2D8B86CE-7A3A-45F0-9127-AE6CDCEC6EA5}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{CC36DF9A-6602-47D9-B44B-C2D2C33A80D0}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{C50BBD27-2445-4DF4-9A1D-C7919D016BBC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl", "..\System.Threading.AccessControl\ref\System.Threading.AccessControl.csproj", "{B7ACDBBE-C64B-482B-B80D-3DC002AD450B}"
{B7ACDBBE-C64B-482B-B80D-3DC002AD450B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7ACDBBE-C64B-482B-B80D-3DC002AD450B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7ACDBBE-C64B-482B-B80D-3DC002AD450B}.Release|Any CPU.Build.0 = Release|Any CPU
- {CC36DF9A-6602-47D9-B44B-C2D2C33A80D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CC36DF9A-6602-47D9-B44B-C2D2C33A80D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CC36DF9A-6602-47D9-B44B-C2D2C33A80D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CC36DF9A-6602-47D9-B44B-C2D2C33A80D0}.Release|Any CPU.Build.0 = Release|Any CPU
{2D8B86CE-7A3A-45F0-9127-AE6CDCEC6EA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D8B86CE-7A3A-45F0-9127-AE6CDCEC6EA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D8B86CE-7A3A-45F0-9127-AE6CDCEC6EA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C50BBD27-2445-4DF4-9A1D-C7919D016BBC} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9}
{83D8F9FB-0A8D-4E48-A7CF-D169432A41AD} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9}
{BAE78100-3020-4AAE-BDBF-ACF9D1D1BA2F} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9}
- {CC36DF9A-6602-47D9-B44B-C2D2C33A80D0} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9}
{2D8B86CE-7A3A-45F0-9127-AE6CDCEC6EA5} = {76933DF1-12AA-4B5B-8863-EF38F10B1EC9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Hosting.Unit.Tests", "tests\UnitTests\Microsoft.Extensions.Hosting.Unit.Tests.csproj", "{33C3D8F0-297F-4471-92B0-F4E8717F10E3}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{FBF0B5C9-CD20-4B8A-83B4-6281A2EEBC45}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{42E1BF94-6FE0-4017-9702-55913BD95EDE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{8845E6FF-94B2-4994-A8F4-DF30844A2168}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{B41AA17B-5129-41CC-8EA4-250B80BABF87}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{631AE96F-2615-4D38-B3BB-0D98777C4667}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{0813853E-8C78-429A-B01A-3FB2EF1898F8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl", "..\System.Threading.AccessControl\ref\System.Threading.AccessControl.csproj", "{6F69FD88-7BD1-41DF-BF5D-F0E5F12BE766}"
{014EE6B4-BE08-4E50-9EBD-0D7A0CB7A76E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{014EE6B4-BE08-4E50-9EBD-0D7A0CB7A76E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{014EE6B4-BE08-4E50-9EBD-0D7A0CB7A76E}.Release|Any CPU.Build.0 = Release|Any CPU
- {631AE96F-2615-4D38-B3BB-0D98777C4667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {631AE96F-2615-4D38-B3BB-0D98777C4667}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {631AE96F-2615-4D38-B3BB-0D98777C4667}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {631AE96F-2615-4D38-B3BB-0D98777C4667}.Release|Any CPU.Build.0 = Release|Any CPU
{B41AA17B-5129-41CC-8EA4-250B80BABF87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B41AA17B-5129-41CC-8EA4-250B80BABF87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B41AA17B-5129-41CC-8EA4-250B80BABF87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0AEAD15B-CD38-4462-A36C-655ED8D0CBD1} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
{0BC9E4F4-5C34-4B90-80AB-2933992D99A6} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
{4ED9C0A9-C1EF-47ED-99F8-74B7411C971B} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
- {631AE96F-2615-4D38-B3BB-0D98777C4667} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
{B41AA17B-5129-41CC-8EA4-250B80BABF87} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
{C58E2CF3-F8AA-47C1-8A49-65B91252F2AA} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
{A5DD36AF-F0AD-4616-AB91-BC63E89B2744} = {59A29BF0-B76B-41F8-A733-E2A0847AB992}
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Http.Tests", "tests\Microsoft.Extensions.Http.Tests\Microsoft.Extensions.Http.Tests.csproj", "{58A1E42E-5DA1-452A-B39C-A1819171970A}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{3DD4EF0E-36D5-48BD-8F8A-1D7DAF74EC25}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{85615392-9242-4CAF-A0FE-A439FF615462}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{BAFF07C7-1F5F-4706-B7D7-9D5D309CBFE2}"
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{79CE8C7E-A4AF-413C-A54D-86F17073559C}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "gen\Microsoft.Extensions.Logging.Generators.csproj", "{1CB925AD-09DA-4734-BA05-619A00E5B448}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{7F536552-0E2A-4642-B7CF-863727C2F9CD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "src\Microsoft.Extensions.Logging.Abstractions.csproj", "{75C579F7-F20B-41F1-8CAF-641DE7ADA4EE}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Tests", "tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Tests.csproj", "{1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests", "tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj", "{1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.CompilerServices.Unsafe", "..\System.Runtime.CompilerServices.Unsafe\ref\System.Runtime.CompilerServices.Unsafe.csproj", "{DAA1349E-960E-49EB-81F3-FF4F99D8A325}"
EndProject
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{548DF5F7-790C-4A1C-89EB-BD904CA1BA86}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn4.0", "gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj", "{A5439E79-96D6-4F02-8DD0-23DFF979851D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn3.11", "gen\Microsoft.Extensions.Logging.Generators.Roslyn3.11.csproj", "{1491B9C9-955D-4DB0-B1D5-70137A78EAAE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests", "tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj", "{C333EC5A-F386-4A01-AE20-12D499551304}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
{79CE8C7E-A4AF-413C-A54D-86F17073559C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79CE8C7E-A4AF-413C-A54D-86F17073559C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79CE8C7E-A4AF-413C-A54D-86F17073559C}.Release|Any CPU.Build.0 = Release|Any CPU
- {1CB925AD-09DA-4734-BA05-619A00E5B448}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1CB925AD-09DA-4734-BA05-619A00E5B448}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1CB925AD-09DA-4734-BA05-619A00E5B448}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1CB925AD-09DA-4734-BA05-619A00E5B448}.Release|Any CPU.Build.0 = Release|Any CPU
- {F8CF3192-B902-4631-972A-C405FDECC48D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F8CF3192-B902-4631-972A-C405FDECC48D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F8CF3192-B902-4631-972A-C405FDECC48D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F8CF3192-B902-4631-972A-C405FDECC48D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7F536552-0E2A-4642-B7CF-863727C2F9CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7F536552-0E2A-4642-B7CF-863727C2F9CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7F536552-0E2A-4642-B7CF-863727C2F9CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7F536552-0E2A-4642-B7CF-863727C2F9CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {75C579F7-F20B-41F1-8CAF-641DE7ADA4EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {75C579F7-F20B-41F1-8CAF-641DE7ADA4EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {75C579F7-F20B-41F1-8CAF-641DE7ADA4EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {75C579F7-F20B-41F1-8CAF-641DE7ADA4EE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B}.Release|Any CPU.Build.0 = Release|Any CPU
{DAA1349E-960E-49EB-81F3-FF4F99D8A325}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAA1349E-960E-49EB-81F3-FF4F99D8A325}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAA1349E-960E-49EB-81F3-FF4F99D8A325}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAA1349E-960E-49EB-81F3-FF4F99D8A325}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F8CF3192-B902-4631-972A-C405FDECC48D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F8CF3192-B902-4631-972A-C405FDECC48D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F8CF3192-B902-4631-972A-C405FDECC48D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F8CF3192-B902-4631-972A-C405FDECC48D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A5439E79-96D6-4F02-8DD0-23DFF979851D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A5439E79-96D6-4F02-8DD0-23DFF979851D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A5439E79-96D6-4F02-8DD0-23DFF979851D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A5439E79-96D6-4F02-8DD0-23DFF979851D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1491B9C9-955D-4DB0-B1D5-70137A78EAAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1491B9C9-955D-4DB0-B1D5-70137A78EAAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1491B9C9-955D-4DB0-B1D5-70137A78EAAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1491B9C9-955D-4DB0-B1D5-70137A78EAAE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C333EC5A-F386-4A01-AE20-12D499551304}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C333EC5A-F386-4A01-AE20-12D499551304}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C333EC5A-F386-4A01-AE20-12D499551304}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C333EC5A-F386-4A01-AE20-12D499551304}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
{DAA1349E-960E-49EB-81F3-FF4F99D8A325} = {7631380A-FB73-4241-9987-0891A21E9769}
{1CB869A7-2EEC-4A53-9C33-DF9E0C75825B} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B}
{79CE8C7E-A4AF-413C-A54D-86F17073559C} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B}
+ {7F536552-0E2A-4642-B7CF-863727C2F9CD} = {7631380A-FB73-4241-9987-0891A21E9769}
{75C579F7-F20B-41F1-8CAF-641DE7ADA4EE} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86}
- {1CB925AD-09DA-4734-BA05-619A00E5B448} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86}
+ {1CB869A7-2EEC-4A53-9C33-DF9E0C75825B} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B}
+ {DAA1349E-960E-49EB-81F3-FF4F99D8A325} = {7631380A-FB73-4241-9987-0891A21E9769}
{F8CF3192-B902-4631-972A-C405FDECC48D} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86}
+ {A5439E79-96D6-4F02-8DD0-23DFF979851D} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86}
+ {1491B9C9-955D-4DB0-B1D5-70137A78EAAE} = {548DF5F7-790C-4A1C-89EB-BD904CA1BA86}
+ {C333EC5A-F386-4A01-AE20-12D499551304} = {4DE63935-DCA9-4D63-9C1F-AAE79C89CA8B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {450DA749-CBDC-4BDC-950F-8A491CF59D49}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
+
+[assembly: System.Resources.NeutralResourcesLanguage("en-us")]
+
+namespace Microsoft.Extensions.Logging.Generators
+{
+ [Generator]
+ public partial class LoggerMessageGenerator : ISourceGenerator
+ {
+ public void Initialize(GeneratorInitializationContext context)
+ {
+ context.RegisterForSyntaxNotifications(SyntaxContextReceiver.Create);
+ }
+
+ public void Execute(GeneratorExecutionContext context)
+ {
+ if (context.SyntaxContextReceiver is not SyntaxContextReceiver receiver || receiver.ClassDeclarations.Count == 0)
+ {
+ // nothing to do yet
+ return;
+ }
+
+ var p = new Parser(context.Compilation, context.ReportDiagnostic, context.CancellationToken);
+ IReadOnlyList<LoggerClass> logClasses = p.GetLogClasses(receiver.ClassDeclarations);
+ if (logClasses.Count > 0)
+ {
+ var e = new Emitter();
+ string result = e.Emit(logClasses, context.CancellationToken);
+
+ context.AddSource("LoggerMessage.g.cs", SourceText.From(result, Encoding.UTF8));
+ }
+ }
+
+ private sealed class SyntaxContextReceiver : ISyntaxContextReceiver
+ {
+ internal static ISyntaxContextReceiver Create()
+ {
+ return new SyntaxContextReceiver();
+ }
+
+ public HashSet<ClassDeclarationSyntax> ClassDeclarations { get; } = new();
+
+ public void OnVisitSyntaxNode(GeneratorSyntaxContext context)
+ {
+ if (Parser.IsSyntaxTargetForGeneration(context.Node))
+ {
+ ClassDeclarationSyntax classSyntax = Parser.GetSemanticTargetForGeneration(context);
+ if (classSyntax != null)
+ {
+ ClassDeclarations.Add(classSyntax);
+ }
+ }
+ }
+ }
+ }
+}
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-using System;
using System.Collections.Generic;
using System.Collections.Immutable;
-using System.Diagnostics.CodeAnalysis;
-using System.Diagnostics.Tracing;
using System.Linq;
-using System.Runtime.CompilerServices;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <AnalyzerRoslynVersion>3.11</AnalyzerRoslynVersion>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)</RoslynApiVersion>
+ </PropertyGroup>
+
+ <Import Project="Microsoft.Extensions.Logging.Generators.targets" />
+
+ <ItemGroup>
+ <Compile Remove="LoggerMessageGenerator.Roslyn4.0.cs" />
+ </ItemGroup>
+
+</Project>
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <AnalyzerRoslynVersion>4.0</AnalyzerRoslynVersion>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)</RoslynApiVersion>
+ <DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="Microsoft.Extensions.Logging.Generators.targets" />
+
+ <ItemGroup>
+ <Compile Remove="LoggerMessageGenerator.Roslyn3.11.cs" />
+ </ItemGroup>
+
+</Project>
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <AssemblyName>$(MSBuildThisFileName)</AssemblyName>
+ <RootNamespace>$(MSBuildThisFileName)</RootNamespace>
+ <StringResourcesClassName>SR</StringResourcesClassName>
+ <StringResourcesName>FxResources.$(RootNamespace).$(StringResourcesClassName)</StringResourcesName>
<Nullable>enable</Nullable>
<EnableDefaultItems>true</EnableDefaultItems>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(RoslynApiVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" PrivateAssets="all" />
</ItemGroup>
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
</ItemGroup>
- <ItemGroup>
- <AnalyzerReference Include="..\gen\Microsoft.Extensions.Logging.Generators.csproj" />
+ <ItemGroup>
+ <AnalyzerReference Include="..\gen\Microsoft.Extensions.Logging.Generators.Roslyn3.11.csproj" />
+ <AnalyzerReference Include="..\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj" />
</ItemGroup>
</Project>
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)</RoslynApiVersion>
+ </PropertyGroup>
+
+ <Import Project="Microsoft.Extensions.Logging.Generators.targets"/>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\gen\Microsoft.Extensions.Logging.Generators.Roslyn3.11.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
+ </ItemGroup>
+
+</Project>
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)</RoslynApiVersion>
+ <DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="Microsoft.Extensions.Logging.Generators.targets"/>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
+ </ItemGroup>
+
+</Project>
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj" />
- <PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
+ <PackageReference Include="Microsoft.CodeAnalysis" Version="$(RoslynApiVersion)" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="$(SQLitePCLRawbundle_greenVersion)" />
- <ProjectReference Include="..\..\gen\Microsoft.Extensions.Logging.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
</ItemGroup>
<ItemGroup>
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{788150B7-B822-4466-A1DC-C875449DE449}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{6D6D8484-D8D0-4FCA-B6FA-B665C629D78F}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{C4F75024-EA9D-46C5-B2D9-CAE8FC5EFF38}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{E7035B72-0180-437E-A696-1F0CD8921279}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{2E4D0EB0-E34B-4D47-A7F1-E35C696066E8}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{D902BAF8-7431-4017-BD56-F4EABE38D7F9}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{9BCECFDA-BF6E-4BD8-BFE2-A25C61F57874}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{6A02D298-6899-4DD0-BFF4-40702BC30BCD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{BF5E5B5A-AC50-4FF1-AADB-0DFC1AA8E429}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{AD117F41-062A-4158-A17D-3375820A53FA}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{C9F3D8F9-8646-432E-82FC-2E4E8411CFFE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{AB19DE2B-6A14-4CDA-94EF-845BAF293051}"
{1B33EC41-F711-4111-8818-FEEBC9A0BD8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B33EC41-F711-4111-8818-FEEBC9A0BD8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B33EC41-F711-4111-8818-FEEBC9A0BD8D}.Release|Any CPU.Build.0 = Release|Any CPU
- {AD117F41-062A-4158-A17D-3375820A53FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AD117F41-062A-4158-A17D-3375820A53FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AD117F41-062A-4158-A17D-3375820A53FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AD117F41-062A-4158-A17D-3375820A53FA}.Release|Any CPU.Build.0 = Release|Any CPU
{BF5E5B5A-AC50-4FF1-AADB-0DFC1AA8E429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF5E5B5A-AC50-4FF1-AADB-0DFC1AA8E429}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF5E5B5A-AC50-4FF1-AADB-0DFC1AA8E429}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3F1AF4B-963B-4DCC-80AF-11DFEB652D8D} = {F3BAE0A3-1AF5-4F38-ADBE-6FEC99664322}
{ED51A791-65BB-4F8B-B76C-769D0663D4A7} = {F3BAE0A3-1AF5-4F38-ADBE-6FEC99664322}
{D3E483FC-DF73-4CD8-AFAA-1DA752F49304} = {F3BAE0A3-1AF5-4F38-ADBE-6FEC99664322}
- {AD117F41-062A-4158-A17D-3375820A53FA} = {F3BAE0A3-1AF5-4F38-ADBE-6FEC99664322}
{BF5E5B5A-AC50-4FF1-AADB-0DFC1AA8E429} = {F3BAE0A3-1AF5-4F38-ADBE-6FEC99664322}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{850FBE78-DE29-480D-B4EE-6D260B0341B4}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{3FB47333-590F-417A-832D-83CD81BAA4E1}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{16E075F3-372C-4A98-BDAF-FF615B8A9855}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{3DDCFBB7-A438-46BB-9094-A1A39060DD2A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{62D0B220-DABD-4C56-A0E2-640D74465328}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{AF5C6565-09EE-4E1F-A146-72785C0FF66F}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{B1BE2665-7E3F-46FB-BCE1-774D5984F76C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{6C2850C7-56F0-4DCF-BFBF-4365DE2FC439}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{7834A5FC-A39B-4435-9D8C-2EEABFFA7A84}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{0C1BD2DA-FA39-458E-8BCB-0D73231C43D3}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{F5B4A3CF-03B5-40A2-BE78-DA6230270113}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{F4A703F8-3D69-4113-A86F-9AD908086092}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{50CC33E5-CB2C-4CFB-9CDE-BBD41B30FB86}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{4BF31DFE-A930-499C-B696-BB1958C08089}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{5A956452-F322-4C4F-8689-D2B425764293}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{5A06587C-82E8-4B40-9C0A-DD06CB986625}"
{50CC33E5-CB2C-4CFB-9CDE-BBD41B30FB86}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50CC33E5-CB2C-4CFB-9CDE-BBD41B30FB86}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50CC33E5-CB2C-4CFB-9CDE-BBD41B30FB86}.Release|Any CPU.Build.0 = Release|Any CPU
- {4BF31DFE-A930-499C-B696-BB1958C08089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4BF31DFE-A930-499C-B696-BB1958C08089}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4BF31DFE-A930-499C-B696-BB1958C08089}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4BF31DFE-A930-499C-B696-BB1958C08089}.Release|Any CPU.Build.0 = Release|Any CPU
{EF689C53-9B62-4E17-B412-92FAD527FA59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF689C53-9B62-4E17-B412-92FAD527FA59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF689C53-9B62-4E17-B412-92FAD527FA59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C1BD2DA-FA39-458E-8BCB-0D73231C43D3} = {887BF6A4-CB22-4DF4-8E24-A1B267161ECB}
{23F45D4C-4E33-4334-A5BF-D34E24165E0B} = {887BF6A4-CB22-4DF4-8E24-A1B267161ECB}
{50CC33E5-CB2C-4CFB-9CDE-BBD41B30FB86} = {887BF6A4-CB22-4DF4-8E24-A1B267161ECB}
- {4BF31DFE-A930-499C-B696-BB1958C08089} = {887BF6A4-CB22-4DF4-8E24-A1B267161ECB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {67B715CE-2E67-4605-BFB0-CA65F345C3A5}
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyInjection", "..\Microsoft.Extensions.DependencyInjection\src\Microsoft.Extensions.DependencyInjection.csproj", "{A64CC82B-B781-4469-B009-49A43A0A2A96}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{F4DE0466-D21E-4CAF-9307-999478A64D5B}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{367922CE-A24E-4977-89BE-D1F2F678F8B2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{F63AB9DB-6E62-4FEC-BA06-E146615C08AC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.FileSystemGlobbing", "..\Microsoft.Extensions.FileSystemGlobbing\src\Microsoft.Extensions.FileSystemGlobbing.csproj", "{7C562B37-19E5-44BE-85D5-15FFA9FAEF5A}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{56A5DED2-47C2-4938-931E-B896A6BDDA0D}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{5CC86773-7762-4FB7-9B6E-F4002F286AD4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{4BEF5648-8DBF-4E16-B6E6-6F80694E140D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{B5B30447-25D0-42C0-920A-092247C95664}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{B4313086-0B16-4A80-BA04-964F64745DC2}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{34C22E86-B0A3-457D-B8D9-7CF47AAF2570}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl", "..\System.Threading.AccessControl\ref\System.Threading.AccessControl.csproj", "{5FF1A443-F491-428F-9121-51523AA65052}"
{7C562B37-19E5-44BE-85D5-15FFA9FAEF5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C562B37-19E5-44BE-85D5-15FFA9FAEF5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C562B37-19E5-44BE-85D5-15FFA9FAEF5A}.Release|Any CPU.Build.0 = Release|Any CPU
- {56A5DED2-47C2-4938-931E-B896A6BDDA0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {56A5DED2-47C2-4938-931E-B896A6BDDA0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {56A5DED2-47C2-4938-931E-B896A6BDDA0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {56A5DED2-47C2-4938-931E-B896A6BDDA0D}.Release|Any CPU.Build.0 = Release|Any CPU
{5CC86773-7762-4FB7-9B6E-F4002F286AD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CC86773-7762-4FB7-9B6E-F4002F286AD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CC86773-7762-4FB7-9B6E-F4002F286AD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5B30447-25D0-42C0-920A-092247C95664}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5B30447-25D0-42C0-920A-092247C95664}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5B30447-25D0-42C0-920A-092247C95664}.Release|Any CPU.Build.0 = Release|Any CPU
- {B4313086-0B16-4A80-BA04-964F64745DC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B4313086-0B16-4A80-BA04-964F64745DC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B4313086-0B16-4A80-BA04-964F64745DC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B4313086-0B16-4A80-BA04-964F64745DC2}.Release|Any CPU.Build.0 = Release|Any CPU
{34C22E86-B0A3-457D-B8D9-7CF47AAF2570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34C22E86-B0A3-457D-B8D9-7CF47AAF2570}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34C22E86-B0A3-457D-B8D9-7CF47AAF2570}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F0CF40F-D54D-4101-94EA-8FE7F9C843CB} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
{F61AC077-D30A-4F65-9831-5F9DC23B3561} = {E70034C8-3FE8-4A9E-9D2C-569FB4AE2AD7}
{7C562B37-19E5-44BE-85D5-15FFA9FAEF5A} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
- {56A5DED2-47C2-4938-931E-B896A6BDDA0D} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
{5CC86773-7762-4FB7-9B6E-F4002F286AD4} = {E70034C8-3FE8-4A9E-9D2C-569FB4AE2AD7}
{4BEF5648-8DBF-4E16-B6E6-6F80694E140D} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
{E68B2719-B7A0-46F4-A5F0-72BB03BF8167} = {E70034C8-3FE8-4A9E-9D2C-569FB4AE2AD7}
{04BA3E3C-6979-4792-B19E-C797AD607F42} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
{DDE4AAB2-E249-4A1A-A0CB-4C1AF440B620} = {E70034C8-3FE8-4A9E-9D2C-569FB4AE2AD7}
{B5B30447-25D0-42C0-920A-092247C95664} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
- {B4313086-0B16-4A80-BA04-964F64745DC2} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
{34C22E86-B0A3-457D-B8D9-7CF47AAF2570} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
{5FF1A443-F491-428F-9121-51523AA65052} = {E70034C8-3FE8-4A9E-9D2C-569FB4AE2AD7}
{504464B5-B163-4D6B-A113-52DDC78A401D} = {D8928AB2-2939-4421-90C5-56B789BF93E5}
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Hosting", "..\Microsoft.Extensions.Hosting\src\Microsoft.Extensions.Hosting.csproj", "{6AD51705-102E-4E9D-B62E-6BF19025F3A7}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Generators", "..\Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj", "{0641221C-4409-4805-8CA4-4023809D5AD1}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj", "{EFFB59C1-CAF4-4347-B996-4C773E1AFAA8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Logging.Abstractions", "..\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj", "{56D37CB2-68A3-42D3-AA0E-416813ABAD8B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{59D31D62-3BF9-4F4A-9FF7-3A61F297F714}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{850A0E3B-1C09-40EF-8F3E-D61D93663C4E}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{D7CEC738-5D2D-4FCB-9268-9650EB01BF31}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.AccessControl", "..\System.Threading.AccessControl\ref\System.Threading.AccessControl.csproj", "{39D50C3D-609B-4B4E-955F-252E469A55C9}"
{6F7512BA-9B15-4395-AE05-C546F0770344}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F7512BA-9B15-4395-AE05-C546F0770344}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F7512BA-9B15-4395-AE05-C546F0770344}.Release|Any CPU.Build.0 = Release|Any CPU
- {850A0E3B-1C09-40EF-8F3E-D61D93663C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {850A0E3B-1C09-40EF-8F3E-D61D93663C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {850A0E3B-1C09-40EF-8F3E-D61D93663C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {850A0E3B-1C09-40EF-8F3E-D61D93663C4E}.Release|Any CPU.Build.0 = Release|Any CPU
{59D31D62-3BF9-4F4A-9FF7-3A61F297F714}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59D31D62-3BF9-4F4A-9FF7-3A61F297F714}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59D31D62-3BF9-4F4A-9FF7-3A61F297F714}.Release|Any CPU.ActiveCfg = Release|Any CPU
{429C9D71-4BBD-489D-9C86-EC240F652008} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
{0641221C-4409-4805-8CA4-4023809D5AD1} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
{9175023F-6982-45CD-B360-C4FC1E145B25} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
- {850A0E3B-1C09-40EF-8F3E-D61D93663C4E} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
{59D31D62-3BF9-4F4A-9FF7-3A61F297F714} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
{B82AF93C-33D7-4B48-B36E-A9873D74601C} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
{99007CDD-4840-4B94-8A8A-FECF72BCEE3F} = {7028EE0A-D314-4F48-91CA-51A1633BC3F4}
-<Project Sdk="Microsoft.Build.NoTargets">
+<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsShipping>false</IsShipping>
<ProjectReference Include="@(AspNetCoreAppLibrary->'$(LibrariesProjectRoot)%(Identity)\src\%(Identity).csproj');
$(LibrariesProjectRoot)System.Net.Quic\src\System.Net.Quic.csproj" PrivateAssets="all" Pack="true" Private="true" IncludeReferenceAssemblyInPackage="true" />
<!-- TODO: Find a better way to include source generators without hardcoding them. -->
- <AnalyzerReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.csproj" />
+ <!-- Only include the 4.0 version in the ref pack, since targeting net6.0 requires Roslyn 4.0 -->
+ <AnalyzerReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\gen\Microsoft.Extensions.Logging.Generators.Roslyn4.0.csproj" />
</ItemGroup>
</Project>
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{0DE5E7DA-0AE0-4CF2-95AB-1E476FD68C5C}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{9F2EC2C8-6E28-404A-8087-7A0518624EC6}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{6A2B5C68-14C3-4989-8530-D51A138C72AE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2BD73108-47D7-40E6-BFCB-169E6AD42A81}"
{B9162F6C-4CD1-4D33-BA4A-42830A1B1C66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9162F6C-4CD1-4D33-BA4A-42830A1B1C66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9162F6C-4CD1-4D33-BA4A-42830A1B1C66}.Release|Any CPU.Build.0 = Release|Any CPU
- {9F2EC2C8-6E28-404A-8087-7A0518624EC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9F2EC2C8-6E28-404A-8087-7A0518624EC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9F2EC2C8-6E28-404A-8087-7A0518624EC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9F2EC2C8-6E28-404A-8087-7A0518624EC6}.Release|Any CPU.Build.0 = Release|Any CPU
{0DE5E7DA-0AE0-4CF2-95AB-1E476FD68C5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DE5E7DA-0AE0-4CF2-95AB-1E476FD68C5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DE5E7DA-0AE0-4CF2-95AB-1E476FD68C5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ACDB56AF-7B9F-4762-9764-D6FF09118D09} = {D908DCBE-EFA4-4CCA-9A1C-AEB48D59C504}
{6A2B5C68-14C3-4989-8530-D51A138C72AE} = {D908DCBE-EFA4-4CCA-9A1C-AEB48D59C504}
{E17B915A-81CA-44D8-818E-512B65609475} = {D908DCBE-EFA4-4CCA-9A1C-AEB48D59C504}
- {9F2EC2C8-6E28-404A-8087-7A0518624EC6} = {D908DCBE-EFA4-4CCA-9A1C-AEB48D59C504}
{0DE5E7DA-0AE0-4CF2-95AB-1E476FD68C5C} = {D908DCBE-EFA4-4CCA-9A1C-AEB48D59C504}
{1D866ECD-FD46-4FCA-9408-D1E3E9CB1F43} = {D908DCBE-EFA4-4CCA-9A1C-AEB48D59C504}
EndGlobalSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{FEBE9C47-A00B-40B2-A85B-74ECE2F8B80A}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{D120D5A7-69D9-44A2-B7F7-EE0E48CC0238}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{BC7D3412-DBCB-4863-8BF8-41899E32608C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{945B0700-C720-4775-B9E4-6A27DAA90190}"
{3AD3D600-C391-492D-B3D6-0F6C03DA5C27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AD3D600-C391-492D-B3D6-0F6C03DA5C27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AD3D600-C391-492D-B3D6-0F6C03DA5C27}.Release|Any CPU.Build.0 = Release|Any CPU
- {D120D5A7-69D9-44A2-B7F7-EE0E48CC0238}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D120D5A7-69D9-44A2-B7F7-EE0E48CC0238}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D120D5A7-69D9-44A2-B7F7-EE0E48CC0238}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D120D5A7-69D9-44A2-B7F7-EE0E48CC0238}.Release|Any CPU.Build.0 = Release|Any CPU
{BC7D3412-DBCB-4863-8BF8-41899E32608C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC7D3412-DBCB-4863-8BF8-41899E32608C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC7D3412-DBCB-4863-8BF8-41899E32608C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D6F4698-E7FA-4AE3-A7A4-98939E40D08D} = {A75027EA-199E-4C86-A636-AE9AE0F0756C}
{3AD3D600-C391-492D-B3D6-0F6C03DA5C27} = {A75027EA-199E-4C86-A636-AE9AE0F0756C}
{7DC969DA-8BD3-4E64-88E8-26AFE65BFF7E} = {2A66925D-3658-46BE-A730-5BF70D8D5B90}
- {D120D5A7-69D9-44A2-B7F7-EE0E48CC0238} = {2A66925D-3658-46BE-A730-5BF70D8D5B90}
{BC7D3412-DBCB-4863-8BF8-41899E32608C} = {2A66925D-3658-46BE-A730-5BF70D8D5B90}
{3EEB6FCC-2592-4879-ADDD-0FDC7AEB7BC1} = {2A66925D-3658-46BE-A730-5BF70D8D5B90}
{4FB629CD-5FFC-47AC-9670-A2A8AFEE8926} = {2A66925D-3658-46BE-A730-5BF70D8D5B90}
<ProjectReference Include="..\..\src\System.Net.Http.Json.csproj" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
+ <ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{BACC5257-6CA8-45C7-970F-C8D501DA59AB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{302F00AD-85F1-4DE9-B100-41F8EAB93B7C}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{E470810A-BAF2-4B3C-92CB-72007B7F1B6A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2F9A243D-B060-4BB2-A9E1-A9CB861328D9}"
{BACC5257-6CA8-45C7-970F-C8D501DA59AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BACC5257-6CA8-45C7-970F-C8D501DA59AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BACC5257-6CA8-45C7-970F-C8D501DA59AB}.Release|Any CPU.Build.0 = Release|Any CPU
- {302F00AD-85F1-4DE9-B100-41F8EAB93B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {302F00AD-85F1-4DE9-B100-41F8EAB93B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {302F00AD-85F1-4DE9-B100-41F8EAB93B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {302F00AD-85F1-4DE9-B100-41F8EAB93B7C}.Release|Any CPU.Build.0 = Release|Any CPU
{4BA25EC1-B76B-4410-AF2D-A54B90FAB404}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BA25EC1-B76B-4410-AF2D-A54B90FAB404}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BA25EC1-B76B-4410-AF2D-A54B90FAB404}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6A8B90B-69CD-4B0D-8A33-F208A3169674} = {49E09973-383D-4AD6-9D88-B93A02031607}
{E470810A-BAF2-4B3C-92CB-72007B7F1B6A} = {49E09973-383D-4AD6-9D88-B93A02031607}
{BACC5257-6CA8-45C7-970F-C8D501DA59AB} = {49E09973-383D-4AD6-9D88-B93A02031607}
- {302F00AD-85F1-4DE9-B100-41F8EAB93B7C} = {49E09973-383D-4AD6-9D88-B93A02031607}
{4BA25EC1-B76B-4410-AF2D-A54B90FAB404} = {49E09973-383D-4AD6-9D88-B93A02031607}
{090BA6CA-F661-4BDE-9663-65F8231DDB1D} = {6C66589E-2DB3-4635-BADA-9B6452327239}
{E9D5AB56-2597-42E0-BE81-C00CC63D1FB3} = {6C66589E-2DB3-4635-BADA-9B6452327239}
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{9BCCDA15-8907-4AE3-8871-2F17775DDE4C}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "gen\System.Text.Json.SourceGeneration.csproj", "{6485EED4-C313-4551-9865-8ADCED603629}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0", "gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj", "{6485EED4-C313-4551-9865-8ADCED603629}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "ref\System.Text.Json.csproj", "{7015E94D-D20D-48C8-86D7-6A996BE99E0E}"
EndProject
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "System.Text.Json.FSharp.Tests", "tests\System.Text.Json.FSharp.Tests\System.Text.Json.FSharp.Tests.fsproj", "{5720BF06-2031-4AD8-B9B4-31A01E27ABB8}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Tests", "tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Tests.csproj", "{33599A6C-F340-4E1B-9B4D-CB8946C22140}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0.Tests", "tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Tests.csproj", "{33599A6C-F340-4E1B-9B4D-CB8946C22140}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests", "tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj", "{F6A18EB5-A8CC-4A39-9E85-5FA226019C3D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.Tests", "tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj", "{A0178BAA-A1AF-4C69-8E4A-A700A2723DDC}"
EndProject
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Collections.Immutable", "..\System.Collections.Immutable\ref\System.Collections.Immutable.csproj", "{BE27618A-2916-4269-9AD5-6BC5EDC32B30}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Text.Json.SourceGeneration.Unit.Tests", "tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Unit.Tests.csproj", "{F6A18EB5-A8CC-4A39-9E85-5FA226019C3D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn3.11", "gen\System.Text.Json.SourceGeneration.Roslyn3.11.csproj", "{04AEB008-EE4F-44DE-A361-2DBD2D0FD6A4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests", "tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj", "{256A4653-4287-44B3-BDEF-67FC1522ED2F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration.Roslyn3.11.Tests", "tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj", "{66AD4B7E-CF15-4A8F-8BF8-7E1BC6176D07}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
{F6A18EB5-A8CC-4A39-9E85-5FA226019C3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6A18EB5-A8CC-4A39-9E85-5FA226019C3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6A18EB5-A8CC-4A39-9E85-5FA226019C3D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {04AEB008-EE4F-44DE-A361-2DBD2D0FD6A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {04AEB008-EE4F-44DE-A361-2DBD2D0FD6A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {04AEB008-EE4F-44DE-A361-2DBD2D0FD6A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {04AEB008-EE4F-44DE-A361-2DBD2D0FD6A4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {256A4653-4287-44B3-BDEF-67FC1522ED2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {256A4653-4287-44B3-BDEF-67FC1522ED2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {256A4653-4287-44B3-BDEF-67FC1522ED2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {256A4653-4287-44B3-BDEF-67FC1522ED2F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {66AD4B7E-CF15-4A8F-8BF8-7E1BC6176D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {66AD4B7E-CF15-4A8F-8BF8-7E1BC6176D07}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {66AD4B7E-CF15-4A8F-8BF8-7E1BC6176D07}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {66AD4B7E-CF15-4A8F-8BF8-7E1BC6176D07}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
{102945CA-3736-4B2C-8E68-242A0B247F2B} = {E07C6980-EB71-4D19-A80A-7BEB80B635B1}
{73D5739C-E382-4E22-A7D3-B82705C58C74} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{E9AA0AEB-AEAE-4B28-8D4D-17A6D7C89D17} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
+ {BE27618A-2916-4269-9AD5-6BC5EDC32B30} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{1C8262DB-7355-40A8-A2EC-4EED7363134A} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
{4774F56D-16A8-4ABB-8C73-5F57609F1773} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{D05FD93A-BC51-466E-BD56-3F3D6BBE6B06} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
{E2077991-EB83-471C-B17F-72F569FFCE6D} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{7909EB27-0D6E-46E6-B9F9-8A1EFD557018} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
+ {C56337BB-8CBC-4EE5-AB4D-8BB0A922813E} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{9BCCDA15-8907-4AE3-8871-2F17775DDE4C} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
{6485EED4-C313-4551-9865-8ADCED603629} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
{7015E94D-D20D-48C8-86D7-6A996BE99E0E} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{C56337BB-8CBC-4EE5-AB4D-8BB0A922813E} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{BE27618A-2916-4269-9AD5-6BC5EDC32B30} = {0371C5D8-D5F5-4747-9810-D91D71D8C0E4}
{F6A18EB5-A8CC-4A39-9E85-5FA226019C3D} = {E07C6980-EB71-4D19-A80A-7BEB80B635B1}
+ {A0178BAA-A1AF-4C69-8E4A-A700A2723DDC} = {E07C6980-EB71-4D19-A80A-7BEB80B635B1}
+ {04AEB008-EE4F-44DE-A361-2DBD2D0FD6A4} = {E49881A9-09F6-442F-9E1D-6D87F5F837F1}
+ {256A4653-4287-44B3-BDEF-67FC1522ED2F} = {E07C6980-EB71-4D19-A80A-7BEB80B635B1}
+ {66AD4B7E-CF15-4A8F-8BF8-7E1BC6176D07} = {E07C6980-EB71-4D19-A80A-7BEB80B635B1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5868B757-D821-41FC-952E-2113A0519506}
defaultSeverity: DiagnosticSeverity.Warning,
isEnabledByDefault: true);
- private readonly SourceProductionContext _sourceProductionContext;
+ private readonly JsonSourceGenerationContext _sourceGenerationContext;
private ContextGenerationSpec _currentContext = null!;
- private readonly SourceGenerationSpec _generationSpec = null!;
+ private readonly SourceGenerationSpec _generationSpec;
private readonly HashSet<string> _emittedPropertyFileNames = new();
- public Emitter(in SourceProductionContext sourceProductionContext, SourceGenerationSpec generationSpec)
+ public Emitter(in JsonSourceGenerationContext sourceGenerationContext, SourceGenerationSpec generationSpec)
{
- _sourceProductionContext = sourceProductionContext;
+ _sourceGenerationContext = sourceGenerationContext;
_generationSpec = generationSpec;
}
sb.AppendLine("}");
}
- _sourceProductionContext.AddSource(fileName, SourceText.From(sb.ToString(), Encoding.UTF8));
+ _sourceGenerationContext.AddSource(fileName, SourceText.From(sb.ToString(), Encoding.UTF8));
}
private void GenerateTypeInfo(TypeGenerationSpec typeGenerationSpec)
break;
case ClassType.TypeUnsupportedBySourceGen:
{
- _sourceProductionContext.ReportDiagnostic(
+ _sourceGenerationContext.ReportDiagnostic(
Diagnostic.Create(TypeNotSupported, Location.None, new string[] { typeGenerationSpec.TypeRef }));
return;
}
}
else
{
- _sourceProductionContext.ReportDiagnostic(Diagnostic.Create(DuplicateTypeName, Location.None, new string[] { typeGenerationSpec.TypeInfoPropertyName }));
+ _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(DuplicateTypeName, Location.None, new string[] { typeGenerationSpec.TypeInfoPropertyName }));
}
}
private const string DictionaryTypeRef = "global::System.Collections.Generic.Dictionary";
private readonly Compilation _compilation;
- private readonly SourceProductionContext _sourceProductionContext;
+ private readonly JsonSourceGenerationContext _sourceGenerationContext;
private readonly MetadataLoadContextInternal _metadataLoadContext;
private readonly Type _ilistOfTType;
defaultSeverity: DiagnosticSeverity.Error,
isEnabledByDefault: true);
- public Parser(Compilation compilation, in SourceProductionContext sourceProductionContext)
+ public Parser(Compilation compilation, in JsonSourceGenerationContext sourceGenerationContext)
{
_compilation = compilation;
- _sourceProductionContext = sourceProductionContext;
+ _sourceGenerationContext = sourceGenerationContext;
_metadataLoadContext = new MetadataLoadContextInternal(_compilation);
_ilistOfTType = _metadataLoadContext.Resolve(SpecialType.System_Collections_Generic_IList_T);
PopulateKnownTypes();
}
- public SourceGenerationSpec? GetGenerationSpec(ImmutableArray<ClassDeclarationSyntax> classDeclarationSyntaxList)
+ public SourceGenerationSpec? GetGenerationSpec(IEnumerable<ClassDeclarationSyntax> classDeclarationSyntaxList)
{
Compilation compilation = _compilation;
INamedTypeSymbol jsonSerializerContextSymbol = compilation.GetBestTypeByMetadataName(JsonSerializerContextFullName);
if (!TryGetClassDeclarationList(contextTypeSymbol, out List<string> classDeclarationList))
{
// Class or one of its containing types is not partial so we can't add to it.
- _sourceProductionContext.ReportDiagnostic(Diagnostic.Create(ContextClassesMustBePartial, Location.None, new string[] { contextTypeSymbol.Name }));
+ _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(ContextClassesMustBePartial, Location.None, new string[] { contextTypeSymbol.Name }));
continue;
}
if (!type.TryGetDeserializationConstructor(useDefaultCtorInAnnotatedStructs, out ConstructorInfo? constructor))
{
classType = ClassType.TypeUnsupportedBySourceGen;
- _sourceProductionContext.ReportDiagnostic(Diagnostic.Create(MultipleJsonConstructorAttribute, Location.None, new string[] { $"{type}" }));
+ _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(MultipleJsonConstructorAttribute, Location.None, new string[] { $"{type}" }));
}
else
{
{
if (dataExtensionPropGenSpec != null)
{
- _sourceProductionContext.ReportDiagnostic(Diagnostic.Create(MultipleJsonExtensionDataAttribute, Location.None, new string[] { type.Name }));
+ _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(MultipleJsonExtensionDataAttribute, Location.None, new string[] { type.Name }));
}
Type propType = spec.TypeGenerationSpec.Type;
if (!IsValidDataExtensionPropertyType(propType))
{
- _sourceProductionContext.ReportDiagnostic(Diagnostic.Create(DataExtensionPropertyInvalid, Location.None, new string[] { type.Name, spec.ClrName }));
+ _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(DataExtensionPropertyInvalid, Location.None, new string[] { type.Name, spec.ClrName }));
}
dataExtensionPropGenSpec = GetOrAddTypeGenerationSpec(propType, generationMode);
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+//#define LAUNCH_DEBUGGER
+using System.Collections.Generic;
+using System.Collections.Immutable;
+using System.Diagnostics;
+using System.Linq;
+using System.Reflection;
+using System.Text.Json.Reflection;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
+
+namespace System.Text.Json.SourceGeneration
+{
+ /// <summary>
+ /// Generates source code to optimize serialization and deserialization with JsonSerializer.
+ /// </summary>
+ [Generator]
+ public sealed partial class JsonSourceGenerator : ISourceGenerator
+ {
+ /// <summary>
+ /// Registers a syntax resolver to receive compilation units.
+ /// </summary>
+ /// <param name="context"></param>
+ public void Initialize(GeneratorInitializationContext context)
+ {
+ context.RegisterForSyntaxNotifications(() => new SyntaxContextReceiver());
+ }
+
+ /// <summary>
+ /// Generates source code to optimize serialization and deserialization with JsonSerializer.
+ /// </summary>
+ /// <param name="executionContext"></param>
+ public void Execute(GeneratorExecutionContext executionContext)
+ {
+#if LAUNCH_DEBUGGER
+ if (!Diagnostics.Debugger.IsAttached)
+ {
+ Diagnostics.Debugger.Launch();
+ }
+#endif
+ if (executionContext.SyntaxContextReceiver is not SyntaxContextReceiver receiver || receiver.ClassDeclarationSyntaxList == null)
+ {
+ // nothing to do yet
+ return;
+ }
+
+ JsonSourceGenerationContext context = new JsonSourceGenerationContext(executionContext);
+ Parser parser = new(executionContext.Compilation, context);
+ SourceGenerationSpec? spec = parser.GetGenerationSpec(receiver.ClassDeclarationSyntaxList);
+ if (spec != null)
+ {
+ _rootTypes = spec.ContextGenerationSpecList[0].RootSerializableTypes;
+
+ Emitter emitter = new(context, spec);
+ emitter.Emit();
+ }
+ }
+
+ private sealed class SyntaxContextReceiver : ISyntaxContextReceiver
+ {
+ public List<ClassDeclarationSyntax>? ClassDeclarationSyntaxList { get; private set; }
+
+ public void OnVisitSyntaxNode(GeneratorSyntaxContext context)
+ {
+ if (Parser.IsSyntaxTargetForGeneration(context.Node))
+ {
+ ClassDeclarationSyntax classSyntax = Parser.GetSemanticTargetForGeneration(context);
+ if (classSyntax != null)
+ {
+ (ClassDeclarationSyntaxList ??= new List<ClassDeclarationSyntax>()).Add(classSyntax);
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// Helper for unit tests.
+ /// </summary>
+ public Dictionary<string, Type>? GetSerializableTypes() => _rootTypes?.ToDictionary(p => p.Type.FullName, p => p.Type);
+ private List<TypeGenerationSpec>? _rootTypes;
+ }
+
+ internal readonly struct JsonSourceGenerationContext
+ {
+ private readonly GeneratorExecutionContext _context;
+
+ public JsonSourceGenerationContext(GeneratorExecutionContext context)
+ {
+ _context = context;
+ }
+
+ public void ReportDiagnostic(Diagnostic diagnostic)
+ {
+ _context.ReportDiagnostic(diagnostic);
+ }
+
+ public void AddSource(string hintName, SourceText sourceText)
+ {
+ _context.AddSource(hintName, sourceText);
+ }
+ }
+}
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
namespace System.Text.Json.SourceGeneration
{
context.RegisterSourceOutput(compilationAndClasses, (spc, source) => Execute(source.Item1, source.Item2, spc));
}
- private void Execute(Compilation compilation, ImmutableArray<ClassDeclarationSyntax> contextClasses, SourceProductionContext context)
+ private void Execute(Compilation compilation, ImmutableArray<ClassDeclarationSyntax> contextClasses, SourceProductionContext sourceProductionContext)
{
#if LAUNCH_DEBUGGER
if (!Diagnostics.Debugger.IsAttached)
return;
}
+ JsonSourceGenerationContext context = new JsonSourceGenerationContext(sourceProductionContext);
Parser parser = new(compilation, context);
SourceGenerationSpec? spec = parser.GetGenerationSpec(contextClasses);
if (spec != null)
public Dictionary<string, Type>? GetSerializableTypes() => _rootTypes?.ToDictionary(p => p.Type.FullName, p => p.Type);
private List<TypeGenerationSpec>? _rootTypes;
}
+
+ internal readonly struct JsonSourceGenerationContext
+ {
+ private readonly SourceProductionContext _context;
+
+ public JsonSourceGenerationContext(SourceProductionContext context)
+ {
+ _context = context;
+ }
+
+ public void ReportDiagnostic(Diagnostic diagnostic)
+ {
+ _context.ReportDiagnostic(diagnostic);
+ }
+
+ public void AddSource(string hintName, SourceText sourceText)
+ {
+ _context.AddSource(hintName, sourceText);
+ }
+ }
}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <AnalyzerRoslynVersion>3.11</AnalyzerRoslynVersion>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)</RoslynApiVersion>
+ </PropertyGroup>
+
+ <Import Project="System.Text.Json.SourceGeneration.targets" />
+
+ <ItemGroup>
+ <Compile Include="JsonSourceGenerator.Roslyn3.11.cs" />
+ </ItemGroup>
+
+</Project>
\ No newline at end of file
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <IsNETCoreAppAnalyzer>true</IsNETCoreAppAnalyzer>
+ <AnalyzerRoslynVersion>4.0</AnalyzerRoslynVersion>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)</RoslynApiVersion>
+ <DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="System.Text.Json.SourceGeneration.targets" />
+
+ <ItemGroup>
+ <Compile Include="JsonSourceGenerator.Roslyn4.0.cs" />
+ </ItemGroup>
+
+</Project>
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <AssemblyName>$(MSBuildThisFileName)</AssemblyName>
+ <RootNamespace>$(MSBuildThisFileName)</RootNamespace>
+ <StringResourcesClassName>SR</StringResourcesClassName>
+ <StringResourcesName>FxResources.$(RootNamespace).$(StringResourcesClassName)</StringResourcesName>
<CLSCompliant>false</CLSCompliant>
<Nullable>enable</Nullable>
<!-- Suppress warning: XML comment has cref attribute that could not be resolved -->
<NoWarn>CS1574</NoWarn>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<UsingToolXliff>true</UsingToolXliff>
- <IsNETCoreAppAnalyzer>true</IsNETCoreAppAnalyzer>
<AnalyzerLanguage>cs</AnalyzerLanguage>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(RoslynApiVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" PrivateAssets="all" />
-
- <PackageDestination Include="analyzers\dotnet\cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="ClassType.cs" />
<Compile Include="CollectionType.cs" />
<Compile Include="JsonConstants.cs" />
- <Compile Include="JsonSourceGenerator.cs" />
<Compile Include="JsonSourceGenerator.Emitter.cs" />
<Compile Include="JsonSourceGenerator.Parser.cs" />
<Compile Include="ObjectConstructionStrategy.cs" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Bcl.AsyncInterfaces\src\Microsoft.Bcl.AsyncInterfaces.csproj" />
</ItemGroup>
<ItemGroup>
- <AnalyzerReference Include="..\gen\System.Text.Json.SourceGeneration.csproj" />
+ <AnalyzerReference Include="..\gen\System.Text.Json.SourceGeneration.Roslyn3.11.csproj" />
+ <AnalyzerReference Include="..\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj" />
</ItemGroup>
</Project>
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <Import Project="System.Text.Json.SourceGeneration.Tests.targets" />
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn3.11.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
+ </ItemGroup>
+</Project>
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <Import Project="System.Text.Json.SourceGeneration.Tests.targets" />
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
+ </ItemGroup>
+</Project>
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>
<ItemGroup>
- <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
- </ItemGroup>
-
- <ItemGroup>
<Compile Include="..\Common\CollectionTests\CollectionTests.AsyncEnumerable.cs" Link="CommonTest\System\Text\Json\Tests\Serialization\CollectionTests\CollectionTests.AsyncEnumerable.cs" />
<Compile Include="..\Common\CollectionTests\CollectionTests.Concurrent.cs" Link="CommonTest\System\Text\Json\Tests\Serialization\CollectionTests\CollectionTests.Concurrent.cs" />
<Compile Include="..\Common\CollectionTests\CollectionTests.cs" Link="CommonTest\System\Text\Json\Tests\Serialization\CollectionTests\CollectionTests.cs" />
);
}
- private static GeneratorDriver CreateDriver(Compilation compilation, IIncrementalGenerator[] generators)
- => CSharpGeneratorDriver.Create(
+ public static Compilation RunGenerators(
+ Compilation compilation,
+ out ImmutableArray<Diagnostic> diagnostics,
+#if ROSLYN4_0_OR_GREATER
+ params IIncrementalGenerator[] generators)
+ {
+ CSharpGeneratorDriver driver = CSharpGeneratorDriver.Create(
generators: generators.Select(g => g.AsSourceGenerator()),
parseOptions: s_parseOptions);
-
- public static Compilation RunGenerators(Compilation compilation, out ImmutableArray<Diagnostic> diagnostics, params IIncrementalGenerator[] generators)
+#else
+ params ISourceGenerator[] generators)
{
- CreateDriver(compilation, generators).RunGeneratorsAndUpdateCompilation(compilation, out Compilation outCompilation, out diagnostics);
+ CSharpGeneratorDriver driver = CSharpGeneratorDriver.Create(
+ generators: generators,
+ parseOptions: s_parseOptions);
+#endif
+
+ driver.RunGeneratorsAndUpdateCompilation(compilation, out Compilation outCompilation, out diagnostics);
return outCompilation;
}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)</RoslynApiVersion>
+ </PropertyGroup>
+
+ <Import Project="System.Text.Json.SourceGeneration.Unit.Tests.targets" />
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn3.11.csproj" />
+ </ItemGroup>
+</Project>
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)</RoslynApiVersion>
+ <DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="System.Text.Json.SourceGeneration.Unit.Tests.targets" />
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj" />
+ </ItemGroup>
+</Project>
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
+ <PackageReference Include="Microsoft.CodeAnalysis" Version="$(RoslynApiVersion)" />
<ProjectReference Include="..\..\src\System.Text.Json.csproj" />
- <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\System.Text.Json.csproj" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
+ <ProjectReference Include="..\..\gen\System.Text.Json.SourceGeneration.Roslyn4.0.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>
<ItemGroup Condition="'$(TargetsMobile)' == 'true' and '$(TargetOS)' != 'Browser'">
<!-- Microsoft.CodeAnalysis.* assemblies missing in the virtual file system for Browser and the bundle for the mobile platforms -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj" />
</ItemGroup>
<!-- Projects that don't support code coverage measurement. -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Threading.Tasks.Dataflow\tests\System.Threading.Tasks.Dataflow.Tests.csproj" />
<!-- Crash https://github.com/dotnet/runtime/issues/56085 -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Roslyn4.0.Tests.csproj" />
</ItemGroup>
<ItemGroup Condition="('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator') and '$(RunDisablediOSTests)' != 'true'">
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\wasm\System.Net.WebSockets.Client.Wasm.Tests.csproj" />
<!-- https://github.com/dotnet/runtime/issues/58226 -->
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Unit.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj" />
+ <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasmTests)' != 'true'">