Move SiteExtension sdk into AspNetCore (#6041)
This commit is contained in:
parent
705bf63f1c
commit
19c8980deb
|
|
@ -55,6 +55,10 @@
|
|||
<FilesToSign Include="aspnetcorev2_inprocess.dll" Certificate="$(AssemblySigningCertName)" Container="Microsoft.AspNetCore.App" />
|
||||
<FilesToSign Include="aspnetcorev2_outofprocess.dll" Certificate="$(AssemblySigningCertName)" Container="Microsoft.AspNetCore.App" />
|
||||
|
||||
<!-- Used as part of site extension -->
|
||||
<FilesToSign Include="Microsoft.Web.Xdt.Extensions.dll" Certificate="$(AssemblySigningCertName)" Container="AspNetCoreRuntime.3.0" />
|
||||
|
||||
|
||||
<!-- This is a text file which doesn't need to be code signed, even though some .mof files can be signed. -->
|
||||
<FilesToExcludeFromSigning Include="ancm.mof" />
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<FxProjectToBuild Condition=" '$(SharedFxRid)' == 'linux-x64' AND '$(LinuxInstallerType)' == 'rpm' " Include="$(RepositoryRoot)src\Installers\Rpm\*.*proj" />
|
||||
|
||||
<FxProjectToBuild Condition=" '$(BuildSiteExtensions)' == 'true' " Include="$(RepositoryRoot)src\SiteExtensions\Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj" />
|
||||
<FxProjectToBuild Condition=" '$(BuildSiteExtensions)' == 'true' " Include="$(RepositoryRoot)src\SiteExtensions\LoggingBranch\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj" />
|
||||
<FxProjectToBuild Condition=" '$(BuildSiteExtensions)' == 'true' " Include="$(RepositoryRoot)src\SiteExtensions\LoggingBranch\LoggingBranch.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BuildSharedFx" DependsOnTargets="$(BuildSharedFxDependsOn)" />
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ This can be done once #4246 is complete, and done in conjunction with converting
|
|||
<PackageArtifact Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Category="noship" />
|
||||
|
||||
<!-- This packages contain bits used by Azure site extensions, and are not currently deployed to NuGet.org automatically like the rest of our packages. -->
|
||||
<PackageArtifact Include="Microsoft.Web.Xdt.Extensions" Category="noship" />
|
||||
<PackageArtifact Include="Microsoft.Extensions.ApplicationModelDetection" Category="noship" />
|
||||
|
||||
<!-- This packages are produce for testing purposes only. -->
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27016.1
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28315.86
|
||||
MinimumVisualStudioVersion = 15.0.26730.03
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServicesIntegration", "src\Microsoft.AspNetCore.AzureAppServicesIntegration\Microsoft.AspNetCore.AzureAppServicesIntegration.csproj", "{5916BEB5-0969-469B-976C-A392E015DFAC}"
|
||||
EndProject
|
||||
|
|
@ -32,18 +33,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureA
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureAppServicesHostingStartupSample", "sample\AzureAppServicesHostingStartupSample\AzureAppServicesHostingStartupSample.csproj", "{939EA897-CA31-4F2E-BA51-22B570B64671}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Web.Xdt.Extensions", "src\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj", "{9B22E525-FEC9-4C7C-9F9C-598C15BD0250}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServices.SiteExtension", "extensions\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj", "{1CE2D76B-39E6-46C0-8F6F-C63E370955A9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Web.Xdt.Extensions.Tests", "test\Microsoft.Web.Xdt.Extensions.Tests\Microsoft.Web.Xdt.Extensions.Tests.csproj", "{809AEE05-1B28-4E31-8959-776B249BD725}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApplicationModelDetection", "src\Microsoft.Extensions.ApplicationModelDetection\Microsoft.Extensions.ApplicationModelDetection.csproj", "{F0CABFE8-A5B1-487B-A451-A486D26742D3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApplicationModelDetection.Tests", "test\Microsoft.Extensions.ApplicationModelDetection.Tests\Microsoft.Extensions.ApplicationModelDetection.Tests.csproj", "{15664836-2B94-4D2D-AC18-6DED01FCCCBD}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Runtime.SiteExtension", "extensions\Microsoft.AspNetCore.Runtime.SiteExtension\Microsoft.AspNetCore.Runtime.SiteExtension.csproj", "{E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -70,18 +63,6 @@ Global
|
|||
{939EA897-CA31-4F2E-BA51-22B570B64671}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{939EA897-CA31-4F2E-BA51-22B570B64671}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{939EA897-CA31-4F2E-BA51-22B570B64671}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{809AEE05-1B28-4E31-8959-776B249BD725}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{809AEE05-1B28-4E31-8959-776B249BD725}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{809AEE05-1B28-4E31-8959-776B249BD725}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{809AEE05-1B28-4E31-8959-776B249BD725}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F0CABFE8-A5B1-487B-A451-A486D26742D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F0CABFE8-A5B1-487B-A451-A486D26742D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F0CABFE8-A5B1-487B-A451-A486D26742D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -90,10 +71,6 @@ Global
|
|||
{15664836-2B94-4D2D-AC18-6DED01FCCCBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{15664836-2B94-4D2D-AC18-6DED01FCCCBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{15664836-2B94-4D2D-AC18-6DED01FCCCBD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -104,12 +81,8 @@ Global
|
|||
{9BA1B692-B313-4E22-A864-F0ADBBE3C3FA} = {CD650B4B-81C2-4A44-AEF2-A251A877C1F0}
|
||||
{AC023B45-7995-4D4A-8108-E512AE8E5734} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435}
|
||||
{939EA897-CA31-4F2E-BA51-22B570B64671} = {37237C93-6855-40D9-9E60-418B093EF49A}
|
||||
{9B22E525-FEC9-4C7C-9F9C-598C15BD0250} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435}
|
||||
{1CE2D76B-39E6-46C0-8F6F-C63E370955A9} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435}
|
||||
{809AEE05-1B28-4E31-8959-776B249BD725} = {CD650B4B-81C2-4A44-AEF2-A251A877C1F0}
|
||||
{F0CABFE8-A5B1-487B-A451-A486D26742D3} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435}
|
||||
{15664836-2B94-4D2D-AC18-6DED01FCCCBD} = {CD650B4B-81C2-4A44-AEF2-A251A877C1F0}
|
||||
{E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5743DFE7-1AA5-439D-84AE-A480EA389927}
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
<Project>
|
||||
<Import Project="..\Directory.Build.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||
<PackageType>AzureSiteExtension</PackageType>
|
||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<IncludeSymbols>false</IncludeSymbols>
|
||||
<IncludeSource>false</IncludeSource>
|
||||
<ContentTargetFolders>content</ContentTargetFolders>
|
||||
<!--
|
||||
NuGet skips files ending .nuget producing warning at the same time
|
||||
there is no way to disable default excludes from MsBuild (see:https://github.com/NuGet/Home/issues/6450)
|
||||
and we don't care about item templates on Antares
|
||||
-->
|
||||
<NoWarn>$(NoWarn);NU5119</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TrimmedVersion>$(VersionPrefix.Substring(0, $(VersionPrefix.LastIndexOf('.'))))</TrimmedVersion>
|
||||
<title>ASP.NET Core Extensions</title>
|
||||
<Description>This extension enables additional functionality for ASP.NET Core on Azure WebSites, such as enabling Azure logging.</Description>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||
<PackageTags>aspnet;logging;aspnetcore;AzureSiteExtension;keyvault;configuration;dataprotection</PackageTags>
|
||||
<ContentTargetFolders>content</ContentTargetFolders>
|
||||
<HostingStartupRuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</HostingStartupRuntimeFrameworkVersion>
|
||||
<PackageId>Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(TrimmedVersion)</PackageId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<HostingStartupPackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="$(MicrosoftAspNetCoreAzureAppServicesHostingStartupPackageVersion)" />
|
||||
|
||||
<PackageReference Include="Internal.AspNetCore.SiteExtension.Sdk" Version="$(InternalAspNetCoreSiteExtensionSdkPackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TrimmedVersion>$(VersionPrefix.Substring(0, $(VersionPrefix.LastIndexOf('.'))))</TrimmedVersion>
|
||||
<Title>ASP.NET Core $(TrimmedVersion) ($(RuntimeArch)) Runtime </Title>
|
||||
<Description>This site extension installs Microsoft.AspNetCore.All, Microsoft.AspNetCore.App and Microsoft.NetCore.App shared runtimes.</Description>
|
||||
<PackageTags>aspnetcore;AzureSiteExtension</PackageTags>
|
||||
<PackageId>AspNetCoreRuntime.$(TrimmedVersion).$(RuntimeArch)</PackageId>
|
||||
<IsProductPackage>true</IsProductPackage>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="applicationHost.xdt" />
|
||||
<Content Include="scmApplicationHost.xdt" />
|
||||
<Content Include="install.cmd" />
|
||||
<Content Include="$(OutputPath)\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
|
||||
|
||||
<Content Include="$(DotnetHomeDirectory)\$(RuntimeArch)\**\*.*" Condition="$(DotnetHomeDirectory) != ''" PackagePath="content\%(RecursiveDir)%(FileName)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(RuntimeArch)' == 'x86'">
|
||||
<Content Include="$(AspNetCoreModuleX86Location)" PackagePath="content\ancm" />
|
||||
<Content Include="$(OutOfProcessRequestHandlerX86Location)" PackagePath="content\ancm\$(AspNetCoreModuleOutOfProcessVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(RuntimeArch)' == 'x64'">
|
||||
<Content Include="$(AspNetCoreModuleX64Location)" PackagePath="content\ancm" />
|
||||
<Content Include="$(OutOfProcessRequestHandlerX64Location)" PackagePath="content\ancm\$(AspNetCoreModuleOutOfProcessVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" />
|
||||
<PackageReference Condition="'$(OS)' == 'Windows_NT'" Include="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="$(MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
|
||||
<xdt:Import path="%XDT_EXTENSIONPATH%\Microsoft.Web.Xdt.Extensions.dll"
|
||||
namespace="Microsoft.Web.Xdt.Extensions" />
|
||||
|
||||
<system.webServer xdt:Transform="InsertIfMissing">
|
||||
<runtime xdt:Transform="InsertIfMissing" >
|
||||
<environmentVariables xdt:Transform="InsertIfMissing">
|
||||
<add name="PATH" value="%XDT_EXTENSIONPATH%;%USERPROFILE%\.dotnet\tools;%PATH%" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
|
||||
<add name="DOTNET_SKIP_FIRST_TIME_EXPERIENCE" value="1" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
|
||||
<add name="DOTNET_ROOT" value="%XDT_EXTENSIONPATH%" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
|
||||
</environmentVariables>
|
||||
</runtime>
|
||||
|
||||
<globalModules>
|
||||
<add name="AspNetCoreModuleV2" image="%XDT_EXTENSIONPATH%\ancm\aspnetcorev2.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
|
||||
</globalModules>
|
||||
</system.webServer>
|
||||
|
||||
<location>
|
||||
<system.webServer>
|
||||
<modules>
|
||||
<add name="AspNetCoreModuleV2" lockItem="true" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
|
||||
</modules>
|
||||
</system.webServer>
|
||||
</location>
|
||||
|
||||
</configuration>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
FOR /R %%x IN (*.nupkg_) DO REN "%%x" "*.nupkg"
|
||||
|
||||
|
||||
SET DOTNET=D:\Program Files (x86)\dotnet
|
||||
SET RUNTIMES=%DOTNET%\shared\Microsoft.NETCore.App
|
||||
|
||||
IF "%ASPNETCORE_COPY_EXISTING_RUNTIMES%" NEQ "1" EXIT /b 0
|
||||
|
||||
robocopy "%DOTNET%" "." /E /XC /XN /XO /NFL /NDL ^
|
||||
/XD "%DOTNET%\sdk" ^
|
||||
/XD "%RUNTIMES%\1.0.8" ^
|
||||
/XD "%RUNTIMES%\1.1.5" ^
|
||||
/XD "%RUNTIMES%\2.0.3"
|
||||
|
||||
IF %errorlevel% geq 8 EXIT /b 1
|
||||
EXIT /b 0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!-- This file exists to prevent applicationHost.xdt from being applied to scm host that runs
|
||||
other dotnet processes (dotnet build, csc etc. )-->
|
||||
</configuration>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Additional functionality for Xdt transforms.</Description>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>xdt</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Web.Xdt" Version="$(MicrosoftWebXdtPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<Project>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<BaseIntermediateOutputPath>$(RepositoryRoot)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
|
||||
<BaseOutputPath>$(RepositoryRoot)bin\$(MSBuildProjectName)\</BaseOutputPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<ItemGroup>
|
||||
<Content Include="applicationHost.xdt" />
|
||||
<Content Include="scmApplicationHost.xdt" />
|
||||
<Content Include="bin\$(Configuration)\$(TargetFramework)\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
|
||||
<Content Include="$(RepositoryRoot)bin\Microsoft.Web.Xdt.Extensions\$(Configuration)\$(TargetFramework)\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
|
||||
<SignedPackageFile
|
||||
Include="bin\$(Configuration)\$(TargetFramework)\Microsoft.Web.Xdt.Extensions.dll"
|
||||
PackagePath="content/Microsoft.Web.Xdt.Extensions.dll"
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="AddContent" BeforeTargets="_GetPackageFiles;GetSignedPackageFiles">
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" />
|
||||
|
||||
<Import Project="..\Sdk\SiteExtension.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- There is no build output -->
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
<HostingStartupPackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="$(PackageVersion)" />
|
||||
|
||||
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
|
||||
<PackageReference Include="Internal.AspNetCore.SiteExtension.Sdk" Version="$(InternalAspNetCoreSiteExtensionSdkPackageVersion)" PrivateAssets="All" />
|
||||
|
||||
<ProjectReference Include="..\..\Framework\pkg\Microsoft.AspNetCore.App.pkgproj">
|
||||
<Targets>Pack</Targets>
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
using Microsoft.Web.XmlTransform;
|
||||
|
||||
namespace Microsoft.Web.Xdt.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Insert or append to the given attribute
|
||||
/// </summary>
|
||||
public class InsertOrAppendAttribute : Transform
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public InsertOrAppendAttribute()
|
||||
: base(TransformFlags.UseParentAsTargetNode, MissingTargetMessage.Error)
|
||||
{
|
||||
}
|
||||
|
||||
private string _attributeName;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected string AttributeName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_attributeName == null)
|
||||
{
|
||||
_attributeName = GetArgumentValue("Attribute");
|
||||
}
|
||||
return _attributeName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extracts a value from the arguments provided
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetArgumentValue(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
}
|
||||
|
||||
string result = null;
|
||||
if (Arguments != null && Arguments.Count > 0)
|
||||
{
|
||||
foreach (var arg in Arguments)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(arg))
|
||||
{
|
||||
var trimmedArg = arg.Trim();
|
||||
if (trimmedArg.StartsWith(name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var start = arg.IndexOf('\'');
|
||||
var last = arg.LastIndexOf('\'');
|
||||
if (start <= 0 || last <= 0 || last <= start)
|
||||
{
|
||||
throw new ArgumentException("Expected two ['] characters");
|
||||
}
|
||||
|
||||
var value = trimmedArg.Substring(start, last - start);
|
||||
|
||||
// remove any leading or trailing '
|
||||
value = value.Trim().TrimStart('\'').TrimStart('\'');
|
||||
result = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected override void Apply()
|
||||
{
|
||||
if (TargetChildNodes == null || TargetChildNodes.Count == 0)
|
||||
{
|
||||
TargetNode.AppendChild(TransformNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
XmlAttribute transformAtt = null;
|
||||
|
||||
foreach (XmlAttribute att in TransformNode.Attributes)
|
||||
{
|
||||
if (string.Equals(att.Name, AttributeName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
transformAtt = att;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (transformAtt == null)
|
||||
{
|
||||
throw new InvalidOperationException("No target attribute to append");
|
||||
}
|
||||
|
||||
foreach (XmlNode targetNode in TargetChildNodes)
|
||||
{
|
||||
var foundAttribute = false;
|
||||
foreach (XmlAttribute att in targetNode.Attributes)
|
||||
{
|
||||
if (string.Equals(att.Name, AttributeName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
foundAttribute = true;
|
||||
if (string.IsNullOrEmpty(att.Value))
|
||||
{
|
||||
att.Value = transformAtt.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: This doesn't compose well with insertOrAppend being applied on the TargetNode.
|
||||
// The target node is created with the children it has in the transform, which means we would
|
||||
// duplicate the value here.
|
||||
if (att.Value == transformAtt.Value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
att.Value = $"{att.Value};{transformAtt.Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundAttribute)
|
||||
{
|
||||
var attribute = targetNode.OwnerDocument.CreateAttribute(AttributeName);
|
||||
attribute.Value = transformAtt.Value;
|
||||
targetNode.Attributes.Append(attribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"AssemblyIdentity": "Microsoft.Web.Xdt.Extensions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
|
||||
"Types": [
|
||||
{
|
||||
"Name": "Microsoft.Web.Xdt.Extensions.InsertOrAppendAttribute",
|
||||
"Visibility": "Public",
|
||||
"Kind": "Class",
|
||||
"BaseType": "Microsoft.Web.XmlTransform.Transform",
|
||||
"ImplementedInterfaces": [],
|
||||
"Members": [
|
||||
{
|
||||
"Kind": "Method",
|
||||
"Name": "get_AttributeName",
|
||||
"Parameters": [],
|
||||
"ReturnType": "System.String",
|
||||
"Visibility": "Protected",
|
||||
"GenericParameter": []
|
||||
},
|
||||
{
|
||||
"Kind": "Method",
|
||||
"Name": "GetArgumentValue",
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "name",
|
||||
"Type": "System.String"
|
||||
}
|
||||
],
|
||||
"ReturnType": "System.String",
|
||||
"Visibility": "Protected",
|
||||
"GenericParameter": []
|
||||
},
|
||||
{
|
||||
"Kind": "Method",
|
||||
"Name": "Apply",
|
||||
"Parameters": [],
|
||||
"ReturnType": "System.Void",
|
||||
"Virtual": true,
|
||||
"Override": true,
|
||||
"Visibility": "Protected",
|
||||
"GenericParameter": []
|
||||
},
|
||||
{
|
||||
"Kind": "Constructor",
|
||||
"Name": ".ctor",
|
||||
"Parameters": [],
|
||||
"Visibility": "Public",
|
||||
"GenericParameter": []
|
||||
}
|
||||
],
|
||||
"GenericParameters": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<Content Include="applicationHost.xdt" />
|
||||
<Content Include="scmApplicationHost.xdt" />
|
||||
<Content Include="install.cmd" />
|
||||
<Content Include="..\Microsoft.Web.Xdt.Extensions\bin\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
|
||||
<Content Include="$(RepositoryRoot)bin\Microsoft.Web.Xdt.Extensions\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(SharedFxArchitecture)' == 'x86'">
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" ReferenceOutputAssembly="False"/>
|
||||
<ProjectReference Include="..\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" ReferenceOutputAssembly="False"/>
|
||||
<!-- Make sure redist folder is built and ready -->
|
||||
<ProjectReference Include="..\..\Installers\Archive\Archive.Redist.zipproj" PrivateAssets="All" ReferenceOutputAssembly="False" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.AspNetCoreModuleV2" Version="$(PackageVersion)" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="$(MicrosoftAspNetCoreAppPackageVersion)" PrivateAssets="None" />
|
||||
<PackageReference Include="$(HostingStartupPackageName)" Version="$(HostingStartupPackageVersion)" PrivateAssets="None" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -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() { }
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<!--
|
||||
This file is automatically imported by NuGet into a user's project
|
||||
when it targets a single framework, or in classic (pre 2017) csproj projects.
|
||||
-->
|
||||
|
||||
<Project>
|
||||
|
||||
<Target Name="GenerateHostingStartupDeps" Condition="'@(HostingStartupPackageReference->Count())' != '0'" BeforeTargets="_GetPackageFiles" >
|
||||
|
||||
<PropertyGroup>
|
||||
<_TemplatesDirectory>$(MSBuildThisFileDirectory)..\content\</_TemplatesDirectory>
|
||||
<_DepsOutputDirectory>$(IntermediateOutputPath)\se\</_DepsOutputDirectory>
|
||||
<_WorkingDirectory>$(_DepsOutputDirectory)\depswork</_WorkingDirectory>
|
||||
<_BasePackagePath>content\additionaldeps\</_BasePackagePath>
|
||||
<_RuntimeStoreManifestFile>$(_DepsOutputDirectory)\rs.csproj</_RuntimeStoreManifestFile>
|
||||
<_RuntimeStoreOutput>$(_DepsOutputDirectory)\rs\</_RuntimeStoreOutput>
|
||||
<ManifestFileContents>
|
||||
<![CDATA[
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Remove="Internal.AspNetCore.Sdk" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="$(MicrosoftAspNetCoreAppPackageVersion)" IsImplicitlyDefined="true"/>
|
||||
<PackageReference Include="%(HostingStartupPackageReference.Identity)" Version="%(HostingStartupPackageReference.Version)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
]]>
|
||||
</ManifestFileContents>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'@(HostingStartupRuntimeStoreTargets->Count())' == '0'">
|
||||
<HostingStartupRuntimeStoreTargets Include="netcoreapp3.0" Runtime="win7-x64" />
|
||||
<HostingStartupRuntimeStoreTargets Include="netcoreapp3.0" Runtime="win7-x86" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_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)\"
|
||||
/>
|
||||
</ItemGroup>
|
||||
<MakeDir Directories="$(_DepsOutputDirectory)" />
|
||||
|
||||
<!-- Generate runtime store -->
|
||||
<WriteLinesToFile File="$(_RuntimeStoreManifestFile)" Lines="$(ManifestFileContents)" Overwrite="true" Encoding="Unicode"/>
|
||||
|
||||
<MSBuild Projects="$(_RuntimeStoreManifestFile)"
|
||||
Targets="ComposeStore"
|
||||
Properties="TargetFramework=%(HostingStartupRuntimeStoreTargets.Identity);RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion);RuntimeIdentifier=%(HostingStartupRuntimeStoreTargets.Runtime);ComposeDir=$(_RuntimeStoreOutput)\%(HostingStartupRuntimeStoreTargets.Runtime);SkipOptimization=true" />
|
||||
<!-- Generate deps -->
|
||||
<RemoveDir Directories="%(_HostingStartupPackageReference.WorkingDirectory)" />
|
||||
|
||||
<Copy SourceFiles="@(_TemplateFiles)" DestinationFolder="%(_HostingStartupPackageReference.WorkingDirectory)" />
|
||||
|
||||
<MSBuild Projects="%(_HostingStartupPackageReference.Project)"
|
||||
Targets="Restore"
|
||||
Properties="HostingStartupPackageName=%(_HostingStartupPackageReference.Identity);HostingStartupPackageVersion=%(_HostingStartupPackageReference.Version);RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion);MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion);UseAppHost=false;NoBuild=false" />
|
||||
|
||||
<MSBuild Projects="%(_HostingStartupPackageReference.Project)"
|
||||
Targets="Publish"
|
||||
Properties="PublishDir=%(_HostingStartupPackageReference.WorkingDirectory)\p;HostingStartupPackageName=%(_HostingStartupPackageReference.Identity);HostingStartupPackageVersion=%(_HostingStartupPackageReference.Version);RuntimeFrameworkVersion=$(HostingStartupRuntimeFrameworkVersion);MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion);UseAppHost=false;NoBuild=false;IncludeMainProjectInDepsFile=false" />
|
||||
<Copy SourceFiles="%(_HostingStartupPackageReference.DepsFile)" DestinationFiles="%(_HostingStartupPackageReference.TrimmedDepsFile)" />
|
||||
|
||||
<ItemGroup>
|
||||
<_RuntimeStoreFiles Include="$(_RuntimeStoreOutput)\%(HostingStartupRuntimeStoreTargets.Runtime)\**\*.dll" />
|
||||
|
||||
<Content Include="%(_RuntimeStoreFiles.Identity)" PackagePath="content\store\%(RecursiveDir)" />
|
||||
<Content Include="%(_HostingStartupPackageReference.TrimmedDepsFile)" PackagePath="%(_HostingStartupPackageReference.PackagePath)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in New Issue