|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
1 | 2 | <Project>
|
2 |
| - <!-- Directory.Build.props contains the common build settings for all projects in the repo. --> |
3 | 3 |
|
4 |
| - <Import Project="build/BranchInfo.props" /> |
5 |
| - <Import Project="build/Dependencies.props" /> |
| 4 | + <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> |
| 5 | + |
| 6 | + <Import Project="eng/BranchInfo.props" /> |
| 7 | + <Import Project="eng/ExternalBenchmarkDataFiles.props" /> |
| 8 | + <Import Project="eng/TensorflowMetaFiles.props" /> |
6 | 9 |
|
7 | 10 | <PropertyGroup>
|
8 | 11 | <CreateSymbolicLinksForPublishFilesIfPossible>true</CreateSymbolicLinksForPublishFilesIfPossible>
|
9 | 12 | </PropertyGroup>
|
10 | 13 |
|
| 14 | + <PropertyGroup> |
| 15 | + <Copyright>$(CopyrightNetFoundation)</Copyright> |
| 16 | + <PackageLicenseExpression>MIT</PackageLicenseExpression> |
| 17 | + <TreatWarningsAsErrors>True</TreatWarningsAsErrors> |
| 18 | + <DebugType>embedded</DebugType> |
| 19 | + <DebugSymbols>true</DebugSymbols> |
| 20 | + <LangVersion>latest</LangVersion> |
| 21 | + </PropertyGroup> |
| 22 | + |
11 | 23 | <PropertyGroup>
|
12 | 24 | <Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
|
13 | 25 | <Configurations>Debug;Release;Debug-netcoreapp3_1;Release-netcoreapp3_1;Debug-netfx;Release-netfx</Configurations>
|
14 | 26 | <Platform Condition="'$(Platform)'==''">AnyCPU</Platform>
|
15 | 27 | <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
|
16 | 28 | <NativeTargetArchitecture Condition="'$(NativeTargetArchitecture)' == ''">$(TargetArchitecture)</NativeTargetArchitecture>
|
17 | 29 | <PlatformConfig>$(Platform).$(Configuration)</PlatformConfig>
|
| 30 | + <StrongNameKeyId>Open</StrongNameKeyId> |
18 | 31 | </PropertyGroup>
|
19 | 32 |
|
20 | 33 | <PropertyGroup>
|
21 |
| - <RestoreSources> |
22 |
| - https://api.nuget.org/v3/index.json; |
23 |
| - https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; |
24 |
| - https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; |
25 |
| - https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json; |
26 |
| - https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json; |
27 |
| - https://pkgs.dev.azure.com/dnceng/public/_packaging/machinelearning-testdata/nuget/v3/index.json; |
28 |
| - </RestoreSources> |
29 |
| - </PropertyGroup> |
30 |
| - |
31 |
| - <!-- Common repo directories --> |
32 |
| - <PropertyGroup> |
33 |
| - <RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot> |
34 |
| - <SourceDir>$(RepoRoot)src/</SourceDir> |
| 34 | + <PackageAssetsPath>$(ArtifactsDir)/pkgassets/</PackageAssetsPath> |
35 | 35 | <PkgDir>$(RepoRoot)pkg/</PkgDir>
|
36 |
| - |
37 |
| - <!-- Output directories --> |
38 |
| - <BinDir Condition="'$(BinDir)'==''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'bin'))</BinDir> |
39 |
| - <BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath> |
40 |
| - <ObjDir Condition="'$(ObjDir)'==''">$([MSBuild]::NormalizeDirectory('$(BinDir)', 'obj'))</ObjDir> |
41 |
| - <RootIntermediateOutputPath Condition="'$(RootIntermediateOutputPath)'==''">$(ObjDir)</RootIntermediateOutputPath> |
42 |
| - |
43 |
| - <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(RootIntermediateOutputPath)$(PlatformConfig)\</IntermediateOutputRootPath> |
44 |
| - <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)$(MSBuildProjectName)\</IntermediateOutputPath> |
45 |
| - <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(IntermediateOutputPath)</BaseIntermediateOutputPath> |
46 |
| - |
47 |
| - <OutputPath Condition="'$(OutputPath)'==''">$(BaseOutputPath)$(PlatformConfig)\$(MSBuildProjectName)\</OutputPath> |
48 |
| - |
49 |
| - <PackageAssetsPath>$(ObjDir)/packages/</PackageAssetsPath> |
50 |
| - |
51 |
| - <PackageOutputPath Condition="'$(PackageOutputPath)'=='' and '$(NonShippingPackage)' == 'true'">$(BinDir)packages_noship/</PackageOutputPath> |
52 |
| - <PackageOutputPath Condition="'$(PackageOutputPath)'==''">$(BinDir)packages/</PackageOutputPath> |
53 |
| - |
54 |
| - <NativeOutputPath>$(BaseOutputPath)$(NativeTargetArchitecture).$(Configuration)\Native\</NativeOutputPath> |
55 |
| - |
56 |
| - <!-- Input Directories --> |
57 |
| - <PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir> |
58 |
| - <PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages/</PackagesDir> |
59 |
| - <RestorePackagesPath>$(PackagesDir)</RestorePackagesPath> |
60 |
| - <ToolsDir Condition="'$(ToolsDir)'==''">$(RepoRoot)Tools/</ToolsDir> |
61 |
| - </PropertyGroup> |
62 |
| - |
63 |
| - <Import Project="$(ToolsDir)BuildVersion.targets" |
64 |
| - Condition="Exists('$(ToolsDir)BuildVersion.targets')" /> |
65 |
| - |
66 |
| - <!-- Version properties --> |
67 |
| - <PropertyGroup> |
68 |
| - <VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix> |
69 |
| - <BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">00001</BuildNumberMajor> |
70 |
| - <BuildNumberMinor Condition="'$(BuildNumberMinor)' == ''">0</BuildNumberMinor> |
71 |
| - <AssemblyFileVersion Condition="'$(AssemblyFileVersion)'==''">$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</AssemblyFileVersion> |
72 |
| - |
73 |
| - <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion> |
74 |
| - <IncludeBuildNumberInPackageVersion Condition="'$(IncludeBuildNumberInPackageVersion)' == '' and '$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion> |
75 |
| - |
76 |
| - <VersionSuffix Condition="'$(IncludeBuildNumberInPackageVersion)' == 'true'">$(BuildNumberMajor)-$(BuildNumberMinor)</VersionSuffix> |
77 |
| - <NoPackageAnalysis>true</NoPackageAnalysis> |
78 |
| - </PropertyGroup> |
79 |
| - |
80 |
| - <!-- SourceLink properties used by dotnet/buildtools - need to be set before importing $(ToolsDir)versioning.props --> |
81 |
| - <PropertyGroup> |
82 |
| - <UseSourceLink>true</UseSourceLink> |
83 |
| - <GitHubRepositoryName>machinelearning</GitHubRepositoryName> |
84 |
| - </PropertyGroup> |
85 |
| - |
86 |
| - <!-- |
87 |
| - Source code control properties used by the .NET Core SDK to inject SCC info into the NuGet package. |
88 |
| - In future versions, these will be used for SourceLink and to generate AssemblyInfo. |
89 |
| - --> |
90 |
| - <PropertyGroup> |
91 |
| - <PrivateRepositoryUrl>https://github.com/dotnet/$(GitHubRepositoryName)</PrivateRepositoryUrl> |
92 |
| - <PublishRepositoryUrl>true</PublishRepositoryUrl> |
93 |
| - <SourceRevisionId>$(LatestCommit)</SourceRevisionId> |
94 |
| - </PropertyGroup> |
95 |
| - |
96 |
| - <Import Project="$(ToolsDir)versioning.props" |
97 |
| - Condition="Exists('$(ToolsDir)versioning.props') and '$(DisableImportVersioningProps)' != 'true'" /> |
98 |
| - |
99 |
| - <!-- Language configuration --> |
100 |
| - <PropertyGroup> |
101 |
| - <LangVersion Condition="'$(MSBuildProjectExtension)'=='.csproj'">8.0</LangVersion> |
102 |
| - <LangVersion Condition="'$(MSBuildProjectExtension)'=='.fsproj'">4.7</LangVersion> |
103 |
| - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
104 |
| - </PropertyGroup> |
105 |
| - |
106 |
| - <PropertyGroup> |
107 |
| - <RunningOnUnix Condition="'$(OS)'!='Windows_NT'">true</RunningOnUnix> |
108 |
| - </PropertyGroup> |
109 |
| - |
110 |
| - <!-- Signing properties --> |
111 |
| - <PropertyGroup> |
112 |
| - <AssemblyOriginatorKeyFile Condition="'$(AssemblyOriginatorKeyFile)' == ''">$(ToolsDir)Open.snk</AssemblyOriginatorKeyFile> |
113 |
| - <SignAssembly>true</SignAssembly> |
114 |
| - <PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign> |
115 | 36 | </PropertyGroup>
|
116 | 37 |
|
117 | 38 | <!-- Need to explicitly set these properties for the -netcoreapp3_1 or -netfx configurations becuase they are typically based off 'Debug' or 'Release' configs -->
|
|
125 | 46 | <Optimize>true</Optimize>
|
126 | 47 | </PropertyGroup>
|
127 | 48 |
|
| 49 | + <PropertyGroup> |
| 50 | + <!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) --> |
| 51 | + <PublishRepositoryUrl>true</PublishRepositoryUrl> |
| 52 | + |
| 53 | + <!-- Optional: Embed source files that are not tracked by the source control manager in the PDB --> |
| 54 | + <EmbedUntrackedSources>true</EmbedUntrackedSources> |
| 55 | + |
| 56 | + <!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link --> |
| 57 | + <IncludeSymbols>true</IncludeSymbols> |
| 58 | + <SymbolPackageFormat>snupkg</SymbolPackageFormat> |
| 59 | + </PropertyGroup> |
| 60 | + |
| 61 | + <PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'"> |
| 62 | + <!-- |
| 63 | + When building using source-build the process is: |
| 64 | + - Newtonsoft.Json versions 9.0.1 and 12.0.2 are built by source-build |
| 65 | + - Version 12.0.2 is written to Version.props |
| 66 | + - Arcade needs to use 9.0.1 so we need to override Version.props value here |
| 67 | + --> |
| 68 | + <NewtonsoftJsonVersion>9.0.1</NewtonsoftJsonVersion> |
| 69 | + </PropertyGroup> |
| 70 | + |
| 71 | + <PropertyGroup Condition="'$(DotNetBuildOffline)' == 'true'"> |
| 72 | + <!-- |
| 73 | + Arcade has a special version prop for CodeAnalysis.CSharp in GenFacades |
| 74 | + to try to match the version loaded by msbuild. In the offline build, this |
| 75 | + is simply the source-built version. |
| 76 | + --> |
| 77 | + <MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisCSharpVersion)</MsbuildTaskMicrosoftCodeAnalysisCSharpVersion> |
| 78 | + </PropertyGroup> |
128 | 79 | </Project>
|
0 commit comments