-
Notifications
You must be signed in to change notification settings - Fork 329
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
159 lines (140 loc) · 8.02 KB
/
Directory.Build.props
File metadata and controls
159 lines (140 loc) · 8.02 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetsWindows Condition="'$(OS)' == 'Windows_NT' AND '$(OSGroup)' == ''">true</TargetsWindows>
<TargetsWindows Condition="'$(OS)' != 'Windows_NT' AND '$(OSGroup)' == ''">false</TargetsWindows>
<TargetsWindows Condition="'$(OSGroup)' == 'Windows_NT'">true</TargetsWindows>
<TargetsUnix Condition="'$(OS)' == 'Unix' AND '$(OSGroup)' == ''">true</TargetsUnix>
<TargetsUnix Condition="'$(OS)' != 'Unix' AND '$(OSGroup)' == ''">false</TargetsUnix>
<TargetsUnix Condition="'$(OSGroup)' == 'Unix'">true</TargetsUnix>
<TargetsAnyOS Condition="'$(OSGroup)' == 'AnyOS'">true</TargetsAnyOS>
<IsSourceProject Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))">true</IsSourceProject>
<!--
"ReferenceType" property supports below options:
"Project" => Build and run tests with Microsoft.Data.SqlClient as Project Reference
"Package" => Build and run tests with Microsoft.Data.SqlClient as Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
> msbuild -p:configuration=Release
-->
<ReferenceType Condition="$(ReferenceType) == ''">Project</ReferenceType>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<PropertyGroup Condition="$(BuildForRelease) == 'true'">
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup Condition="$(BuildForRelease) == 'true'">
<SourceRoot Include="$(MSBuildThisFileDirectory)/" />
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>
<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<RepoRoot>$(ProjectDir)..\</RepoRoot>
<Artifacts>$(RepoRoot)artifacts\$(ReferenceType)\</Artifacts>
<ToolsArtifactsDir Condition="'$(ToolsArtifactsDir)'==''">$(Artifacts)tools\</ToolsArtifactsDir>
<ManagedSourceCode>$(ProjectDir)Microsoft.Data.SqlClient\</ManagedSourceCode>
<SqlServerSourceCode>$(ProjectDir)Microsoft.SqlServer.Server\</SqlServerSourceCode>
<NetCoreSource>$(ManagedSourceCode)netcore\</NetCoreSource>
<NetCoreResources>$(ManagedSourceCode)src\Resources\</NetCoreResources>
<ResxFileName>Strings</ResxFileName>
<ResourceFileName>SqlClient.Resources.$(ResxFileName)</ResourceFileName>
<GeneratedSourceFileName>$(ResxFileName).ResourceNames.cs</GeneratedSourceFileName>
<NetFxSource>$(ManagedSourceCode)netfx\</NetFxSource>
<NetFxResources>$(ManagedSourceCode)src\Resources\</NetFxResources>
<AddOnsPath>$(ManagedSourceCode)add-ons\</AddOnsPath>
<SqlServerSource>$(RepoRoot)src\Microsoft.SqlServer.Server\</SqlServerSource>
<CommonsourceRoot>$(RepoRoot)src\Microsoft.Data.SqlClient\src\</CommonsourceRoot>
<ObjFolder>$(Artifacts)obj\</ObjFolder>
<CommonPath>$(NetCoreSource)src\Common\src</CommonPath>
<CommonTestPath>$(NetCoreSource)src\Common\tests</CommonTestPath>
<TestsPath>$(ProjectDir)Microsoft.Data.SqlClient\tests\</TestsPath>
<BinFolder Condition="'$(TargetsWindows)' == 'true'">$(Artifacts)bin\Windows_NT\</BinFolder>
<BinFolder Condition="'$(TargetsAnyOS)' == 'true'">$(Artifacts)bin\AnyOS\</BinFolder>
<BinFolder Condition="'$(TargetsUnix)' == 'true'">$(Artifacts)bin\Unix\</BinFolder>
<ToolsDir Condition="'$(ToolsDir)'==''">$(RepoRoot)tools\</ToolsDir>
<GenAPISrcDir Condition="'$(GenAPISrcDir)'==''">$(ToolsDir)GenAPI\</GenAPISrcDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages\</PackagesDir>
<NuGetRoot Condition="'$(NuGetRoot)' == ''">$(RepoRoot).nuget\</NuGetRoot>
<NuGetCmd>$(NuGetRoot)nuget.exe</NuGetCmd>
<!-- Respect environment variable for the .NET install directory if set; otherwise, use the current default location -->
<BuildSimulator Condition="'$(BuildSimulator)' != 'true'">false</BuildSimulator>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildSimulator)' == 'true'">
<DefineConstants>$(DefineConstants);ENCLAVE_SIMULATOR</DefineConstants>
</PropertyGroup>
<!-- NuGet Audit Settings -->
<PropertyGroup>
<!--
See the NuGet Audit documentation here:
https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages
-->
<!--
We always want NuGet auditing enabled. There are no build scenarios
where auditing should be disabled.
-->
<NuGetAudit>true</NuGetAudit>
<!-- We want all dependencies audited. -->
<NuGetAuditMode>all</NuGetAuditMode>
<!-- We want all possible audit severity messages. -->
<NuGetAuditLevel>low</NuGetAuditLevel>
</PropertyGroup>
<!-- Build Warning/Error Settings -->
<PropertyGroup>
<!-- We treat all warnings as errors. -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
There may be a few specific warnings that should _not_ be considered an
error. This list should be used sparingly to avoid important warnings
being ignored.
-->
<WarningsNotAsErrors></WarningsNotAsErrors>
<!--
If a build is failing due to vulnerable dependencies, you may temporarily
uncomment the following line to treat the audit warnings as non-errors.
This should only be done as a temporary measure while addressing the
vulnerable dependencies. See:
https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904
-->
<!-- <WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors> -->
</PropertyGroup>
<!-- Packaging for source link-->
<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUnTrackedSources>true</EmbedUnTrackedSources>
<DisableSourceLinkTranslation Condition="'$(DisableSourceLinkTranslation)' == ''">false</DisableSourceLinkTranslation>
</PropertyGroup>
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<!-- Provides Version properties -->
<Import Project="$(ToolsDir)props\Versions.props" />
<!-- Provides Tool properties -->
<Import Project="$(ToolsDir)props\Tools.props" />
<!-- Provides Build properties -->
<Import Project="$(ToolsDir)props\AssemblyInfo.props" />
<Import Project="$(ToolsDir)props\AssemblyRef.props" />
<Import Project="$(ToolsDir)targets\RepositoryInfo.targets" />
<!-- Fix GetTargetPath issues - see https://github.com/dotnet/msbuild/issues/4303#issuecomment-482345617 -->
<PropertyGroup>
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
</PropertyGroup>
<!--
We want to use the latest C# language regardless of target framework,
so we explicitly set LangVersion for all targets.
We will roll this version forward as new C# language versions are released
and associated with the newest .NET SDK we support.
Details here:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-versioning
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version
-->
<PropertyGroup>
<!-- The newest .NET SDK we support is .NET 9.0, which uses C# 13 -->
<LangVersion>13</LangVersion>
</PropertyGroup>
</Project>