mirror of
https://github.com/microsoft/mcp.git
synced 2026-11-04 12:01:31 +00:00
48 lines
2.5 KiB
XML
48 lines
2.5 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
|
<TargetFramework>net9.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>
|
|
<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>
|
|
<!-- 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>
|
|
<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 '$(RuntimeIdentifier)' == ''">
|
|
<McpServerJsonTemplateFile>$(RepoRoot)/eng/dnx/.mcp/server.json</McpServerJsonTemplateFile>
|
|
</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>
|
|
</Project>
|