Skip to content

Commit

Permalink
Merge pull request #229 from earloc/fix/package
Browse files Browse the repository at this point in the history
fix: package to contain the anlyzer
  • Loading branch information
earloc authored Oct 25, 2024
2 parents 850cd3f + a440dc7 commit e9b78a9
Showing 1 changed file with 96 additions and 75 deletions.
171 changes: 96 additions & 75 deletions src/TypealizR/TypealizR.csproj
Original file line number Diff line number Diff line change
@@ -1,77 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="MultilingualAppToolkit">
<MultilingualAppToolkitVersion>4.0</MultilingualAppToolkitVersion>
<MultilingualFallbackLanguage>en</MultilingualFallbackLanguage>
<TranslationReport Condition="'$(Configuration)' == 'Release'">true</TranslationReport>
<SuppressPseudoWarning Condition="'$(Configuration)' == 'Debug'">true</SuppressPseudoWarning>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>
<PropertyGroup>
<PackageId>TypealizR</PackageId>
<IsPackable>true</IsPackable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Title>TypealizR</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>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
<ItemGroup>
<None Include="../../README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<None Remove="MultilingualResources\TypealizR.de.xlf" />
<None Remove="MultilingualResources\TypealizR.qps-ploc.xlf" />
</ItemGroup>

<Import Project="$(MSBuildExtensionsPath)\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.ResxResources.targets" Label="MultilingualAppToolkit" Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Multilingual App Toolkit\v$(MultilingualAppToolkitVersion)\Microsoft.Multilingual.ResxResources.targets')" />
<Target Name="MATPrerequisite" BeforeTargets="PrepareForBuild" Condition="!Exists('$(MSBuildExtensionsPath)\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.ResxResources.targets')" Label="MultilingualAppToolkit">
<Warning Text="$(MSBuildProjectFile) is Multilingual build enabled, but the Multilingual App Toolkit is unavailable during the build. If building with Visual Studio, please check to ensure that toolkit is properly installed." />
</Target>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" GeneratePathProperty="true">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.10" PrivateAssets="all" GeneratePathProperty="true" />
</ItemGroup>

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="MultilingualAppToolkit">
<MultilingualAppToolkitVersion>4.0</MultilingualAppToolkitVersion>
<MultilingualFallbackLanguage>en</MultilingualFallbackLanguage>
<TranslationReport Condition="'$(Configuration)' == 'Release'">true</TranslationReport>
<SuppressPseudoWarning Condition="'$(Configuration)' == 'Debug'">true</SuppressPseudoWarning>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>
<PropertyGroup>
<PackageId>TypealizR</PackageId>
<IsPackable>true</IsPackable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Title>TypealizR</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>
<ProjectReference Include="..\TypealizeR.Analyzers.CodeFixes\TypealizeR.Analyzers.CodeFixes.csproj" />
<ProjectReference Include="..\TypealizeR.Analyzers\TypealizeR.Analyzers.csproj" />
</ItemGroup>
<ItemGroup>
<XliffResource Include="MultilingualResources\TypealizR.de.xlf" />
<XliffResource Include="MultilingualResources\TypealizR.qps-ploc.xlf" />
</ItemGroup>
<ItemGroup>
<Compile Update="Diagnostics\Strings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Diagnostics\Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
<ItemGroup>
<None Include="../../README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<None Remove="MultilingualResources\TypealizR.de.xlf" />
<None Remove="MultilingualResources\TypealizR.qps-ploc.xlf" />
</ItemGroup>

<Import Project="$(MSBuildExtensionsPath)\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.ResxResources.targets" Label="MultilingualAppToolkit" Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Multilingual App Toolkit\v$(MultilingualAppToolkitVersion)\Microsoft.Multilingual.ResxResources.targets')" />
<Target Name="MATPrerequisite" BeforeTargets="PrepareForBuild" Condition="!Exists('$(MSBuildExtensionsPath)\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.ResxResources.targets')" Label="MultilingualAppToolkit">
<Warning Text="$(MSBuildProjectFile) is Multilingual build enabled, but the Multilingual App Toolkit is unavailable during the build. If building with Visual Studio, please check to ensure that toolkit is properly installed." />
</Target>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" GeneratePathProperty="true">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<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" />
</ItemGroup>
<ItemGroup>
<Compile Update="Diagnostics\Strings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Diagnostics\Strings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

0 comments on commit e9b78a9

Please sign in to comment.