Skip to content

Commit 52d0c56

Browse files
committed
fix: Lua.SourceGenerator.csproj settings
1 parent 3f81f76 commit 52d0c56

2 files changed

Lines changed: 20 additions & 15 deletions

File tree

src/Lua.SourceGenerator/Lua.SourceGenerator.csproj

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<LangVersion>13</LangVersion>
55
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
<IsRoslynComponent>true</IsRoslynComponent>
8-
<AnalyzerLanguage>cs</AnalyzerLanguage>
96
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
7+
<AnalyzerLanguage>cs</AnalyzerLanguage>
8+
<Nullable>enable</Nullable>
9+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
1010
<IncludeBuildOutput>false</IncludeBuildOutput>
1111
<DevelopmentDependency>true</DevelopmentDependency>
1212
<IncludeSymbols>false</IncludeSymbols>
1313
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
14+
<IsRoslynComponent>true</IsRoslynComponent>
1415

1516
<!-- NuGet -->
1617
<PackageId>LuaCSharp.SourceGenerator</PackageId>
@@ -19,18 +20,26 @@
1920
</PropertyGroup>
2021

2122
<ItemGroup>
22-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0" />
23-
<None
24-
Include="$(OutputPath)\$(AssemblyName).dll"
25-
Pack="true"
26-
PackagePath="analyzers/dotnet/cs"
27-
Visible="false"
28-
/>
23+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0" PrivateAssets="all" />
2924
</ItemGroup>
3025

3126
<ItemGroup>
3227
<None Include="../../Icon.png" Pack="true" PackagePath="/" />
3328
<None Include="..\..\README.md" Pack="true" PackagePath="README.md" />
3429
<EmbeddedResource Include="..\..\LICENSE" />
3530
</ItemGroup>
31+
32+
<!-- for NuGet publish -->
33+
<Target
34+
Name="PackBuildOutputs"
35+
DependsOnTargets="SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup"
36+
>
37+
<ItemGroup>
38+
<TfmSpecificPackageFile Include="$(TargetDir)\*.dll" PackagePath="analyzers\dotnet\cs" />
39+
<TfmSpecificPackageFile
40+
Include="@(SatelliteDllsProjectOutputGroupOutput->'%(FinalOutputPath)')"
41+
PackagePath="analyzers\dotnet\cs\%(SatelliteDllsProjectOutputGroupOutput.Culture)\"
42+
/>
43+
</ItemGroup>
44+
</Target>
3645
</Project>

src/Lua/Lua.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@
3232
</ItemGroup>
3333

3434
<ItemGroup>
35-
<ProjectReference
36-
Include="..\Lua.SourceGenerator\Lua.SourceGenerator.csproj"
37-
OutputItemType="Analyzer"
38-
ReferenceOutputAssembly="false"
39-
/>
35+
<ProjectReference Include="..\Lua.SourceGenerator\Lua.SourceGenerator.csproj" />
4036
<ProjectReference Include="..\Lua.Annotations\Lua.Annotations.csproj" />
4137
</ItemGroup>
4238
</Project>

0 commit comments

Comments
 (0)