From 8aa8c6b2b0838942710066a2fdf6fb675c5c604f Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Mon, 14 Jan 2019 08:42:53 -0800 Subject: [PATCH] Build branch logging SE in main build (#6312) --- build/AzureIntegration.targets | 30 ------- build/SharedFx.targets | 23 +++++ build/artifacts.props | 1 + build/repo.props | 3 + build/repo.targets | 5 +- .../LoggingBranch/Directory.Build.targets | 33 +++++++ .../LoggingBranch/LoggingBranch.csproj | 33 +++++++ .../Sdk/HostingStartup/HostingStartup.csproj | 13 +++ .../Sdk/HostingStartup/Program.cs | 7 ++ src/SiteExtensions/Sdk/SiteExtension.targets | 86 +++++++++++++++++++ version.props | 2 +- 11 files changed, 202 insertions(+), 34 deletions(-) delete mode 100644 build/AzureIntegration.targets create mode 100644 src/SiteExtensions/LoggingBranch/Directory.Build.targets create mode 100644 src/SiteExtensions/LoggingBranch/LoggingBranch.csproj create mode 100644 src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj create mode 100644 src/SiteExtensions/Sdk/HostingStartup/Program.cs create mode 100644 src/SiteExtensions/Sdk/SiteExtension.targets diff --git a/build/AzureIntegration.targets b/build/AzureIntegration.targets deleted file mode 100644 index 8df9536eb7..0000000000 --- a/build/AzureIntegration.targets +++ /dev/null @@ -1,30 +0,0 @@ - - - $(MSBuildThisFileDirectory)..\modules\AzureIntegration\ - - - - - - AspNetUniverseBuildOffline=true; - RepositoryRoot=$(AzureIntegrationProjectRoot); - DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); - DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath); - BuildNumber=$(BuildNumber); - Configuration=$(Configuration); - IsFinalBuild=$(IsFinalBuild); - - - - - - - - - - - - - diff --git a/build/SharedFx.targets b/build/SharedFx.targets index 828b62606e..8c0617bb9e 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -43,6 +43,7 @@ $(CommonProps);AspNetUniverseBuildOffline=true $(CommonProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp21PackageVersion) $(CommonProps);AppMetapackageVersion=$(PackageVersion) + $(CommonProps);BuildNumber=$(BuildNumber) + + + + AspNetUniverseBuildOffline=true; + DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); + DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath); + BuildNumber=$(BuildNumber); + Configuration=$(Configuration); + IsFinalBuild=$(IsFinalBuild); + + + + + + + + + + + + + true diff --git a/build/artifacts.props b/build/artifacts.props index 05028ca8bb..cc9b15aab9 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -43,6 +43,7 @@ + diff --git a/build/repo.props b/build/repo.props index d7bebe44d4..e595d67e62 100644 --- a/build/repo.props +++ b/build/repo.props @@ -14,6 +14,9 @@ $(RepositoryRoot).deps\build\ $(RepositoryRoot).deps\Signed\Packages\ $(RepositoryRoot)src\Shared\ + $(SharedFxRid.Substring($([MSBuild]::Add($(SharedFxRid.LastIndexOf('-')), 1)))) + false + false diff --git a/build/repo.targets b/build/repo.targets index 0a0393f6de..c0d6650e27 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -1,7 +1,6 @@ - @@ -19,7 +18,7 @@ $(CompileDependsOn);BuildProjects;PackSharedSources $(CompileDependsOn);PackProjects;BuildRepositories $(PackageDependsOn);PackProjects - $(PackageDependsOn);BuildMetapackages;CheckExpectedPackagesExist + $(PackageDependsOn);BuildMetapackages;BuildSiteExtension;CheckExpectedPackagesExist $(TestDependsOn);TestProjects $(TestDependsOn);_TestRepositories $(GetArtifactInfoDependsOn);GetProjectArtifactInfo @@ -69,7 +68,7 @@ - + MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreAppPackageVersion); diff --git a/src/SiteExtensions/LoggingBranch/Directory.Build.targets b/src/SiteExtensions/LoggingBranch/Directory.Build.targets new file mode 100644 index 0000000000..df33ae31f1 --- /dev/null +++ b/src/SiteExtensions/LoggingBranch/Directory.Build.targets @@ -0,0 +1,33 @@ + + + + + + + + + false + + false + + false + + true + + false + + false + false + + + + + + NuGetPackage + $(PackageId) + $(PackageVersion) + + + + + diff --git a/src/SiteExtensions/LoggingBranch/LoggingBranch.csproj b/src/SiteExtensions/LoggingBranch/LoggingBranch.csproj new file mode 100644 index 0000000000..0fae8e658a --- /dev/null +++ b/src/SiteExtensions/LoggingBranch/LoggingBranch.csproj @@ -0,0 +1,33 @@ + + + + $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) + ASP.NET Core Extensions + This extension enables additional functionality for ASP.NET Core on Azure WebSites, such as enabling Azure logging. + net461 + false + aspnet;logging;aspnetcore;AzureSiteExtension;keyvault;configuration;dataprotection + content + Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(TrimmedVersion) + $(PackageVersion) + $(MicrosoftNETCoreApp21PackageVersion) + net461 + false + AzureSiteExtension + true + false + false + false + content + true + + + + + + + + + + + diff --git a/src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj b/src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj new file mode 100644 index 0000000000..59cdf76e60 --- /dev/null +++ b/src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp2.1 + Exe + + + + + + + + diff --git a/src/SiteExtensions/Sdk/HostingStartup/Program.cs b/src/SiteExtensions/Sdk/HostingStartup/Program.cs new file mode 100644 index 0000000000..8cd3c0026c --- /dev/null +++ b/src/SiteExtensions/Sdk/HostingStartup/Program.cs @@ -0,0 +1,7 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +public class Program +{ + public static void Main() { } +} \ No newline at end of file diff --git a/src/SiteExtensions/Sdk/SiteExtension.targets b/src/SiteExtensions/Sdk/SiteExtension.targets new file mode 100644 index 0000000000..6e941d74ac --- /dev/null +++ b/src/SiteExtensions/Sdk/SiteExtension.targets @@ -0,0 +1,86 @@ + + + + + + + <_TemplatesDirectory>$(MSBuildThisFileDirectory)..\content\ + <_DepsOutputDirectory>$(RepositoryRoot).w\se\ + <_WorkingDirectory>$(_DepsOutputDirectory)\depswork + <_BasePackagePath>content\additionaldeps\ + <_RuntimeStoreManifestFile>$(_DepsOutputDirectory)\rs.csproj + <_RuntimeStoreOutput>$(_DepsOutputDirectory)\rs\ + + + + + + + + + ]]> + + + + + <_TemplateFiles Include="$(MSBuildThisFileDirectory)\HostingStartup\*.cs*" /> + <_HostingStartupPackageReference + Include="%(HostingStartupPackageReference.Identity)" + Source="%(HostingStartupPackageReference.Source)" + Version="%(HostingStartupPackageReference.Version)" + WorkingDirectory="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)" + Project="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\HostingStartup.csproj" + DepsFile="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\p\HostingStartup.deps.json" + TrimmedDepsFile="$(_DepsOutputDirectory)%(HostingStartupPackageReference.Identity)\%(HostingStartupPackageReference.Identity).deps.json" + PackagePath="$(_BasePackagePath)%(HostingStartupPackageReference.Identity)\shared\Microsoft.AspNetCore.App\$(MicrosoftAspNetCoreAppPackageVersion)\" + /> + + + + + + + + <_CommonProperties> + AspNetUniverseBuildOffline=true; + DotNetRestoreSourcePropsPath=$(DotNetRestoreSourcePropsPath); + DotNetPackageVersionPropsPath=$(DotNetPackageVersionPropsPath); + BuildNumber=$(BuildNumber); + Configuration=$(Configuration); + IsFinalBuild=$(IsFinalBuild); + MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion); + RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion); + + + + + + + + + + + + + + + + <_RuntimeStoreFiles Include="$(_RuntimeStoreOutput)\%(HostingStartupRuntimeStoreTargets.Runtime)\**\*.dll" /> + + + + + + + + diff --git a/version.props b/version.props index 08bb4a8c92..17e25d5889 100644 --- a/version.props +++ b/version.props @@ -5,7 +5,7 @@ 7 servicing Servicing - t000 + t000 $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion) 0.1.$(AspNetCorePatchVersion)