|
| 1 | +<Project> |
| 2 | + <!-- Directory.Build.props contains the common build settings for all projects in the repo. --> |
| 3 | + |
| 4 | + <Import Project="build/BranchInfo.props" /> |
| 5 | + <Import Project="build/Dependencies.props" /> |
| 6 | + |
| 7 | + <PropertyGroup> |
| 8 | + <Configuration Condition="'$(Configuration)'==''">Debug</Configuration> |
| 9 | + <Configurations>Debug;Release;Debug-Intrinsics;Release-Intrinsics;Debug-netfx;Release-netfx</Configurations> |
| 10 | + <Platform Condition="'$(Platform)'==''">AnyCPU</Platform> |
| 11 | + <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> |
| 12 | + <NativeTargetArchitecture Condition="'$(NativeTargetArchitecture)' == ''">$(TargetArchitecture)</NativeTargetArchitecture> |
| 13 | + <PlatformConfig>$(Platform).$(Configuration)</PlatformConfig> |
| 14 | + </PropertyGroup> |
| 15 | + |
| 16 | + <PropertyGroup> |
| 17 | + <RestoreSources> |
| 18 | + https://api.nuget.org/v3/index.json; |
| 19 | + https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; |
| 20 | + https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; |
| 21 | + </RestoreSources> |
| 22 | + </PropertyGroup> |
| 23 | + |
| 24 | + <!-- Common repo directories --> |
| 25 | + <PropertyGroup> |
| 26 | + <RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot> |
| 27 | + <SourceDir>$(RepoRoot)src/</SourceDir> |
| 28 | + <PkgDir>$(RepoRoot)pkg/</PkgDir> |
| 29 | + |
| 30 | + <!-- Output directories --> |
| 31 | + <BinDir Condition="'$(BinDir)'==''">$(RepoRoot)bin/</BinDir> |
| 32 | + <BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath> |
| 33 | + <ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir> |
| 34 | + <RootIntermediateOutputPath Condition="'$(RootIntermediateOutputPath)'==''">$(ObjDir)</RootIntermediateOutputPath> |
| 35 | + |
| 36 | + <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(RootIntermediateOutputPath)$(PlatformConfig)\</IntermediateOutputRootPath> |
| 37 | + <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)$(MSBuildProjectName)\</IntermediateOutputPath> |
| 38 | + <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(IntermediateOutputPath)</BaseIntermediateOutputPath> |
| 39 | + |
| 40 | + <OutputPath Condition="'$(OutputPath)'==''">$(BaseOutputPath)$(PlatformConfig)\$(MSBuildProjectName)\</OutputPath> |
| 41 | + |
| 42 | + <PackageAssetsPath>$(ObjDir)/packages/</PackageAssetsPath> |
| 43 | + |
| 44 | + <PackageOutputPath Condition="'$(PackageOutputPath)'=='' and '$(NonShippingPackage)' == 'true'">$(BinDir)packages_noship/</PackageOutputPath> |
| 45 | + <PackageOutputPath Condition="'$(PackageOutputPath)'==''">$(BinDir)packages/</PackageOutputPath> |
| 46 | + |
| 47 | + <NativeOutputPath>$(BaseOutputPath)$(NativeTargetArchitecture).$(Configuration)\Native\</NativeOutputPath> |
| 48 | + |
| 49 | + <!-- Input Directories --> |
| 50 | + <PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir> |
| 51 | + <PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages/</PackagesDir> |
| 52 | + <RestorePackagesPath>$(PackagesDir)</RestorePackagesPath> |
| 53 | + <ToolsDir Condition="'$(ToolsDir)'==''">$(RepoRoot)Tools/</ToolsDir> |
| 54 | + </PropertyGroup> |
| 55 | + |
| 56 | + <Import Project="$(ToolsDir)BuildVersion.targets" |
| 57 | + Condition="Exists('$(ToolsDir)BuildVersion.targets')" /> |
| 58 | + |
| 59 | + <!-- Version properties --> |
| 60 | + <PropertyGroup> |
| 61 | + <VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix> |
| 62 | + <AssemblyFileVersion Condition="'$(AssemblyFileVersion)'==''">$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</AssemblyFileVersion> |
| 63 | + |
| 64 | + <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion> |
| 65 | + <IncludeBuildNumberInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion> |
| 66 | + |
| 67 | + <VersionSuffix></VersionSuffix> |
| 68 | + <VersionSuffix Condition="'$(StabilizePackageVersion)' != 'true'">$(PreReleaseLabel)</VersionSuffix> |
| 69 | + <VersionSuffix Condition="'$(IncludeBuildNumberInPackageVersion)' == 'true'">$(VersionSuffix)-$(BuildNumberMajor)-$(BuildNumberMinor)</VersionSuffix> |
| 70 | + </PropertyGroup> |
| 71 | + |
| 72 | + <!-- SourceLink properties used by dotnet/buildtools - need to be set before importing $(ToolsDir)versioning.props --> |
| 73 | + <PropertyGroup> |
| 74 | + <UseSourceLink>true</UseSourceLink> |
| 75 | + <GitHubRepositoryName>machinelearning</GitHubRepositoryName> |
| 76 | + </PropertyGroup> |
| 77 | + |
| 78 | + <!-- |
| 79 | + Source code control properties used by the .NET Core SDK to inject SCC info into the NuGet package. |
| 80 | + In future versions, these will be used for SourceLink and to generate AssemblyInfo. |
| 81 | + --> |
| 82 | + <PropertyGroup> |
| 83 | + <PrivateRepositoryUrl>https://github.com/dotnet/$(GitHubRepositoryName)</PrivateRepositoryUrl> |
| 84 | + <PublishRepositoryUrl>true</PublishRepositoryUrl> |
| 85 | + <SourceRevisionId>$(LatestCommit)</SourceRevisionId> |
| 86 | + </PropertyGroup> |
| 87 | + |
| 88 | + <Import Project="$(ToolsDir)versioning.props" |
| 89 | + Condition="Exists('$(ToolsDir)versioning.props') and '$(DisableImportVersioningProps)' != 'true'" /> |
| 90 | + |
| 91 | + <!-- Language configuration --> |
| 92 | + <PropertyGroup> |
| 93 | + <LangVersion>latest</LangVersion> <!-- default to allowing all language features --> |
| 94 | + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
| 95 | + </PropertyGroup> |
| 96 | + |
| 97 | + <PropertyGroup> |
| 98 | + <RunningOnUnix Condition="'$(OS)'!='Windows_NT'">true</RunningOnUnix> |
| 99 | + </PropertyGroup> |
| 100 | + |
| 101 | + <!-- Signing properties --> |
| 102 | + <PropertyGroup> |
| 103 | + <AssemblyOriginatorKeyFile Condition="'$(AssemblyOriginatorKeyFile)' == ''">$(ToolsDir)Open.snk</AssemblyOriginatorKeyFile> |
| 104 | + <SignAssembly>true</SignAssembly> |
| 105 | + <PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign> |
| 106 | + </PropertyGroup> |
| 107 | + |
| 108 | + <PropertyGroup> |
| 109 | + <UseIntrinsics Condition="'$(UseIntrinsics)' == ''">$(Configuration.EndsWith('-Intrinsics'))</UseIntrinsics> |
| 110 | + </PropertyGroup> |
| 111 | + |
| 112 | + <!-- Need to explicitly set these properties for the -Intrinsics configurations becuase they are typically based off 'Debug' or 'Release' configs --> |
| 113 | + <!-- Taken from https://github.com/dotnet/sdk/blob/073c98b92c81066c6c2e17c3674adbb6e833409a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props#L41-L47 --> |
| 114 | + <PropertyGroup Condition="'$(Configuration)' == 'Debug-Intrinsics'"> |
| 115 | + <DebugSymbols>true</DebugSymbols> |
| 116 | + <DefineConstants>$(DefineContants);DEBUG</DefineConstants> |
| 117 | + <Optimize>false</Optimize> |
| 118 | + </PropertyGroup> |
| 119 | + <PropertyGroup Condition="'$(Configuration)' == 'Release-Intrinsics'"> |
| 120 | + <Optimize>true</Optimize> |
| 121 | + </PropertyGroup> |
| 122 | + |
| 123 | + <PropertyGroup> |
| 124 | + <CustomAfterMicrosoftCommonTargets>$(RepoRoot)build\AfterCommonTargets.targets</CustomAfterMicrosoftCommonTargets> |
| 125 | + </PropertyGroup> |
| 126 | +</Project> |
0 commit comments