|
19 | 19 |
|
20 | 20 | <IsRoslynAnalyzer>true</IsRoslynAnalyzer> |
21 | 21 | <DevelopmentDependency>true</DevelopmentDependency> |
| 22 | + <DebugType>portable</DebugType> |
22 | 23 | <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |
23 | 24 | </PropertyGroup> |
24 | 25 |
|
|
30 | 31 | <PackageReadmeFile>README.md</PackageReadmeFile> |
31 | 32 | <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> |
32 | 33 | <PackageLicenseExpression>MIT</PackageLicenseExpression> |
| 34 | + <PublishRepositoryUrl>true</PublishRepositoryUrl> |
33 | 35 | </PropertyGroup> |
34 | 36 |
|
35 | 37 | <PropertyGroup> |
|
52 | 54 | <ItemGroup> |
53 | 55 | <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" /> |
54 | 56 | <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="all" /> |
| 57 | + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0"> |
| 58 | + <PrivateAssets>all</PrivateAssets> |
| 59 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
| 60 | + </PackageReference> |
55 | 61 | </ItemGroup> |
56 | 62 |
|
57 | 63 | <ItemGroup> |
58 | | - <!-- This ensures the generator DLL itself is placed in the analyzers folder --> |
59 | | - <!-- The SDK usually handles this automatically when Microsoft.CodeAnalysis.* are referenced --> |
60 | | - <!-- but explicitly adding it can sometimes help if packing behaves unexpectedly. --> |
61 | | - <None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" /> |
62 | | - |
63 | 64 | <!-- Pack the attributes dll in the analyzers/dotnet/cs path --> |
64 | | - <None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" /> |
| 65 | + <None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" /> |
| 66 | + <!-- Explicitly pack the main DLL as an analyzer --> |
| 67 | + <None Include="$(TargetDir)$(TargetFileName)" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" /> |
| 68 | + </ItemGroup> |
65 | 69 |
|
66 | | - <!-- Pack the attributes dll in the lib\netstandard2.0 path --> |
67 | | - <None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" /> |
68 | | - <None Include="$(OutputPath)\Datacute.SourceGeneratorContext.Attribute.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" /> |
| 70 | + <ItemGroup> |
| 71 | + <!-- Pack the attributes dll and related files in the lib/netstandard2.0 path --> |
| 72 | + <None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" /> |
| 73 | + <None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" /> |
| 74 | + <None Include="..\SourceGeneratorContext.Attribute\bin\$(Configuration)\netstandard2.0\Datacute.SourceGeneratorContext.Attribute.pdb" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" /> |
69 | 75 |
|
70 | 76 | <None Include="../README.md" Pack="true" PackagePath="" /> |
71 | 77 | </ItemGroup> |
72 | 78 |
|
73 | 79 | <ItemGroup> |
74 | | - <ProjectReference Include="..\SourceGeneratorContext.Attribute\SourceGeneratorContext.Attribute.csproj" /> |
| 80 | + <ProjectReference Include="..\SourceGeneratorContext.Attribute\SourceGeneratorContext.Attribute.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" IncludeAssets="none" /> |
75 | 81 | </ItemGroup> |
76 | | - |
77 | | - <Target Name="CopyDatacuteLightweightTracing" AfterTargets="Build"> |
78 | | - <ItemGroup> |
79 | | - <DatacuteLightweightTracingFiles Include="$(PkgDatacute_LightweightTracing)\lib\netstandard2.0\*.dll" /> |
80 | | - </ItemGroup> |
81 | | - <Copy SourceFiles="@(DatacuteLightweightTracingFiles)" DestinationFolder="$(OutputPath)" /> |
82 | | - </Target> |
83 | 82 | </Project> |
0 commit comments