forked from dotnet/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Common.props
65 lines (52 loc) · 4.19 KB
/
Common.props
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
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="OutDir;Configuration">
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- This file is imported by all projects at the beginning of the project files -->
<!-- Project language -->
<PropertyGroup Condition="'$(ProjectLanguage)' == ''">
<ProjectLanguage Condition="'$(MSBuildProjectExtension)' == '.csproj' OR '$(Language)' == 'C#'">CSharp</ProjectLanguage>
</PropertyGroup>
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- When building in visual studio, automatically sync .xlf files to .resx files on build.
Otherwise, let the build fail so that official/CI builds catch .xlf files that are not up-to-date. -->
<UpdateXlfOnBuild Condition="'$(BuildingInsideVisualStudio)' == 'true'">true</UpdateXlfOnBuild>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<RepositoryRootDirectory>$(MSBuildThisFileDirectory)</RepositoryRootDirectory>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPath>$([System.IO.Path]::GetFullPath('$(RepositoryRootDirectory)bin\$(Configuration)'))\</OutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(RepositoryRootDirectory)bin\obj\$(MSBuildProjectName)'))\</BaseIntermediateOutputPath>
<!-- We must use Windows PDB format (overriding SDK default) in order to send symbols to symweb -->
<DebugType>full</DebugType>
<!-- Reset $(BuildEpoch) whenever $(VersionPrefix) increments. We subtract this from YYYYMMDD portion of build
number below to obtain the fourth part of file version that must fit in 16 bits. We can produce builds
for seven years from every epoch reset. -->
<VersionPrefix Condition="'$(VersionPrefix)' == ''">2.1.0</VersionPrefix>
<BuildEpoch>20170101</BuildEpoch>
<VersionPrereleasePrefix Condition="'$(VersionPrereleasePrefix)' == ''">preview1</VersionPrereleasePrefix>
<!-- When running on VSO (for official builds) use a real number. -->
<BuildNumber Condition="'$(BuildNumber)' == ''">$(BUILD_BUILDNUMBER)</BuildNumber>
<BuildNumber Condition="'$(BuildNumber)' == ''">00000001-01</BuildNumber>
<VersionSuffix Condition="'$(VersionSuffix)' == ''">$(VersionPrereleasePrefix)-$(BuildNumber)</VersionSuffix>
<Version Condition="'$(Version)' == ''">$(VersionPrefix)-$(VersionSuffix)</Version>
<!-- Prepare Version number used in template builds -->
<BuildNumberPart1>$(BuildNumber.Split('-')[0])</BuildNumberPart1>
<BuildNumberPart2>$(BuildNumber.Split('-')[1].PadLeft(2,'0'))</BuildNumberPart2>
<VsixVersion Condition="'$(VsixVersion)' == ''">$(VersionPrefix).$(BuildNumberPart1)$(BuildNumberPart2)</VsixVersion>
<!-- Prepare assembly metadata -->
<Authors>Microsoft Corporation</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<AssemblyVersion Condition="'$(BUILD_BUILDNUMBER)' == ''">$(VersionPrefix).0</AssemblyVersion>
<AssemblyVersion Condition="'$(BUILD_BUILDNUMBER)' != ''">$(VersionPrefix).$([MSBuild]::Subtract($(BuildNumberPart1), $(BuildEpoch)))</AssemblyVersion>
<FileVersion Condition="'$(BUILD_BUILDNUMBER)' == ''">$(VersionPrefix).0</FileVersion>
<FileVersion Condition="'$(BUILD_BUILDNUMBER)' != ''">$(VersionPrefix).$([MSBuild]::Subtract($(BuildNumberPart1), $(BuildEpoch)))</FileVersion>
<InformationalVersion>$(VersionPrefix).$(BuildNumber)</InformationalVersion>
<InformationalVersion Condition="'$(BUILD_SOURCEVERSION)' != ''">$(InformationalVersion). Commit Hash: $(BUILD_SOURCEVERSION)</InformationalVersion>
<DotNet_Install_Dir Condition=" '$(DotNet_Install_Dir)' == ''">$(RepositoryRootDirectory).dotnet_cli\</DotNet_Install_Dir>
<DotNetTool>$(DotNet_Install_Dir)\dotnet</DotNetTool>
<NuGet_Packages Condition=" '$(NuGet_Packages)' == ''">$(RepositoryRootDirectory)packages\</NuGet_Packages>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<Import Project="build\DependencyVersions.props" />
</Project>