From 8bba03b2e02266b8fe744ee1d04ebd22c1706419 Mon Sep 17 00:00:00 2001 From: bsdayo Date: Sun, 21 May 2023 12:18:15 +0800 Subject: [PATCH] fix(json): update ItemSpec --- src/NekoSpace.Build.Resources.Json/GenerateJsonResources.cs | 5 +++-- .../NekoSpace.Build.Resources.Json.csproj | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NekoSpace.Build.Resources.Json/GenerateJsonResources.cs b/src/NekoSpace.Build.Resources.Json/GenerateJsonResources.cs index 7955b85..e090bc7 100644 --- a/src/NekoSpace.Build.Resources.Json/GenerateJsonResources.cs +++ b/src/NekoSpace.Build.Resources.Json/GenerateJsonResources.cs @@ -43,8 +43,9 @@ public override bool Execute() var resFilename = $"{filenameWithCulture}.resources"; var resLogicalName = GetResourceLogicalName(inputItem.ItemSpec, resFilename); + var resOutputPath = Path.Combine(OutputPath, resLogicalName); - var writer = new ResourceWriter(Path.Combine(OutputPath, resLogicalName)); + var writer = new ResourceWriter(resOutputPath); var ok = true; @@ -93,7 +94,7 @@ bool ReadElement(string currentName, JsonElement element) // Copy all the input metadata to output inputItem.CopyMetadataTo(outputItem); - outputItem.ItemSpec = resLogicalName; + outputItem.ItemSpec = resOutputPath; _outputResources.Add(outputItem); } diff --git a/src/NekoSpace.Build.Resources.Json/NekoSpace.Build.Resources.Json.csproj b/src/NekoSpace.Build.Resources.Json/NekoSpace.Build.Resources.Json.csproj index fa389b0..d27f95d 100644 --- a/src/NekoSpace.Build.Resources.Json/NekoSpace.Build.Resources.Json.csproj +++ b/src/NekoSpace.Build.Resources.Json/NekoSpace.Build.Resources.Json.csproj @@ -2,7 +2,7 @@ NekoSpace.Build.Resources.Json - 1.0.2 + 1.0.3 Embed JSON resources into your .NET application. MIT bsdayo