diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.cs
index d5178ef9bd5..88091936c61 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateManifestMsi.cs
@@ -376,6 +376,11 @@ private string GeneratePackageProject(string msiPath, string msiJsonPath, string
writer.WriteElementString("Copyright", nupkg.Copyright);
}
+ if (!string.IsNullOrWhiteSpace(nupkg.ProjectUrl))
+ {
+ writer.WriteElementString("PackageProjectUrl", nupkg.ProjectUrl);
+ }
+
writer.WriteElementString("PackageLicenseExpression", "MIT");
writer.WriteEndElement();
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.cs
index c9a4bf14510..05ed00167a2 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/GenerateMsiBase.cs
@@ -369,6 +369,11 @@ private string GeneratePackageProject(string msiPath, string msiJsonPath, string
writer.WriteElementString("Copyright", nupkg.Copyright);
}
+ if (!string.IsNullOrWhiteSpace(nupkg.ProjectUrl))
+ {
+ writer.WriteElementString("PackageProjectUrl", nupkg.ProjectUrl);
+ }
+
writer.WriteElementString("PackageLicenseExpression", "MIT");
writer.WriteEndElement();
diff --git a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/NuGetPackage.cs b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/NuGetPackage.cs
index 8a7cacb015c..20f4c8ba06a 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Workloads/src/NuGetPackage.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Workloads/src/NuGetPackage.cs
@@ -72,6 +72,11 @@ public string Title
get;
}
+ public string ProjectUrl
+ {
+ get;
+ }
+
///
/// The version of the NuGet package.
///
@@ -96,6 +101,7 @@ public NugetPackage(string packagePath, TaskLoggingHelper log)
Description = nuspecReader.GetDescription();
Copyright = nuspecReader.GetCopyright();
LicenseData = nuspecReader.GetLicenseMetadata();
+ ProjectUrl = nuspecReader.GetProjectUrl();
}
///