Skip to content

Commit

Permalink
Add PackageIcon entry for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
jskeet committed Mar 16, 2020
1 parent 687dfd3 commit a330ff7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Binary file added NuGetIcon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions tools/Google.Cloud.Tools.ProjectGenerator/Program.cs
Expand Up @@ -439,6 +439,7 @@ private static void GenerateMainProject(ApiMetadata api, string directory, HashS
new XElement("PackageTags", string.Join(";", api.Tags.Concat(new[] { "Google", "Cloud" }))),
new XElement("Copyright", $"Copyright {DateTime.UtcNow.Year} Google LLC"),
new XElement("Authors", "Google LLC"),
new XElement("PackageIcon", "NuGetIcon.png"),
new XElement("PackageIconUrl", "https://cloud.google.com/images/gcp-icon-64x64.png"),
new XElement("PackageLicenseFile", "LICENSE"),
new XElement("PackageProjectUrl", "https://github.com/googleapis/google-cloud-dotnet"),
Expand All @@ -455,6 +456,11 @@ private static void GenerateMainProject(ApiMetadata api, string directory, HashS
new XAttribute("Include", "../../../LICENSE"),
new XAttribute("Pack", true),
new XAttribute("PackagePath", ""))); // Note: not $(PackageLicenseFile) as suggested in docs, due to us using a file with no extension
// Pack the icon file; this element isn't a dependency, but it still belongs in an ItemGroup...
dependenciesElement.Add(new XElement("None",
new XAttribute("Include", "../../../NuGetIcon.png"),
new XAttribute("Pack", true),
new XAttribute("PackagePath", "")));

if (api.Type == ApiType.Analyzers)
{
Expand Down

0 comments on commit a330ff7

Please sign in to comment.