-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
42 lines (33 loc) · 1.56 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
38
39
40
41
42
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup Condition="'$(InfoVersion)' == '' and '$(Suffix)'==''">
<Version>$(BaseVersion).$(FileRevision)</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(InfoVersion)' == '' and '$(Suffix)'!=''">
<Version>$(BaseVersion)-$(Suffix)</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(InfoVersion)' != ''">
<Version>$(InfoVersion)</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(FullVersion)' == ''">
<AssemblyVersion>$(BaseVersion).$(FileRevision)</AssemblyVersion>
<FileVersion>$(BaseVersion).$(FileRevision)</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(FullVersion)' != ''">
<AssemblyVersion>$(FullVersion)</AssemblyVersion>
<FileVersion>$(FullVersion)</FileVersion>
</PropertyGroup>
<ItemGroup Condition="'$(OutputType)' != 'Library'">
<PackageReference Remove="Microsoft.SourceLink.AzureRepos.Git" />
</ItemGroup>
<PropertyGroup Condition="'$(OutputType)' != 'Library'">
<EnableSourceLink>false</EnableSourceLink>
</PropertyGroup>
<!-- Fixes a bug in AZDO Builds for embedded pdbs during dotnet pack -->
<Target Name="FixupEmbeddedPdb" BeforeTargets="_CopyFilesMarkedCopyLocal" Condition="'@(ReferenceCopyLocalPaths)' != '' and '$(DebugType)'=='embedded'" >
<!-- Find files in the list that don't actually exist and remove them-->
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)'=='.pdb' and !Exists('%(FullPath)')" />
</ItemGroup>
</Target>
</Project>