forked from ardalis/ddd-guestbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
25 lines (21 loc) · 1.18 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Scripts">
<PowerShell>powershell -NoProfile -ExecutionPolicy Unrestricted -command</PowerShell>
<Pack>dotnet pack "$(MSBuildProjectDirectory)\$(ProjectFileName)" --no-build -o C:\NugetSource -c $(Configuration)</Pack>
</PropertyGroup>
<Target Name="PackNugets" AfterTargets="AfterBuild" Condition="'$(DeployNugetPackages)'=='true'">
<Exec Command="$(Pack)"/>
</Target>
<!-- https://github.com/NuGet/Home/issues/4412. -->
<Target Name="CopyDepsFiles" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
<ItemGroup>
<DepsFilePaths Include="$([System.IO.Path]::ChangeExtension('%(_ResolvedProjectReferencePaths.FullPath)', '.deps.json'))" />
</ItemGroup>
<Copy SourceFiles="%(DepsFilePaths.FullPath)" DestinationFolder="$(OutputPath)" Condition="Exists('%(DepsFilePaths.FullPath)')" />
</Target>
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish" Condition="'$(WebProjectMode)' == 'true'">
<Exec Command="bower install" />
<Exec Command="dotnet bundle" />
</Target>
</Project>