Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,18 @@
<ProjectReference Include="../CookieCrumble.Analyzers/CookieCrumble.Analyzers.csproj" PrivateAssets="All" ExcludeAssets="compile;runtime" />
</ItemGroup>

<ItemGroup>
<!-- Package the generator in the analyzer directory of the nuget package -->
<None Include="$(OutputPath)\net10.0\CookieCrumble.Analyzers.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddGeneratorToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<!-- Package the generator into the analyzer directory of the NuGet package.
Runs after pack's build phase has populated $(OutputPath).
This project multi-targets, so emit the analyzer only once (the per-TFM target
fires per framework) to avoid a duplicate package-path collision. -->
<Target Name="_AddGeneratorToPackage">
<ItemGroup>
<TfmSpecificPackageFile Condition="'$(TargetFramework)' == 'net10.0'" Include="$(OutputPath)CookieCrumble.Analyzers.dll" PackagePath="analyzers/dotnet/cs" />
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@
<ProjectReference Include="../CookieCrumble.Analyzers/CookieCrumble.Analyzers.csproj" PrivateAssets="All" ExcludeAssets="compile;runtime" />
</ItemGroup>

<ItemGroup>
<!-- Package the generator in the analyzer directory of the nuget package -->
<None Include="$(OutputPath)\net10.0\CookieCrumble.Analyzers.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddGeneratorToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<!-- Package the generator into the analyzer directory of the NuGet package.
Runs after pack's build phase has populated $(OutputPath).
This project multi-targets, so emit the analyzer only once (the per-TFM target
fires per framework) to avoid a duplicate package-path collision. -->
<Target Name="_AddGeneratorToPackage">
<ItemGroup>
<TfmSpecificPackageFile Condition="'$(TargetFramework)' == 'net10.0'" Include="$(OutputPath)CookieCrumble.Analyzers.dll" PackagePath="analyzers/dotnet/cs" />
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@
<PackageReference Include="Microsoft.Bcl.HashCode" VersionOverride="1.1.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<!-- Package the generator in the analyzer directory of the nuget package -->
<None Include="$(OutputPath)\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddGeneratorToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<!-- Package the generator into the analyzer directory of the NuGet package.
Runs after pack's build phase has populated $(OutputPath). -->
<Target Name="_AddGeneratorToPackage">
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)*.dll" PackagePath="analyzers/dotnet/cs" />
</ItemGroup>
</Target>

<ItemGroup>
<EmbeddedResource Update="Properties\SourceGenResources.resx">
Expand Down
14 changes: 11 additions & 3 deletions src/Mocha/src/Mocha.Analyzers/Mocha.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.HashCode" VersionOverride="1.1.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<None Include="$(OutputPath)\*.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddGeneratorToPackage</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<!-- Package the generator into the analyzer directory of the NuGet package.
Runs after pack's build phase has populated $(OutputPath). -->
<Target Name="_AddGeneratorToPackage">
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)*.dll" PackagePath="analyzers/dotnet/cs" />
</ItemGroup>
</Target>
</Project>
Loading