2019-10-29 00:51:01 +03:00
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2019-10-29 21:58:42 +03:00
<PropertyGroup>
<!-- USE THESE VARIABLES TO CONTROL THE BUILD TASKS.-->
<Internal_Logging>false</Internal_Logging>
2021-04-16 00:44:47 +03:00
<!-- This is used to disable some build properties. -->
<IsExamplesSolution Condition="'$(SolutionName)' == 'Examples' ">true</IsExamplesSolution>
2021-08-18 19:52:10 +03:00
<!-- This is used to change EventSource names. -->
<DefineConstants Condition="'$(Redfield)' == 'True'">$(DefineConstants);REDFIELD</DefineConstants>
</PropertyGroup>
<PropertyGroup Label="Package versions for System.Diagnostics.DiagnosticSource">
<SystemDiagnosticsDiagnosticSourcePkgVer>5.0.0</SystemDiagnosticsDiagnosticSourcePkgVer>
<SystemDiagnosticsDiagnosticSourcePkgVer Condition="'$(Redfield)' == 'True'">4.7.0</SystemDiagnosticsDiagnosticSourcePkgVer>
2019-10-29 21:58:42 +03:00
</PropertyGroup>
2021-08-18 19:52:10 +03:00
<Target Name="Info_Redfield" BeforeTargets="Build" Condition="'$(Redfield)' == 'True'">
<!--
This flag is reserved for Codeless Attach products.
Redfield has some unique code changes to avoid conflicting with the real AI SDK.
To use: dotnet build /p:Redfield=True
-->
<Message Text="Directory.Build.props: Redfield build detected." Importance="high"/>
</Target>
2019-10-29 21:58:42 +03:00
<Target Name="Info_InternalSettings" BeforeTargets="Build">
2021-04-16 00:44:47 +03:00
<Message Text="Directory.Build.props: Internal_Logging is set to $(Internal_Logging)." Importance="high"/>
2019-10-29 21:58:42 +03:00
</Target>
<Target Name="Info_DirectoryBuildProps" BeforeTargets="Build" Condition=" $(Internal_Logging) == 'true' ">
2021-04-16 00:44:47 +03:00
<Message Text="Info: SolutionName: $(SolutionName)." Importance="high"/>
<Message Text="Info: ProjectName: $(MSBuildProjectName)." Importance="high"/>
<Message Text="Info: TargetFramework: $(TargetFramework)." Importance="high"/>
2019-10-29 21:58:42 +03:00
<Message Text="Info: Directory.Build.props imported by $(MSBuildProjectName)." Importance="high"/>
2019-10-29 00:51:01 +03:00
</Target>
<PropertyGroup>
<!-- EnlistmentRoot identifies the root directory of the repo and is used to dermine all other relative paths. -->
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
2019-10-29 21:58:42 +03:00
<KeysRoot>$(EnlistmentRoot)\.keys</KeysRoot>
<PropsRoot>$(EnlistmentRoot)\.props</PropsRoot>
<RulesetsRoot>$(EnlistmentRoot)\.rulesets</RulesetsRoot>
<TargetsRoot>$(EnlistmentRoot)\.targets</TargetsRoot>
2020-02-26 03:13:07 +03:00
<PublicApiRoot>$(EnlistmentRoot)\.publicApi</PublicApiRoot>
2019-10-29 00:51:01 +03:00
2021-11-17 01:40:39 +03:00
<BinRoot>$(EnlistmentRoot)\bin</BinRoot>
2019-10-29 00:51:01 +03:00
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>
2020-05-07 04:49:25 +03:00
2021-11-17 01:40:39 +03:00
<ObjRoot>$(EnlistmentRoot)\obj</ObjRoot>
2019-10-29 00:51:01 +03:00
<ObjRoot>$([System.IO.Path]::GetFullPath( $(ObjRoot) ))</ObjRoot>
2021-11-17 01:40:39 +03:00
<PackagesDir>$(EnlistmentRoot)\packages</PackagesDir>
2020-06-16 00:01:23 +03:00
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>
2019-10-29 00:51:01 +03:00
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(EnlistmentRoot.Length)))</RelativeOutputPathBase>
2020-06-18 00:28:17 +03:00
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<!--This is to disable code analysis while devs are working. Default is true.-->
<RunAnalyzers Condition=" '$(Configuration)' == 'Debug' ">false</RunAnalyzers>
2019-10-29 00:51:01 +03:00
2020-06-16 00:01:23 +03:00
<OutputPath>$(BinRoot)\$(Configuration)\test\$(MSBuildProjectName)</OutputPath>
2019-10-29 00:51:01 +03:00
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
2020-06-16 03:30:40 +03:00
<IntermediateOutputPath>$(ObjRoot)\$(Configuration)\$(MSBuildProjectName)</IntermediateOutputPath>
2019-10-29 00:51:01 +03:00
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
2019-11-08 00:22:11 +03:00
<!-- Testing fix for https://github.com/dotnet/sdk/issues/2523 -->
<!-- If this works, should move to common and not the directory props -->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
2019-10-29 21:58:42 +03:00
</PropertyGroup>
2020-05-07 04:49:25 +03:00
2020-06-16 00:01:23 +03:00
<PropertyGroup>
2021-08-28 02:48:42 +03:00
<!-- https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version -->
2021-09-22 00:53:27 +03:00
<LangVersion>preview</LangVersion>
2020-06-16 00:01:23 +03:00
2022-09-06 23:55:27 +03:00
<IsNetFramework Condition="'$(TargetFramework)' == 'net452' Or '$(TargetFramework)' == 'net46' Or '$(TargetFramework)' == 'net461' Or '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'net472' Or '$(TargetFramework)' == 'net480' Or '$(TargetFramework)' == 'net481' ">True</IsNetFramework>
2023-11-18 03:41:29 +03:00
<IsNetCore Condition="'$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">True</IsNetCore>
<IsNetStandard20 Condition="'$(TargetFramework)' == 'net461' Or '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'net472' Or '$(TargetFramework)' == 'net480' Or '$(TargetFramework)' == 'net481' Or '$(TargetFramework)' == 'netcoreapp3.1' Or '$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0' Or '$(TargetFramework)' == 'net8.0'">True</IsNetStandard20>
2021-09-22 23:20:37 +03:00
<!-- .NET 6 introduces implicit global usings.
This causes build errors in our multi-target projects.
Dotnet team has commented that they will fix this error when .NET 6 is GA (Nov2021).
https://docs.microsoft.com/dotnet/core/compatibility/sdk/6.0/implicit-namespaces#recommended-action -->
<DisableImplicitNamespaceImports>True</DisableImplicitNamespaceImports>
2021-08-28 02:48:42 +03:00
</PropertyGroup>
<PropertyGroup>
2020-06-16 00:01:23 +03:00
<!-- Enable NuGet package restore during build -->
<RestorePackages>true</RestorePackages>
<RequireRestoreConsent>false</RequireRestoreConsent>
</PropertyGroup>
2020-06-16 23:33:26 +03:00
2019-10-29 00:51:01 +03:00
</Project>