forked from dotnet/project-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
80 lines (71 loc) · 4.17 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information. -->
<Project>
<Import Project="eng\imports\StrongName.targets" />
<Import Project="eng\imports\SymStore.targets" Condition="'$(CIBuild)' == 'true'"/>
<!-- VSSDK is needed in projects generating VSIX packages or pkgdef files. -->
<!-- Manually importing the .targets here allows SDK-style VS Extension projects to build properly. -->
<!-- See: https://github.com/dotnet/msbuild/issues/2393#issuecomment-1126563335 -->
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="Exists('$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets') and ('$(IsVsixProject)' == 'true' or '$(GeneratePkgDefFile)' == 'true')" />
<Import Project="eng\imports\Workarounds.targets"/>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)src\Common\BannedSymbols.txt" Condition="'$(BannedSymbolsOptOut)' != 'true'" />
</ItemGroup>
<!-- With UseCommonOutputDirectory turned on, any copy-local projects/references break csproj's up-to-date check because they aren't copied to the output directory. Turn it off. -->
<ItemDefinitionGroup Condition="'$(UseCommonOutputDirectory)' == 'true'">
<Reference>
<Private>false</Private>
</Reference>
<ProjectReference>
<Private>false</Private>
</ProjectReference>
</ItemDefinitionGroup>
<!-- Sets the version numbers for local builds. -->
<!-- This applies to Nerdbank.GitVersioning targets. It changes the version information after it is set but before it is used to generate assembly info. -->
<!-- This was set to BeforeTargets GenerateAssemblyNBGVVersionInfo, but didn't work for multi-target framework Pack operation, which also calls GetBuildVersion. -->
<Target Name="SetLocalBuildVersions" AfterTargets="GetBuildVersion" Condition="'$(CIBuild)' != 'true'">
<PropertyGroup>
<Version>$(LocalBuildVersion)-dev</Version>
<!-- https://stackoverflow.com/a/65062/294804 -->
<AssemblyVersion>$(LocalBuildVersion).0</AssemblyVersion>
<!-- Note: BuildVersion is used for VSIXs and VS insertions. -->
<BuildVersion>$(AssemblyVersion)</BuildVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<AssemblyFileVersion>$(AssemblyVersion)</AssemblyFileVersion>
<AssemblyInformationalVersion>$(AssemblyVersion)</AssemblyInformationalVersion>
<!-- These must use a version that marks them as prerelease via a suffix. -->
<!-- In this case, Version has the -dev suffix. Otherwise, an this error will occur from dependent packages. -->
<!-- error NU5104: A stable release of a package should not have a prerelease dependency. -->
<PackageVersion>$(Version)</PackageVersion>
<NuGetPackageVersion>$(Version)</NuGetPackageVersion>
<NPMPackageVersion>$(Version)</NPMPackageVersion>
<!--
NOTICE: Keep this information here for reference as it is useful to understand how version information is computed.
Example output from GetBuildVersion in Nerdbank.GitVersioning:
BuildVersion = 17.3.32.55474
AssemblyInformationalVersion = 17.3.32+d8b2cf4a2d
AssemblyFileVersion = 17.3.32.55474
FileVersion = 17.3.32.55474
BuildVersionSimple = 17.3.32
PrereleaseVersion =
MajorMinorVersion = 17.3
AssemblyVersion = 17.3.0.0
GitCommitId = d8b2cf4a2d7e5946c6e4a5166155f194cfce9db4
GitCommitIdShort = d8b2cf4a2d
GitCommitDateTicks = 637914599150000000
GitVersionHeight = 32
BuildNumber = 32
BuildVersionNumberComponent = 32
PublicRelease = False
BuildingRef = refs/heads/feature/RemoveRoslynTools
SemVerBuildSuffix = +d8b2cf4a2d
NuGetPackageVersion = 17.3.32-gd8b2cf4a2d
ChocolateyPackageVersion = 17.3.32-gd8b2cf4a2d
Version = 17.3.32-gd8b2cf4a2d
PackageVersion = 17.3.32-gd8b2cf4a2d
NPMPackageVersion = 17.3.32-gd8b2cf4a2d
BuildVersion3Components = 17.3.32
CloudBuildNumber = 17.3.32
-->
</PropertyGroup>
</Target>
</Project>