This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
forked from dotnet/msbuild
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Directory.Build.targets
37 lines (30 loc) · 1.66 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
26
27
28
29
30
31
32
33
34
35
36
37
<Project>
<PropertyGroup>
<ThirdPartyNotice Condition=" '$(ThirdPartyNotice)' == '' ">$(RepoRoot)THIRDPARTYNOTICES.txt</ThirdPartyNotice>
<AssemblyTitle>$(TargetFileName)</AssemblyTitle>
<Description Condition="'$(Description)' == ''">$(TargetFileName)</Description>
</PropertyGroup>
<ItemGroup>
<None Include="$(ThirdPartyNotice)" Pack="true" PackagePath="notices" Visible="false" Condition=" '$(IsPackable)' == 'true' " />
</ItemGroup>
<Target Name="_RemoveMSSourceLinkGitHub" AfterTargets="CollectPackageReferences" Condition="'$(MonoBuild)' == 'true'">
<ItemGroup>
<PackageReference Remove="Microsoft.SourceLink.GitHub" />
<PackageReference Remove="Microsoft.SourceLink.AzureRepos.Git" />
</ItemGroup>
</Target>
<PropertyGroup>
<CentralPackagesFile>$(MSBuildThisFileDirectory)eng/Packages.props</CentralPackagesFile>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.Build.CentralPackageVersions" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Target Name="DeleteDevPackage" AfterTargets="GenerateNuspec">
<!-- If package just built was already in global packages folder, delete it. This helps support a local dev cycle where you are consuming
a package from another repo without having to update the package version each time. -->
<PropertyGroup>
<_PackageFolderInGlobalPackages>$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())\$(PackageVersion)</_PackageFolderInGlobalPackages>
</PropertyGroup>
<RemoveDir Directories="$(_PackageFolderInGlobalPackages)"
Condition="Exists('$(_PackageFolderInGlobalPackages)')" />
</Target>
</Project>