Skip to content

Commit 1408009

Browse files
committed
Pack source generator DLL as analyzer
1 parent d5af81c commit 1408009

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/SharpYaml/SharpYaml.csproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3131
</PropertyGroup>
3232

33+
<PropertyGroup>
34+
<SharpYamlSourceGenAssembly>$(MSBuildThisFileDirectory)..\SharpYaml.SourceGenerator\bin\$(Configuration)\netstandard2.0\SharpYaml.SourceGenerator.dll</SharpYamlSourceGenAssembly>
35+
</PropertyGroup>
36+
3337
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
3438
<AssemblyOriginatorKeyFile>SharpYaml.snk</AssemblyOriginatorKeyFile>
3539
<SignAssembly>true</SignAssembly>
@@ -39,6 +43,9 @@
3943
<None Include="$(MSBuildThisFileDirectory)../../img/SharpYaml.png" Pack="true" PackagePath="/" />
4044
<None Include="$(MSBuildThisFileDirectory)../../README.md" Pack="true" PackagePath="/" Link="readme.md" />
4145
<None Include="SharpYaml.targets" Pack="true" PackagePath="buildTransitive/SharpYaml.targets" />
46+
<!-- Ship the source generator with the main package (no separate generator NuGet package). -->
47+
<None Include="$(SharpYamlSourceGenAssembly)" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
48+
<None Include="$(SharpYamlSourceGenAssembly).pdb" Condition="Exists('$(SharpYamlSourceGenAssembly).pdb')" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
4249
</ItemGroup>
4350

4451
<ItemGroup>
@@ -59,9 +66,6 @@
5966
<ProjectReference Include="..\SharpYaml.SourceGenerator\SharpYaml.SourceGenerator.csproj"
6067
OutputItemType="Analyzer"
6168
ReferenceOutputAssembly="false"
62-
PrivateAssets="all"
63-
Pack="true"
64-
PackagePath="analyzers/dotnet/cs"
65-
Visible="false" />
69+
PrivateAssets="all" />
6670
</ItemGroup>
6771
</Project>

0 commit comments

Comments
 (0)