diff options
author | Viktor Hofer <viktor.hofer@microsoft.com> | 2020-12-23 00:41:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 00:41:05 +0300 |
commit | 5232af5760a4c0b0a4009f63e71aa9391eab2cbf (patch) | |
tree | 4762111fa37973dfe16b9695ac4f7232e154783f /Directory.Build.targets | |
parent | e00950716d20cac329565e79a16795b08e2f9925 (diff) |
Set IsPackable and validate PackageDescription (#46329)
* Set IsPackable and validate PackageDescription
Diffstat (limited to 'Directory.Build.targets')
-rw-r--r-- | Directory.Build.targets | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Directory.Build.targets b/Directory.Build.targets index 7af5848d9af..6b1d21054a2 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,4 @@ -<Project> - +<Project InitialTargets="ErrorForMissingPackageDescription"> <PropertyGroup> <!-- For non-SDK projects that import this file and then import Microsoft.Common.targets, @@ -33,4 +32,10 @@ <!-- Keep in sync as required by the Packaging SDK in Arcade. --> <Description>$(PackageDescription)</Description> </PropertyGroup> + + <!-- Remove when https://github.com/NuGet/Home/issues/10405 is implemented and consumed. --> + <Target Name="ErrorForMissingPackageDescription" + Condition="'$(IsPackable)' == 'true' and '$(PackageDescription)' == ''"> + <Error Text="Required property 'PackageDescription' is missing for $(MSBuildProjectName)." /> + </Target> </Project>
\ No newline at end of file |