Skip to content

Commit bbf7317

Browse files
committed
Add common build and pkg props
1 parent ec5c09c commit bbf7317

15 files changed

+190
-96
lines changed
File renamed without changes.

Directory.Build.props

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<Project>
2+
<!-- paths -->
3+
<PropertyGroup>
4+
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
5+
<RepoEngRoot>$(RepoRoot)eng/</RepoEngRoot>
6+
<RepoSrcRoot>$(RepoRoot)src/</RepoSrcRoot>
7+
</PropertyGroup>
28

39
<!-- artifacts -->
410
<PropertyGroup>
511
<ArtifactsPath>$(MSBuildThisFileDirectory)out</ArtifactsPath>
612
<ArtifactsPublishOutputName>pub</ArtifactsPublishOutputName>
713
<ArtifactsPackageOutputName>pkg</ArtifactsPackageOutputName>
8-
<IsPackable>false</IsPackable> <!-- default false -->
9-
</PropertyGroup>
10-
11-
<!-- paths -->
12-
<PropertyGroup>
13-
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
14-
<EngRoot>$(RepoRoot)eng/</EngRoot>
15-
<EngBuildRoot>$(EngRoot)build/</EngBuildRoot>
16-
<EngResourceRoot>$(EngRoot)res/</EngResourceRoot>
17-
<SourceRoot>$(EngRoot)src/</SourceRoot>
14+
<IsPackable>false</IsPackable>
15+
<PackageOutputPath>$(RepoRoot)nupkg/</PackageOutputPath>
1816
</PropertyGroup>
1917

18+
<Import Project="$(RepoEngRoot)Directory.Build.Common.props" />
2019
</Project>

Directory.Packages.props

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
5+
</PropertyGroup>
6+
7+
<Import Project="$(RepoEngRoot)Directory.Packages.props" />
8+
</Project>

NuGet.Config

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<clear />
43
<packageSources>
54
<clear />
65
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />

build/Build.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<LangVersion>10.0</LangVersion>
56
</PropertyGroup>
67
<ItemGroup>
7-
<PackageReference Include="Colors.Net" Version="1.1.0" />
8-
<PackageReference Include="WindowsAzure.Storage" Version="9.3.2" />
9-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
8+
<PackageReference Include="Colors.Net" />
9+
<PackageReference Include="WindowsAzure.Storage" />
10+
<PackageReference Include="Newtonsoft.Json" />
1011
</ItemGroup>
1112
</Project>

eng/Directory.Build.Common.props

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
</PropertyGroup>
7+
8+
<!-- Common library and package properties -->
9+
<PropertyGroup>
10+
<Company>Microsoft Corporation</Company>
11+
<Authors>Microsoft</Authors>
12+
<Title>Azure Functions CLI</Title>
13+
<Copyright>© .NET Foundation. All rights reserved.</Copyright>
14+
<PackageLicenseUrl>http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm</PackageLicenseUrl>
15+
<RepositoryUrl>https://github.com/Azure/azure-functions-core-tools</RepositoryUrl>
16+
<RepositoryType>git</RepositoryType>
17+
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
18+
<ApplicationIcon>$(RepoRoot)AzureFunctions-CLI.ico</ApplicationIcon>
19+
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
20+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
21+
<NeutralLanguage>en-US</NeutralLanguage>
22+
</PropertyGroup>
23+
24+
<PropertyGroup>
25+
<NoWarn>$(NoWarn);NU1507</NoWarn>
26+
</PropertyGroup>
27+
28+
<!-- enable this in a new PR and fix all warnings-->
29+
<!-- <PropertyGroup>
30+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
31+
</PropertyGroup> -->
32+
</Project>

eng/Directory.Packages.props

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<Project>
2+
<!-- common -->
3+
<ItemGroup>
4+
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
5+
<PackageVersion Include="Colors.Net" Version="1.1.0" />
6+
<PackageVersion Include="WindowsAzure.Storage" Version="9.3.1" />
7+
</ItemGroup>
8+
9+
<!-- abstractions-->
10+
<ItemGroup>
11+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
12+
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.25071.2" />
13+
</ItemGroup>
14+
15+
<!-- func -->
16+
<ItemGroup>
17+
<PackageVersion Include="Autofac" Version="4.6.2" />
18+
<PackageVersion Include="Azure.Identity" Version="1.11.4" />
19+
<PackageVersion Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
20+
<PackageVersion Include="AccentedCommandLineParser" Version="2.0.0" />
21+
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />
22+
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="2.2.0" />
23+
<PackageVersion Include="Microsoft.Azure.DurableTask.AzureStorage.Internal" Version="1.4.0" />
24+
<PackageVersion Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="4.1037.0" />
25+
<PackageVersion Include="Microsoft.Build" Version="17.0.0" />
26+
<PackageVersion Include="Microsoft.Identity.Client" Version="4.61.3" />
27+
<PackageVersion Include="NuGet.Packaging" Version="5.11.6" />
28+
<PackageVersion Include="System.Formats.Asn1" Version="6.0.1" />
29+
<PackageVersion Include="YamlDotNet" Version="6.0.0" />
30+
<!-- Transitive dependency -->
31+
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
32+
</ItemGroup>
33+
34+
<!-- workers -->
35+
<ItemGroup>
36+
<PackageVersion Include="Microsoft.Azure.Functions.JavaWorker" Version="2.17.0" />
37+
<PackageVersion Include="Microsoft.Azure.Functions.NodeJsWorker" Version="3.10.1" />
38+
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" Version="4.0.3148" />
39+
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" Version="4.0.4025" />
40+
<PackageVersion Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" Version="4.0.4026" />
41+
<PackageVersion Include="Microsoft.Azure.Functions.PythonWorker" Version="4.34.0" />
42+
</ItemGroup>
43+
44+
<!-- host -->
45+
<ItemGroup>
46+
<PackageVersion Include="Microsoft.NETCore.DotNetAppHost" Version="8.0.8" />
47+
</ItemGroup>
48+
49+
<!-- test projects -->
50+
<!-- <ItemGroup Condition="'$(IsTestProject)' == 'true'">
51+
-->
52+
<ItemGroup>
53+
<PackageVersion Include="Azure.Data.Tables" Version="12.9.0" />
54+
<PackageVersion Include="Azure.Storage.Blobs" Version="12.21.2" />
55+
<PackageVersion Include="Azure.Storage.Queues" Version="12.19.1" />
56+
<PackageVersion Include="FluentAssertions" Version="5.2.0" />
57+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="15.6.2" />
58+
<PackageVersion Include="Moq" Version="4.8.2" />
59+
<PackageVersion Include="NSubstitute" Version="3.1.0" />
60+
<PackageVersion Include="Octokit" Version="0.29.0" />
61+
<PackageVersion Include="RichardSzalay.MockHttp" Version="5.0.0" />
62+
<PackageVersion Include="SuaveServerWrapper" Version="0.0.3" />
63+
<PackageVersion Include="xunit" Version="2.4.0" />
64+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.0" />
65+
<PackageVersion Include="Xunit.SkippableFact" Version="1.3.6" />
66+
</ItemGroup>
67+
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
5-
<OutputType>Library</OutputType>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
84
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
9-
<AssemblyName>Azure.Functions.Cli.Abstractions</AssemblyName>
10-
<RootNamespace>Azure.Functions.Cli.Abstractions</RootNamespace>
115
</PropertyGroup>
126

137
<ItemGroup>
14-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
15-
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.25071.2" />
8+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
9+
<PackageReference Include="System.CommandLine" />
1610
</ItemGroup>
1711

1812
</Project>

src/Cli/ArtifactAssembler/Azure.Functions.Cli.ArtifactAssembler.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
85
</PropertyGroup>
96

107
</Project>

src/Cli/func/Azure.Functions.Cli.csproj

+47-43
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
11
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="ExcludeWorkersFromReadyToRun">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net8.0</TargetFrameworks>
54
<AssemblyName>func</AssemblyName>
65
<RuntimeIdentifiers>win-x64;win-x86;win-arm64;linux-x64;osx-x64;osx-arm64</RuntimeIdentifiers>
7-
<BuildNumber Condition=" '$(BuildNumber)' == '' ">1</BuildNumber>
8-
<MajorMinorProductVersion>4.0</MajorMinorProductVersion>
9-
<Version>$(MajorMinorProductVersion).$(BuildNumber)</Version>
10-
<AssemblyVersion>$(MajorMinorProductVersion).$(BuildNumber)</AssemblyVersion>
11-
<FileVersion>$(MajorMinorProductVersion).$(BuildNumber)</FileVersion>
6+
<Nullable>disable</Nullable>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
1210
<CommitHash Condition="$(CommitHash) == ''">N/A</CommitHash>
1311
<IntegrationBuildNumberInfo Condition="$(IntegrationBuildNumber) != ''">Integration build number: $(IntegrationBuildNumber)</IntegrationBuildNumberInfo>
1412
<InformationalVersion>$(FileVersion) Commit hash: $(CommitHash) $(IntegrationBuildNumberInfo)</InformationalVersion>
15-
<Company>Microsoft</Company>
16-
<Authors>Microsoft</Authors>
17-
<Title>Azure Functions Cli</Title>
18-
<Copyright>? .NET Foundation. All rights reserved.</Copyright>
19-
<PackageLicenseUrl>http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm</PackageLicenseUrl>
20-
<RepositoryUrl>https://github.com/Azure/azure-functions-cli</RepositoryUrl>
21-
<RepositoryType>git</RepositoryType>
22-
<ApplicationIcon>AzureFunctions-CLI.ico</ApplicationIcon>
23-
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
24-
<PackageId>Microsoft.Azure.Functions.CoreTools</PackageId>
25-
<PackageOutputPath>./nupkg</PackageOutputPath>
2613
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
2714
<NuspecFile>Azure.Functions.Cli.nuspec</NuspecFile>
28-
<NuspecProperties>configuration=$(Configuration);targetFramework=$(TargetFramework);version=$(Version)</NuspecProperties>
15+
<NuspecProperties>ßconfiguration=$(Configuration);targetFramework=$(TargetFramework);version=$(Version)</NuspecProperties>
16+
<PackageId>Microsoft.Azure.Functions.CoreTools</PackageId>
17+
</PropertyGroup>
18+
19+
<PropertyGroup>
20+
<BuildNumber Condition=" '$(BuildNumber)' == '' ">1</BuildNumber>
21+
<MajorMinorProductVersion>4.0</MajorMinorProductVersion>
22+
<Version>$(MajorMinorProductVersion).$(BuildNumber)</Version>
23+
<AssemblyVersion>$(MajorMinorProductVersion).$(BuildNumber)</AssemblyVersion>
24+
<FileVersion>$(MajorMinorProductVersion).$(BuildNumber)</FileVersion>
2925
</PropertyGroup>
26+
3027
<PropertyGroup>
31-
<IsPackable>true</IsPackable>
3228
<PackAsTool>true</PackAsTool>
3329
<ToolCommandName>func</ToolCommandName>
3430
</PropertyGroup>
31+
3532
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'win-x64' OR '$(RuntimeIdentifier)' == 'win-x86'">
3633
<PublishReadyToRun>false</PublishReadyToRun>
3734
<PublishReadyToRunShowWarnings>false</PublishReadyToRunShowWarnings>
3835
</PropertyGroup>
36+
3937
<ItemGroup>
4038
<EmbeddedResource Include="StaticResources\stacks.json">
4139
<LogicalName>$(AssemblyName).stacks.json</LogicalName>
@@ -263,42 +261,48 @@
263261
<LogicalName>$(AssemblyName).getting_started_python_function.md</LogicalName>
264262
</EmbeddedResource>
265263
</ItemGroup>
264+
266265
<ItemGroup>
267266
<Content Include="$(RepoRoot)tools\python\packapp\__main__.py">
268267
<Link>tools\python\packapp\__main__.py</Link>
269268
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
270269
</Content>
271270
</ItemGroup>
271+
272272
<ItemGroup>
273-
<PackageReference Include="Autofac" Version="4.6.2" />
274-
<PackageReference Include="Azure.Identity" Version="1.11.4" />
275-
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
276-
<PackageReference Include="Colors.Net" Version="1.1.0" />
277-
<PackageReference Include="AccentedCommandLineParser" Version="2.0.0" />
278-
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
279-
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="2.2.0" />
280-
<PackageReference Include="Microsoft.Azure.DurableTask.AzureStorage.Internal" Version="1.4.0" />
281-
<PackageReference Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="4.1037.0" />
282-
<PackageReference Include="Microsoft.Build" Version="17.0.0" />
283-
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
284-
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
285-
<PackageReference Include="NuGet.Packaging" Version="5.11.6" />
286-
<PackageReference Include="System.Formats.Asn1" Version="6.0.1" />
287-
<PackageReference Include="WindowsAzure.Storage" Version="9.3.1" />
288-
<PackageReference Include="YamlDotNet" Version="6.0.0" />
273+
<PackageReference Include="Autofac" />
274+
<PackageReference Include="Azure.Identity"/>
275+
<PackageReference Include="Azure.Security.KeyVault.Secrets" />
276+
<PackageReference Include="Colors.Net" />
277+
<PackageReference Include="AccentedCommandLineParser" />
278+
<PackageReference Include="Microsoft.ApplicationInsights" />
279+
<PackageReference Include="Microsoft.AspNetCore.DataProtection" />
280+
<PackageReference Include="Microsoft.Azure.DurableTask.AzureStorage.Internal" />
281+
<PackageReference Include="Microsoft.Azure.WebJobs.Script.WebHost" />
282+
<PackageReference Include="Microsoft.Build" />
283+
<PackageReference Include="Microsoft.Identity.Client" />
284+
<PackageReference Include="Newtonsoft.Json" />
285+
<PackageReference Include="NuGet.Packaging" />
286+
<PackageReference Include="System.Formats.Asn1" />
287+
<PackageReference Include="WindowsAzure.Storage" />
288+
<PackageReference Include="YamlDotNet" />
289289
<!-- Transitive dependency -->
290-
<PackageReference Include="System.Text.Json" Version="8.0.5" />
290+
<PackageReference Include="System.Text.Json" />
291291
</ItemGroup>
292+
292293
<ItemGroup Condition="'$(NoWorkers)' != 'true'">
293-
<PackageReference Include="Microsoft.Azure.Functions.JavaWorker" Version="2.17.0" />
294-
<PackageReference Include="Microsoft.Azure.Functions.NodeJsWorker" Version="3.10.1" />
295-
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" Version="4.0.3148" />
296-
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" Version="4.0.4025" />
297-
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" Version="4.0.4026" />
298-
<PackageReference Include="Microsoft.Azure.Functions.PythonWorker" Version="4.34.0" />
294+
<PackageReference Include="Microsoft.Azure.Functions.JavaWorker" />
295+
<PackageReference Include="Microsoft.Azure.Functions.NodeJsWorker" />
296+
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.0" />
297+
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.2" />
298+
<PackageReference Include="Microsoft.Azure.Functions.PowerShellWorker.PS7.4" />
299+
<PackageReference Include="Microsoft.Azure.Functions.PythonWorker" />
299300
</ItemGroup>
301+
300302
<Target Name="ExcludeWorkersFromReadyToRun">
301-
<CreateItem Include="%(None.Filename)%(None.Extension)" Condition="$([System.String]::new('%(None.TargetPath)').StartsWith('workers'))" PreserveExistingMetadata="false">
303+
<CreateItem Include="%(None.Filename)%(None.Extension)"
304+
Condition="$([System.String]::new('%(None.TargetPath)').StartsWith('workers'))"
305+
PreserveExistingMetadata="false">
302306
<Output TaskParameter="Include" ItemName="PublishReadyToRunExclude" />
303307
</CreateItem>
304308
</Target>

src/CoreToolsHost/CoreToolsHost.csproj

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net9.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
86
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
97
<PublishAot>true</PublishAot>
108
<!--Starting with .NET 9, CET is enabled by default (https://github.com/dotnet/docs/issues/42600).
@@ -14,7 +12,7 @@
1412
<CETCompat>false</CETCompat>
1513
<OptimizationPreference>Speed</OptimizationPreference>
1614
<AssemblyName>func</AssemblyName>
17-
<IlcExportUnmanagedEntrypoints>true</IlcExportUnmanagedEntrypoints>
15+
<IlcExportUnmanagedEntrypoints>true</IlcExportUnmanagedEntrypoints>
1816
</PropertyGroup>
1917

2018
<PropertyGroup>
@@ -26,7 +24,7 @@
2624
</PropertyGroup>
2725

2826
<ItemGroup>
29-
<PackageReference Include="Microsoft.NETCore.DotNetAppHost" Version="8.0.8" />
27+
<PackageReference Include="Microsoft.NETCore.DotNetAppHost" />
3028
</ItemGroup>
3129

3230
</Project>

src/Directory.Build.props

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<Project>
2-
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"
3-
Condition="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../')) != ''" />
2+
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
43

5-
<!-- artifacts -->
64
<PropertyGroup>
75
<IsPackable>true</IsPackable>
86
</PropertyGroup>
9-
107
</Project>

0 commit comments

Comments
 (0)