forked from falahati/WindowsFirewallHelper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNuGet.targets
17 lines (17 loc) · 1.03 KB
/
NuGet.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AfterBuild">
<GetAssemblyIdentity AssemblyFiles="$(OutputPath)$(AssemblyName).dll">
<Output TaskParameter="Assemblies" ItemName="OutputAssemblyInfo" />
</GetAssemblyIdentity>
<Message Text="Info: %(OutputAssemblyInfo.Version)" />
</Target>
<Target Name="Package">
<RemoveDir Directories="NuGet" />
<MakeDir Directories="NuGet" />
<Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe pack "$(ProjectName).csproj" -Verbosity detailed -Symbols -OutputDir "NuGet" -Version "%(OutputAssemblyInfo.Version)" -Properties "Configuration=$(Configuration)" -IncludeReferencedProjects" />
</Target>
<Target Name="Publish">
<Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe push "NuGet\$(AssemblyName).%(OutputAssemblyInfo.Version).nupkg" -Verbosity detailed -Source "https://www.nuget.org/api/v2/package"" />
</Target>
</Project>