-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
136 lines (116 loc) · 7.69 KB
/
Directory.Build.props
File metadata and controls
136 lines (116 loc) · 7.69 KB
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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)Version.props" />
<!-- Compute intermediate values. To avoid conflicts name all custom variables with Do prefix. -->
<PropertyGroup>
<DoBuildYear>$([System.DateTime]::Today.Year)</DoBuildYear>
<DoProductName>DataObjects.Net</DoProductName>
<DoProductAuthors>Xtensive LLC and contributors</DoProductAuthors>
<DoProductCopyright>2003-$(DoBuildYear) $(DoProductAuthors)</DoProductCopyright>
<DoMajor>$([System.Version]::new($(DoVersion)).Major)</DoMajor>
<DoMinor>$([System.Version]::new($(DoVersion)).Minor)</DoMinor>
<DoBuild>$([System.Version]::new($(DoVersion)).Build)</DoBuild>
<DoRevision>$([System.Version]::new($(DoVersion)).Revision)</DoRevision>
<DoFileRevision>$(BUILD_NUMBER)</DoFileRevision>
<DoFileRevision Condition="'$(DoFileRevision)' == '' AND '$(DoRevision)' != '-1'">$(DoRevision)</DoFileRevision>
<DoFileRevision Condition="'$(DoFileRevision)' == ''">0</DoFileRevision>
<DoVersionSuffix Condition="'$(DoVersionSuffix)' == 'dev'">dev-$(DoFileRevision)</DoVersionSuffix>
<DoVersionName>$(DoMajor).$(DoMinor).$(DoBuild)</DoVersionName>
<DoVersionName Condition="'$(DoRevision)' != '-1'">$(DoVersionName).$(DoRevision)</DoVersionName>
<DoVersionName Condition="'$(DoVersionSuffix)' != ''">$(DoVersionName)-$(DoVersionSuffix)</DoVersionName>
<DoPackageIcon>$(MSBuildThisFileDirectory)do-nuget.png</DoPackageIcon>
<DoGeneratePackage>true</DoGeneratePackage>
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'Xtensive.Orm.Weaver'">false</DoGeneratePackage>
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'Xtensive.Orm.Manual'">false</DoGeneratePackage>
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'TestCommon'">false</DoGeneratePackage>
<DoGeneratePackage Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">false</DoGeneratePackage>
<!-- BuildingInsideVisualStudio is also true in Rider -->
<DoIsIdeBuild>false</DoIsIdeBuild>
<DoIsIdeBuild Condition="$(BuildingInsideVisualStudio) == 'true'">true</DoIsIdeBuild>
<!-- Disable "BinaryFormatter is obsolete" warnings for test projects -->
<NoWarn Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">$(NoWarn);SYSLIB0011</NoWarn>
<!-- Enable Usage of BinaryFormatter in test projects -->
<EnableUnsafeBinaryFormatterSerialization
Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<!-- Debug-NET10, Release-NET10 are mostly for development convenience -->
<PropertyGroup Condition = "$(Configuration.Contains('NET10')) == 'true'">
<!-- hard binding to net10, no property and env variable allowed-->
<TargetFrameworks>net10.0</TargetFrameworks>
</PropertyGroup>
<!-- Debug-NET8, Release-NET8 are mostly for development convenience -->
<PropertyGroup Condition = "$(Configuration.Contains('NET8')) == 'true'">
<!-- hard binding to net8, no property and env variable allowed-->
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>
<!--Release and Debug are for final builds, builds on build server, etc. Target frameworks are configurable here -->
<PropertyGroup Label="Defaults"
Condition="$(Configuration.Contains('NET10')) == 'false' AND $(Configuration.Contains('NET8')) == 'false'">
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
<TargetFrameworks>$(TargetFrameworks)</TargetFrameworks> <!-- the property -->
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">$(DO_TargetFrameworks)</TargetFrameworks> <!-- env var -->
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net8.0;net10.0</TargetFrameworks> <!-- fallback to default -->
</PropertyGroup>
<PropertyGroup Condition = "$(Configuration.Contains('Debug')) == 'true'">
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition = "$(Configuration.Contains('Release')) == 'true'">
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<NoLogo>true</NoLogo>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<LangVersion>12.0</LangVersion> <!-- version assigned to net8.0 -->
<SolutionDir Condition="$(SolutionDir) == ''">$([MSBuild]::EnsureTrailingSlash(
$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)', 'Orm.sln'))))</SolutionDir>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<ArtifactsDir Condition="'$(ArtifactsDir)'==''">$(SolutionDir)_Build\</ArtifactsDir>
<BaseIntermediateOutputPath>$(ArtifactsDir)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<BaseOutputPath>$(ArtifactsDir)bin\$(Configuration)\</BaseOutputPath>
<BaseOutputPath Condition="$(MSBuildProjectName.Contains('Tests'))
OR $(MSBuildProjectName) == 'TestCommon'
OR $(MSBuildProjectName) == 'Xtensive.Orm.Manual'">$(ArtifactsDir)tests\$(Configuration)\</BaseOutputPath>
<OutputPath>$(BaseOutputPath)lib\</OutputPath>
<MSBuildProjectExtensionsPath>$(IntermediateOutputPath)</MSBuildProjectExtensionsPath>
<ProjectAssetsFile>$(MSBuildProjectExtensionsPath)project.assets.json</ProjectAssetsFile>
<ProjectAssetsCacheFile>$(MSBuildProjectExtensionsPath)$(TargetFramework)\$(MSBuildProjectName).assets.cache</ProjectAssetsCacheFile>
<OrmKeyFile>$(SolutionDir)Orm\Orm.snk</OrmKeyFile>
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
<!-- Populate standard properties. -->
<PropertyGroup>
<Product>$(DoProductName)</Product>
<Company>$(DoProductAuthors)</Company>
<Authors>$(DoProductAuthors)</Authors>
<Version>$(DoVersionName)</Version>
<AssemblyVersion>$(DoMajor).$(DoMinor).0.0</AssemblyVersion>
<FileVersion>$(DoMajor).$(DoMinor).$(DoBuild).$(DoFileRevision)</FileVersion>
<Copyright>$(DoProductCopyright)</Copyright>
<PackageProjectUrl>https://dataobjects.net/</PackageProjectUrl>
<PackageIcon>do-nuget.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>DataObjects.Net ORM BLL Persistence</PackageTags>
<PackageOutputPath>$(BaseOutputPath)packages\</PackageOutputPath>
<RepositoryUrl>https://github.com/DataObjects-NET/dataobjects-net</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<GeneratePackageOnBuild Condition="$(DoGeneratePackage) == 'true' AND '$(Configuration)' == 'Release'">true</GeneratePackageOnBuild>
<IncludeSymbols Condition="$(GeneratePackageOnBuild) == 'true'">true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<SourceRoot Include="$(SolutionDir)"/>
<PackageReference Condition="$(DoGeneratePackage) == 'true'"
Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<None Include="$(DoPackageIcon)" Visible="false" >
<PackagePath>.</PackagePath>
<Pack>true</Pack>
</None>
</ItemGroup>
<Import Condition="Exists('User.Directory.Build.props')" Project="User.Directory.Build.props" />
</Project>