This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Directory.Build.props
197 lines (157 loc) · 9.17 KB
/
Directory.Build.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (c) Teroneko.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- IMPORTS -->
<Import Condition="'$(IsMSBuildFileImported)' != 'true'" Project="$([MSBuild]::GetPathOfFileAbove(.msbuild))" />
<Import Condition="'$(IsTeronisDotNetCorePropsFileImported)' != 'true'" Project="$(RootCorePropsPath)" />
<Import Project="$(TeronisMSBuildPackagingProjectBuildInPackagePropsFile)" />
<Import Project="$(TeronisMSBuildPackagingPackPropsFile)" Condition="Exists($(TeronisMSBuildPackagingPackPropsFile))" />
<!-- WELL-KNOWN PROPERTIES -->
<PropertyGroup>
<AssemblyName Condition="'$(AssemblyName)' == ''">$(MSBuildProjectName)</AssemblyName>
<Platforms Condition="'$(Platforms)' == ''">AnyCPU;x64;x86</Platforms>
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
<DebugType Condition="'$(DebugType)' == ''">portable</DebugType>
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' == ''">false</GeneratePackageOnBuild>
<LangVersion Condition="'$(LangVersion)' == ''">9.0</LangVersion>
<Nullable Condition="'$(Nullable)' == ''">enable</Nullable>
</PropertyGroup>
<!-- NULLABLE STATIC ANALYSE ATTRIBUTES SUPPORT FOR OLDER FRAMEWORKS -->
<ItemGroup>
<!-- PrivateAssets="all" -->
<ProjectReference Include="$(MSBuildThisFileDirectory)src\Nullable\src\Teronis.Nullable.csproj"
Condition="'$(MSBuildProjectName)' != 'Teronis.Nullable'
And ('$(Nullable)' == 'enable'
Or '$(Nullable)' == 'annotations')
And ('$(TargetFramework)' == 'netstandard2.0'
Or '$(TargetFramework)' == 'netstandard2.1'
Or '$(TargetFramework)' == 'netstandard2.2'
Or '$(TargetFramework)' == 'netcoreapp3.0'
Or '$(TargetFramework)' == 'netcoreapp3.1')" />
</ItemGroup>
<ItemGroup>
<!-- FOR PACKAGE CREATION -->
</ItemGroup>
<PropertyGroup>
<Authors Condition="'$(Authors)' == ''">Teroneko</Authors>
<Company Condition="'$(Company)' == ''">$(MSBuildProjectName)</Company>
<Product Condition="'$(Product)' == ''">$(MSBuildProjectName)</Product>
<PackageLicenseFile Condition="'$(PackageLicenseFile)' == ''">LICENSE</PackageLicenseFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Copyright Condition="'$(Copyright)' == ''">Teroneko</Copyright>
<PackageIcon Condition="'$(PackageIcon)' == ''">icon.png</PackageIcon>
<!-- Generates the documentation file that is packed too. -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- <IncludeSymbols Condition="'$(IncludeSymbols)' == ''">true</IncludeSymbols>
<SymbolPackageFormat Condition="'$(SymbolPackageFormat)' == ''">snupkg</SymbolPackageFormat> -->
<!-- <EmbedAllSources>true</EmbedAllSources> -->
<!--
Embed source files that are not tracked by the source control manager to the PDB.
This is useful if you generate files during the build .
-->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<NeutralLanguage Condition="'$(NeutralLanguage)' == ''">en</NeutralLanguage>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="$(MSBuildThisFileDirectory)\icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<PropertyGroup>
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
</PropertyGroup>
<PropertyGroup>
<IsTestProject>false</IsTestProject>
<IsTestProject Condition="$(MSBuildProjectName.EndsWith('.Test')) Or $(MSBuildProjectName.StartsWith('Test.'))">true</IsTestProject>
<IsLocalizationProject>false</IsLocalizationProject>
<IsLocalizationProject Condition="$(MSBuildProjectName.EndsWith('.Localization'))">true</IsLocalizationProject>
<IsExampleProject>false</IsExampleProject>
<IsExampleProject Condition="$(MSBuildProjectName.EndsWith('.Example'))">true</IsExampleProject>
<IsBenchmarkProject>false</IsBenchmarkProject>
<IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Benchmark'))">true</IsBenchmarkProject>
<IsExecutablePackageProject>false</IsExecutablePackageProject>
<!--
If true, the project is a synthetic project. It is the package creation
replacement for the project specified by PackageSourceReference.
Firstly, the project specified by PackageSourceReference is published
to filesystem, then it gets special packed as executable. The package
inherits package name and package version from referenced project.
-->
<IsExecutablePackageProject Condition="$(MSBuildProjectName.EndsWith('~ExecutablePackage'))">true</IsExecutablePackageProject>
<IsExecutablePublishProject>false</IsExecutablePublishProject>
<!--
If true, the project is a synthetic project. It creates the filesystem
publishment for the project specified by PackageSourceReference.
Firstly, the project specified by PackageSourceReference is published
to filesystem, then it gets special packed as executable. Finally the
package gets unzipped.
We want to use the .props and .targets inside the project like
it would be when you installed the nuget packge, otherwise we
would have to separate path logic for local use in projects.
-->
<IsExecutablePublishProject Condition="$(MSBuildProjectName.EndsWith('~ExecutablePublish'))">true</IsExecutablePublishProject>
<IsDependencyPublishProject>false</IsDependencyPublishProject>
<!--
If true, the project is a synthetic project. It creates the filesystem
publishment for the project specified by PackageSourceReference.
We want to use the .props and .targets inside the project like
it would be when you installed the nuget packge, otherwise we
would have to separate path logic for local use in projects.
-->
<IsDependencyPublishProject Condition="$(MSBuildProjectName.EndsWith('~DependencyPublish'))">true</IsDependencyPublishProject>
<IsSyntheticProject>false</IsSyntheticProject>
<IsSyntheticProject Condition="$(IsExecutablePackageProject)
Or $(IsExecutablePublishProject)
Or $(IsDependencyPublishProject)">true</IsSyntheticProject>
</PropertyGroup>
<PropertyGroup Condition="$(IsLocalizationProject)">
<Description>Contains localization resources for assembly $(MSBuildProjectName.Replace('.Localization','')).</Description>
</PropertyGroup>
<PropertyGroup Condition="$(IsTestProject)">
<!-- TODO: Refactor with .Substring(..) and .IndexOf(..). -->
<_ProjectNameWithoutTest Condition="$(MSBuildProjectName.EndsWith('.Test'))">$(MSBuildProjectName.Replace('.Test','')</_ProjectNameWithoutTest>
<_ProjectNameWithoutTest Condition="$(MSBuildProjectName.StartsWith('Test.'))">$(MSBuildProjectName.Replace('Test.','Teronis')</_ProjectNameWithoutTest>
<Description>Contains test cases for assembly $(_ProjectNameWithoutTest).</Description>
</PropertyGroup>
<PropertyGroup>
<!-- https://docs.microsoft.com/de-de/dotnet/core/tools/csproj#ispackable -->
<IsPackable Condition="'$(IsPackable)' == ''
And ($(IsSyntheticProject)
Or $(IsTestProject)
Or $(IsLocalizationProject)
Or $(IsExampleProject)
Or $(IsBenchmarkProject))">false</IsPackable>
<IsPackable Condition="'$(IsPackable)' == ''">true</IsPackable>
<DisableGitVersionCache Condition="$(IsSyntheticProject)">true</DisableGitVersionCache>
</PropertyGroup>
<PropertyGroup Condition="'$(IsGitVersionCacheRelated)' == 'true'">
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
</PropertyGroup>
<PropertyGroup>
<ProjectBuildInPackageVerbosity>detailed</ProjectBuildInPackageVerbosity>
<!-- The package name and package version are inherited from project specified in PackageSourceReference. -->
<PackSourceWhenPackingPublishTypedProjectMSBuildProperties>$(PackSourceWhenPackingPublishTypedProjectMSBuildProperties);DisableGitVersionCache=true</PackSourceWhenPackingPublishTypedProjectMSBuildProperties>
</PropertyGroup>
<!--
Belongs to Teronis.MSBuild.Pacakging.PackExecutable
-->
<PropertyGroup>
<!-- The individual path for every project. -->
<PublishPackageOutputPath>$(PackagePublishmentsDirectory)$(MSBuildProjectName)</PublishPackageOutputPath>
<BeforeCollectPackageSourceContextualPackagePackRelatedProperties>GetVersionCacheWhenGettingPackageTypedExecutableSourceProperties;$(BeforeCollectPackageSourceContextualPackagePackRelatedProperties)</BeforeCollectPackageSourceContextualPackagePackRelatedProperties>
</PropertyGroup>
<PropertyGroup>
<PackageSourceSyntheticProjectMSBuildProperties>$(PackageSourceSyntheticProjectMSBuildProperties);DisableGitVersionCache=true</PackageSourceSyntheticProjectMSBuildProperties>
</PropertyGroup>
</Project>