Skip to content

Commit 9181f6b

Browse files
aksoftware98claude
andcommitted
Fix SourceGenerator analyzer payload packing and bump to 6.1.2
The previous Pack output was missing the analyzers/dotnet/cs/ folder, so the source generator package could not actually function for consumers. • move analyzer-bundled dependency packing from a Target-emitted <None Pack="true"> set (which Pack does not observe) to <TfmSpecificPackageFile> items contributed via the TargetsForTfmSpecificContentInPackage extension point — this is the documented hook for adding TFM-specific content during Pack • condition the new PackAnalyzerDependencies target on netstandard2.0 to avoid duplicating analyzer DLLs when packing under net10.0 • include the YamlDotNet, Microsoft.Extensions.DependencyInjection.Abstractions, the source generator itself, and the core MultiLanguages library in analyzers/dotnet/cs so the generator can run inside the Roslyn host • bump SourceGenerator package version to 6.1.2 to reflect the packaging fix Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e52e4ae commit 9181f6b

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/AKSoftware.Localization.MultiLanguages.SourceGenerator/AKSoftware.Localization.MultiLanguages.SourceGenerator.csproj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
<PackageProjectUrl>https://akmultilanguages.azurewebsites.net</PackageProjectUrl>
1919
<RepositoryUrl>https://github.com/aksoftware98/multilanguages</RepositoryUrl>
2020
<PackageIcon>AkMultiLanguages.png</PackageIcon>
21-
<AssemblyVersion>6.1.0</AssemblyVersion>
22-
<FileVersion>6.1.0</FileVersion>
23-
<Version>6.1.0</Version>
21+
<AssemblyVersion>6.1.2</AssemblyVersion>
22+
<FileVersion>6.1.2</FileVersion>
23+
<Version>6.1.2</Version>
2424
<PackageReadmeFile>README.md</PackageReadmeFile>
2525
</PropertyGroup>
2626

@@ -44,21 +44,22 @@
4444

4545
<PropertyGroup>
4646
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
47+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackAnalyzerDependencies</TargetsForTfmSpecificContentInPackage>
4748
</PropertyGroup>
4849

4950
<Target Name="GetDependencyTargetPaths">
5051
<ItemGroup>
5152
<TargetPathWithTargetPlatformMoniker Include="$(PKGYamlDotNet)\lib\net20\YamlDotNet.dll" IncludeRuntimeDependency="false" />
5253
<TargetPathWithTargetPlatformMoniker Include="$(PKGMicrosoft_Extensions_DependencyInjection_Abstractions)\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" IncludeRuntimeDependency="false" />
53-
<None Include="$(PKGYamlDotNet)\lib\net20\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
54-
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
55-
<None Include="$(PKGMicrosoft_Extensions_DependencyInjection_Abstractions)\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
5654
</ItemGroup>
5755
</Target>
5856

59-
<Target Name="EmbedProjectDependency" AfterTargets="Build" Condition="'$(TargetFramework)' != ''">
57+
<Target Name="PackAnalyzerDependencies" Condition="'$(TargetFramework)' == 'netstandard2.0'" DependsOnTargets="BuiltProjectOutputGroup;ResolveProjectReferences">
6058
<ItemGroup>
61-
<None Include="$(TargetDir)AKSoftware.Localization.MultiLanguages.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" Condition="Exists('$(TargetDir)AKSoftware.Localization.MultiLanguages.dll')" />
59+
<TfmSpecificPackageFile Include="$(OutputPath)$(AssemblyName).dll" PackagePath="analyzers/dotnet/cs" />
60+
<TfmSpecificPackageFile Include="$(PKGYamlDotNet)\lib\net20\YamlDotNet.dll" PackagePath="analyzers/dotnet/cs" />
61+
<TfmSpecificPackageFile Include="$(PKGMicrosoft_Extensions_DependencyInjection_Abstractions)\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" PackagePath="analyzers/dotnet/cs" />
62+
<TfmSpecificPackageFile Include="$(OutputPath)AKSoftware.Localization.MultiLanguages.dll" PackagePath="analyzers/dotnet/cs" Condition="Exists('$(OutputPath)AKSoftware.Localization.MultiLanguages.dll')" />
6263
</ItemGroup>
6364
</Target>
6465

0 commit comments

Comments
 (0)