-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
21 lines (17 loc) · 984 Bytes
/
Directory.Build.targets
File metadata and controls
21 lines (17 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<Project>
<ItemGroup>
<PackageReference Include="MinVer" Version="4.3.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<!-- Copy package to local packages repository -->
<Target Name="CopyPackage" AfterTargets="Pack" Condition="exists('$(MSBuildThisFileDirectory)..\LocalPackages\')">
<Message Text="Copy '$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg' to '$(MSBuildThisFileDirectory)..\LocalPackages\'" Importance="high"/>
<Copy
SourceFiles="$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg"
DestinationFolder="$(MSBuildThisFileDirectory)..\LocalPackages\"
ContinueOnError="false" />
<Message Text="Delete local package folder 'C:\Users\$([System.Environment]::UserName)\.nuget\packages\$(PackageId)\$(PackageVersion)'" Importance="high"/>
<RemoveDir Directories="C:\Users\$([System.Environment]::UserName)\.nuget\packages\$(PackageId)\$(PackageVersion)" />
</Target>
</Project>