-
Notifications
You must be signed in to change notification settings - Fork 409
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
67 lines (61 loc) · 3.32 KB
/
Directory.Build.props
File metadata and controls
67 lines (61 loc) · 3.32 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
<Project>
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>False</IsPackable>
<TrimMode>full</TrimMode>
<!-- Suppress SYSLIB0020 for generated System.Text.Json code that uses obsolete IgnoreNullValues -->
<NoWarn>$(NoWarn);SYSLIB0020</NoWarn>
<!-- Suppress MCPEXP001 for experimental features in MCP -->
<NoWarn>$(NoWarn);MCPEXP001</NoWarn>
<BuildNative Condition="'$(BuildNative)' == ''">false</BuildNative>
<!-- Identify Server Projects -->
<_RelativeProjectDir>$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)').Replace($([System.IO.Path]::GetFullPath('$(RepoRoot)')), ''))</_RelativeProjectDir>
<IsServerProject Condition="'$(IsServerProject)' == '' and $(_RelativeProjectDir.StartsWith('servers')) and $(_RelativeProjectDir.EndsWith('src'))">true</IsServerProject>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildNative)' == 'true'">
<DefineConstants>$(DefineConstants);BUILD_NATIVE</DefineConstants>
</PropertyGroup>
<!-- We're using a prerelease version of IdWeb with trimmer support, which enables HTTP support for
trimmed azmcp builds across all distributions. The ENABLE_HTTP flag provides a rollback mechanism:
if we need to revert to an IdWeb version without trimmer support, we can disable HTTP accordingly.
Eventually, ENABLE_HTTP directives will be removed from the code as IdWeb's trimmer support moves
closer to GA.
See https://github.com/microsoft/mcp/issues/1764 -->
<PropertyGroup>
<DefineConstants>$(DefineConstants);ENABLE_HTTP</DefineConstants>
</PropertyGroup>
<!-- Windows AOT native build security flags to enable 'Control Flow Guard' (CFG) -->
<PropertyGroup Condition="'$(BuildNative)' == 'true' and $(RuntimeIdentifier.StartsWith('win'))">
<ControlFlowGuard>Guard</ControlFlowGuard>
</PropertyGroup>
<PropertyGroup Condition="'$(IsServerProject)' == 'true'">
<!-- .NET Tool Package settings -->
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<PackageType>McpServer</PackageType>
<PackageIcon>$(RepoRoot)eng/images/microsofticon.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Keep these aligned with OS + arch build-matrix.json. -->
<RuntimeIdentifiers>win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<CopyOutputSymbolsToPublishDirectory>true</CopyOutputSymbolsToPublishDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(IsServerProject)' == 'true' and '$(BuildNative)' == 'true'">
<!-- AOT native build flags -->
<IsAotCompatible>true</IsAotCompatible>
<PublishAot>true</PublishAot>
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
<IlcFoldIdenticalMethodBodies>true</IlcFoldIdenticalMethodBodies>
</PropertyGroup>
<PropertyGroup>
<Company>Microsoft Corporation</Company>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<RepositoryUrl>https://github.com/microsoft/mcp</RepositoryUrl>
</PropertyGroup>
</Project>