Skip to content

Commit

Permalink
Merge pull request #230 from earloc/fix/package
Browse files Browse the repository at this point in the history
feature: use dedicated packages for analyzers and codefixes
  • Loading branch information
earloc authored Oct 25, 2024
2 parents e9b78a9 + ad57e5d commit 29e6082
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 49 deletions.
26 changes: 0 additions & 26 deletions src/TypealizR/TypealizR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,6 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.10" PrivateAssets="all" GeneratePathProperty="true" />
</ItemGroup>


<!--
https://github.com/NuGet/Home/issues/3891#issuecomment-2083158085
-->
<PropertyGroup>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeProjectReferenceDlls</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TypealizeR.Analyzers.CodeFixes\TypealizeR.Analyzers.CodeFixes.csproj" PrivateAssets="all" />
<ProjectReference Include="..\TypealizeR.Analyzers\TypealizeR.Analyzers.csproj" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- Add a ref folder to the package which only exposes the library so that the referenced class library doesn't get exposed. -->
<None Include="$(TargetPath)" PackagePath="ref/$(TargetFramework)" Pack="true" Condition="'$(TargetFramework)' != ''" />
</ItemGroup>
<Target Name="IncludeProjectReferenceDlls" DependsOnTargets="BuildOnlySettings;ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'All'))"/>
</ItemGroup>
</Target>
<!--
https://github.com/NuGet/Home/issues/3891#issuecomment-2083158085
-->


<ItemGroup>
<XliffResource Include="MultilingualResources\TypealizR.de.xlf" />
<XliffResource Include="MultilingualResources\TypealizR.qps-ploc.xlf" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
<RootNamespace>TypealizeR.Analyzers</RootNamespace>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>TypealizR.Analyzers.CodeFixes</PackageId>
<IsPackable>true</IsPackable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Title>TypealizR.Analyzers.CodeFixes</Title>
<Authors>earloc</Authors>
<Product>TypealizR</Product>
<PackageProjectUrl>https://github.com/earloc/TypealizR</PackageProjectUrl>
<RepositoryUrl>https://github.com/earloc/TypealizR</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageOutputPath>../../bin</PackageOutputPath>
<DevelopmentDependency>true</DevelopmentDependency>
<IsRoslynComponent>true</IsRoslynComponent>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
</ItemGroup>
Expand Down
62 changes: 40 additions & 22 deletions src/TypealizeR.Analyzers/TypealizeR.Analyzers.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,47 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>

<ItemGroup>
<None Remove="AnalyzerReleases.Shipped.md" />
</ItemGroup>
<PropertyGroup>
<PackageId>TypealizR.Analyzers</PackageId>
<IsPackable>true</IsPackable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Title>TypealizR.Analyzers</Title>
<Authors>earloc</Authors>
<Product>TypealizR</Product>
<PackageProjectUrl>https://github.com/earloc/TypealizR</PackageProjectUrl>
<RepositoryUrl>https://github.com/earloc/TypealizR</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageOutputPath>../../bin</PackageOutputPath>
<DevelopmentDependency>true</DevelopmentDependency>
<IsRoslynComponent>true</IsRoslynComponent>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
</ItemGroup>
<ItemGroup>
<None Remove="AnalyzerReleases.Shipped.md" />
</ItemGroup>

<ItemGroup>
<Compile Update="Resources.Designer.cs" DesignTime="True" AutoGen="True" DependentUpon="Resources.resx" />
<EmbeddedResource Update="Resources.resx" Generator="ResXFileCodeGenerator" LastGenOutput="Resources.Designer.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
</ItemGroup>

</Project>
<ItemGroup>
<Compile Update="Resources.Designer.cs" DesignTime="True" AutoGen="True"
DependentUpon="Resources.resx" />
<EmbeddedResource Update="Resources.resx" Generator="ResXFileCodeGenerator"
LastGenOutput="Resources.Designer.cs" />
</ItemGroup>

</Project>

0 comments on commit 29e6082

Please sign in to comment.