Skip to content

Commit

Permalink
Fixed the nuget package icon not being bound
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronMayne committed May 13, 2024
1 parent b5d7131 commit f8a5865
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<RootNamespace>SGF</RootNamespace>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<SGFSourceDir>$(MSBuildThisFileDirectory)</SGFSourceDir>
<ImgDir>$(MSBuildThisFileDirectory)..\img\</ImgDir>
<SGfIco>$(MSBuildThisFileDirectory)..\img\icon.png</SGfIco>
<!-- Icons -->
<ApplicationIcon>$(MSBuildThisFileDirectory)..\img\icon.ico</ApplicationIcon>


<!-- Paths | SGF Core -->
<SGFProjectDir>$(SGFSourceDir)SourceGenerator.Foundations\</SGFProjectDir>
<SGFProjectPath>$(SGFProjectDir)SourceGenerator.Foundations.csproj</SGFProjectPath>
Expand Down
6 changes: 5 additions & 1 deletion src/Nuget.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
===============================-->
<PropertyGroup>
<TItle>Source Generator Foundations</TItle>
<AUthors>Byron Mayne</AUthors>
<Authors>Byron Mayne</Authors>
<PackageIcon>SgfIcon.png</PackageIcon>
<Description>Provides boilerplate code to be used by source generators. Provides the ability to have nuget packages that are resolvable at runtime as well as much better exception handling.</Description>
<PackageProjectUrl>https://github.dev/ByronMayne/SourceGenerator.Foundations</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand All @@ -21,6 +22,9 @@
<!-- Changes the content of the nuget package by manually adding files-->
<Target Name="AppendNugetContent">
<ItemGroup>
<TfmSpecificPackageFile Include="$(ImgDir)icon.png">
<PackagePath>/$(PackageIcon)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="$(SGFContractsProjectDir)bin\$(Configuration)\netstandard2.0\SourceGenerator.Foundations.Contracts.dll">
<PackagePath>lib/netstandard2.0/SourceGenerator.Foundations.Contracts.dll</PackagePath>
</TfmSpecificPackageFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@
<LangVersion>11</LangVersion>
<IsRoslynComponent>true</IsRoslynComponent>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);CustomNugetPack</TargetsForTfmSpecificContentInPackage>
<ApplicationIcon>icon.ico</ApplicationIcon>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<None Include="..\..\img\icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\README.md" Pack="True" PackagePath="/" />
<None Update="SourceGenerator.Foundations.props" Pack="True" PackagePath="build/$(AssemblyName).props" />
<None Update="SourceGenerator.Foundations.targets" Pack="True" PackagePath="build/$(AssemblyName).targets" />
Expand Down
Binary file removed src/SourceGenerator.Foundations/icon.ico
Binary file not shown.

0 comments on commit f8a5865

Please sign in to comment.