diff --git a/example/kli.Localize.Example/kli.Localize.Example.csproj b/example/kli.Localize.Example/kli.Localize.Example.csproj
index d992ffe..a5c55a2 100644
--- a/example/kli.Localize.Example/kli.Localize.Example.csproj
+++ b/example/kli.Localize.Example/kli.Localize.Example.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
diff --git a/src/kli.Localize.Generator/LocalizeCodeGenerator.cs b/src/kli.Localize.Generator/LocalizeCodeGenerator.cs
index ac64bac..8e011a0 100644
--- a/src/kli.Localize.Generator/LocalizeCodeGenerator.cs
+++ b/src/kli.Localize.Generator/LocalizeCodeGenerator.cs
@@ -1,4 +1,6 @@
-using kli.Localize.Generator.Internal;
+using System;
+using System.Linq;
+using kli.Localize.Generator.Internal;
using Microsoft.CodeAnalysis;
namespace kli.Localize.Generator
@@ -20,7 +22,8 @@ public void Execute(GeneratorExecutionContext context)
var translationReader = new TranslationReader(context.ReportDiagnostic);
var codeGenerator = new LocalizeCodeGeneratorCore(translationReader);
- foreach (var file in context.AdditionalFiles)
+ var additionalFiles = context.AdditionalFiles.Where(af => af.Path.EndsWith(".json", StringComparison.OrdinalIgnoreCase));
+ foreach (var file in additionalFiles)
{
var namespaceResolver = new NamespaceResolver(file.Path, context.Compilation.AssemblyName,
context.AnalyzerConfigOptions.GlobalOptions.TryGetValue);
diff --git a/src/kli.Localize.Test/kli.Localize.Test.csproj b/src/kli.Localize.Test/kli.Localize.Test.csproj
index f7c6fd1..b624e36 100644
--- a/src/kli.Localize.Test/kli.Localize.Test.csproj
+++ b/src/kli.Localize.Test/kli.Localize.Test.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
9.0
false