Created
February 3, 2023 08:00
-
-
Save kek-Sec/8a731c4240fdd07e8f8c704e11ea95c3 to your computer and use it in GitHub Desktop.
Nuget Naming & Build on Post Build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> | |
<!-- do not run if not release --> | |
<PropertyGroup> | |
<IsRelease Condition="'$(Configuration)' == 'Release'">true</IsRelease> | |
</PropertyGroup> | |
<!-- place nuget package one folder up from root in a folder called nuget --> | |
<Exec Command="dotnet pack -c Release -o nuget -p:PackageVersion=$([System.DateTime]::Now.ToString("yyyy.MM.dd.HHmmss")) --no-build" Condition="'$(IsRelease)' == 'true'" /> | |
<Message Text="Package created " /> | |
<!-- print build summary --> | |
<Message Text="Build summary:" Importance="high" /> | |
<Message Text=" Configuration: $(Configuration)" Importance="high" /> | |
<Message Text=" TargetFramework: $(TargetFramework)" Importance="high" /> | |
<Message Text=" Platform: $(Platform)" Importance="high" /> | |
<Message Text=" OutputPath: $(OutputPath)" Importance="high" /> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment