Browse Source

Deprecate the Microsoft.AspNetCore.App metapackage in favor of targeting and runtime packs (#7832)

* Deprecate the Microsoft.AspNetCore.App metapackage in favor of targeting and runtime packs
* Stop producing Microsoft.AspNetCore.App, and runtime.$(rid).Microsoft.AspNetCore.App
* Generate the shared framework without using 'NuGet' restore
* Stop producing intermediate packages for shared-framework only assemblies
* Put the platform manifest into the targeting pack (data/Microsoft.AspNetCore.App.PlatformManifest.txt)
* Create well-known, shared intermediate directories that installers can use to bundle content
Nate McMaster 7 years ago
parent
commit
e7b00a5508
46 changed files with 431 additions and 1369 deletions
  1. 18 2
      Directory.Build.props
  2. 5 0
      Directory.Build.targets
  3. 1 1
      build/CodeSign.targets
  4. 2 40
      build/SharedFx.targets
  5. 1 0
      build/repo.props
  6. 1 1
      build/repo.targets
  7. 0 55
      build/tasks/GenerateRestoreSourcesPropsFile.cs
  8. 13 1
      build/tasks/GenerateSharedFrameworkDepsFile.cs
  9. 0 154
      build/tasks/GenerateSharedFrameworkMetadataFiles.cs
  10. 0 2
      build/tasks/RepoTasks.tasks
  11. 0 65
      build/tasks/RuntimeGraphManager.cs
  12. 1 1
      docs/ProjectProperties.md
  13. 5 0
      eng/targets/ResolveReferences.targets
  14. 8 7
      src/Framework/Directory.Build.props
  15. 0 121
      src/Framework/pkg/Metapackage.targets
  16. 0 38
      src/Framework/pkg/Microsoft.AspNetCore.App.pkgproj
  17. 0 30
      src/Framework/pkg/Microsoft.AspNetCore.App.targets
  18. 0 0
      src/Framework/pkg/_._
  19. 29 3
      src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj
  20. 156 9
      src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
  21. 0 56
      src/Framework/src/Microsoft.AspNetCore.App.shfxproj
  22. 0 388
      src/Framework/src/SharedFx.targets
  23. 0 0
      src/Framework/src/_._
  24. 0 24
      src/Framework/src/runtime.fx.nuspec
  25. 30 21
      src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj
  26. 25 81
      src/Framework/test/SharedFxTests.cs
  27. 79 0
      src/Framework/test/TargetingPackTests.cs
  28. 1 5
      src/Framework/test/TestData.cs
  29. 0 51
      src/Installers/Archive/Archive.Internal.zipproj
  30. 0 110
      src/Installers/Archive/Archive.Redist.zipproj
  31. 0 2
      src/Installers/Debian/Directory.Build.props
  32. 4 3
      src/Installers/Debian/Directory.Build.targets
  33. 3 20
      src/Installers/Debian/Runtime/Debian.Runtime.debproj
  34. 2 12
      src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj
  35. 22 16
      src/Installers/Debian/tools/build.sh
  36. 0 15
      src/Installers/Directory.Build.props
  37. 3 3
      src/Installers/Rpm/Directory.Build.targets
  38. 3 21
      src/Installers/Rpm/Rpm.Runtime.Common.targets
  39. 1 1
      src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj
  40. 1 0
      src/ProjectTemplates/test/GenerateTestProps.targets
  41. 4 0
      src/ProjectTemplates/test/ProjectTemplates.Tests.csproj
  42. 4 1
      src/ProjectTemplates/test/TemplateTests.props.in
  43. 1 1
      src/SignalR/clients/ts/signalr-protocol-msgpack/package.json
  44. 1 1
      src/SignalR/clients/ts/signalr/package.json
  45. 2 5
      src/SiteExtensions/LoggingBranch/LoggingBranch.csproj
  46. 5 2
      src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj

+ 18 - 2
Directory.Build.props

@@ -30,6 +30,15 @@
 
     <SharedFxProductName>$(Product) $(PackageVersion) Shared Framework</SharedFxProductName>
     <SharedFxDescription>Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub ($(RepositoryUrl)). We happily accept issues and PRs.</SharedFxDescription>
+
+    <RuntimeInstallerBaseName>aspnetcore-runtime</RuntimeInstallerBaseName>
+    <TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
+    <!--
+      Archives and installers using this prefix are intended for internal-use only.
+      For example, this .zip is used to handoff bits to partner teams who then incorporate our shared frameworks
+      into their own installers.
+    -->
+    <InternalInstallerBaseName>$(RuntimeInstallerBaseName)-internal</InternalInstallerBaseName>
   </PropertyGroup>
 
   <!-- Warnings and errors -->
@@ -61,7 +70,7 @@
     <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
 
     <!-- These project types are disabled because the presence of a PackageReference causes issues for NuGet. -->
-    <DisableSourceLink Condition="'$(MSBuildProjectExtension)' == '.zipproj' OR '$(MSBuildProjectExtension)' == '.debproj' OR '$(MSBuildProjectExtension)' == '.rpmproj'">true</DisableSourceLink>
+    <DisableSourceLink Condition="'$(MSBuildProjectExtension)' == '.debproj' OR '$(MSBuildProjectExtension)' == '.rpmproj'">true</DisableSourceLink>
   </PropertyGroup>
 
   <ItemGroup Condition="'$(DisableSourceLink)' != 'true'">
@@ -94,7 +103,7 @@
     </SupportedRuntimeIdentifiers>
 
     <!-- Make error messages clickable in VS Code's console -->
-    <GenerateFullPaths Condition="'$(VSCODE_PID)' != ''">true</GenerateFullPaths>
+    <GenerateFullPaths Condition="'$(VSCODE_CWD)' != '' OR '$(TERM_PROGRAM)' == 'vscode'">true</GenerateFullPaths>
 
     <!-- Suppress the message about using a preview version of .NET Core SDK. We are okay with this and don't need the warning. -->
     <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
@@ -179,6 +188,13 @@
     <BuildIisNativeProjects Condition="'$(BuildNative)' != 'false' AND '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64')">true</BuildIisNativeProjects>
     <!-- This property is shared by several projects to layout the AspNetCore.App targeting pack for installers -->
     <TargetingPackLayoutRoot>$(ArtifactsObjDir)TargetingPack.Layout\$(Configuration)\</TargetingPackLayoutRoot>
+    <!-- This property is shared by several projects to layout the AspNetCore.App shared framework for installers -->
+    <SharedFrameworkLayoutRoot>$(ArtifactsObjDir)SharedFx.Layout\$(Configuration)\$(TargetRuntimeIdentifier)\</SharedFrameworkLayoutRoot>
+    <!-- This property points to a folder which includes both Microsoft.NETCore.App and AspNetCore.App. -->
+    <RedistSharedFrameworkLayoutRoot>$(ArtifactsObjDir)RedistSharedFx.Layout\$(Configuration)\$(TargetRuntimeIdentifier)\</RedistSharedFrameworkLayoutRoot>
+
+    <ArchiveExtension>.tar.gz</ArchiveExtension>
+    <ArchiveExtension Condition="'$(TargetOsName)' == 'win'">.zip</ArchiveExtension>
   </PropertyGroup>
 
   <Import Project="eng\Workarounds.props" />

+ 5 - 0
Directory.Build.targets

@@ -8,6 +8,11 @@
     -->
     <IsShippingPackage Condition=" '$(IsShippingPackage)' == '' ">false</IsShippingPackage>
 
+    <!--
+      By default, assemblies which are only in the Microsoft.AspNetCore.App shared framework are not available as NuGet packages.
+    -->
+    <IsPackable Condition="'$(IsAspNetCoreApp)' == 'true' AND '$(IsShippingPackage)' != 'true'">false</IsPackable>
+
     <PackageOutputPath Condition=" '$(IsShippingPackage)' == 'true' ">$(ArtifactsShippingPackagesDir)</PackageOutputPath>
     <PackageOutputPath Condition=" '$(IsShippingPackage)' != 'true' ">$(ArtifactsNonShippingPackagesDir)</PackageOutputPath>
 

+ 1 - 1
build/CodeSign.targets

@@ -15,7 +15,7 @@
 
   <Target Name="CollectFileSignInfo">
     <PropertyGroup>
-      <BaseRedistNetCorePath>$(ArtifactsDir)obj\ar\</BaseRedistNetCorePath>
+      <BaseRedistNetCorePath>$(ArtifactsDir)obj\RedistSharedFx.Layout\$(Configuration)\</BaseRedistNetCorePath>
       <RedistNetCorePath>$(BaseRedistNetCorePath)$(TargetRuntimeIdentifier)\</RedistNetCorePath>
     </PropertyGroup>
 

+ 2 - 40
build/SharedFx.targets

@@ -1,17 +1,10 @@
 <Project>
   <PropertyGroup>
-    <UnitTestFxProject>$(RepositoryRoot)src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj</UnitTestFxProject>
-    <UnitTestFxProject>$([MSBuild]::NormalizePath($(UnitTestFxProject)))</UnitTestFxProject>
-    <BuildSharedFxDependsOn>_BuildSharedFxProjects;TestSharedFx</BuildSharedFxDependsOn>
+    <BuildSharedFxDependsOn>_BuildSharedFxProjects;RemoveSharedFrameworkOnlyRefsFromNuspec</BuildSharedFxDependsOn>
     <BuildSharedFxDependsOn Condition="'$(TestOnly)' != 'true'">$(BuildSharedFxDependsOn);CodeSign</BuildSharedFxDependsOn>
   </PropertyGroup>
 
   <ItemGroup>
-    <FxProjectToBuild Include="$(RepositoryRoot)src\Framework\**\*.pkgproj" />
-    <FxProjectToBuild Include="$(RepositoryRoot)src\Framework\**\*.shfxproj" />
-    <FxProjectToBuild Include="$(UnitTestFxProject)" />
-    <FxProjectToBuild Condition=" '$(BuildRuntimeArchive)' != 'false' " Include="$(RepositoryRoot)src\Installers\Archive\*.*proj" />
-
     <FxProjectToBuild Condition=" '$(TargetRuntimeIdentifier)' == 'linux-x64' AND '$(LinuxInstallerType)' == 'deb' " Include="$(RepositoryRoot)src\Installers\Debian\**\*.*proj" />
     <FxProjectToBuild Condition=" '$(TargetRuntimeIdentifier)' == 'linux-x64' AND '$(LinuxInstallerType)' == 'rpm' " Include="$(RepositoryRoot)src\Installers\Rpm\**\*.*proj" />
 
@@ -21,7 +14,7 @@
 
   <Target Name="BuildSharedFx" DependsOnTargets="$(BuildSharedFxDependsOn)" />
 
-  <Target Name="_BuildSharedFxProjects">
+  <Target Name="_BuildSharedFxProjects" Condition="@(FxProjectToBuild->Count()) != 0">
 
     <PropertyGroup>
       <_RestoreGraphProjectInput>@(FxProjectToBuild)</_RestoreGraphProjectInput>
@@ -42,35 +35,4 @@
              SkipNonexistentTargets="true" />
   </Target>
 
-  <Target Name="TestSharedFx" DependsOnTargets="InstallDotNet">
-
-    <PropertyGroup>
-      <!-- The file path to the log file, from within the container -->
-      <UnitTestFxTrxLogFile>$(LogOutputDir)SharedFx-UnitTests-$(PackageVersion)-$(TargetRuntimeIdentifier).trx</UnitTestFxTrxLogFile>
-      <!-- The trx file path from the perspective of the TeamCity agent -->
-      <UnitTestFxTrxPhysicalFilePath>$(UnitTestFxTrxLogFile)</UnitTestFxTrxPhysicalFilePath>
-      <UnitTestFxTrxPhysicalFilePath Condition="'$(HostMachineRepositoryRoot)' != ''">$(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx</UnitTestFxTrxPhysicalFilePath>
-    </PropertyGroup>
-
-    <MSBuild Projects="$(UnitTestFxProject)" Targets="GetTargetPath" Properties="$(BuildProperties)">
-      <Output TaskParameter="TargetOutputs" ItemName="SharedFxTestAssembly" />
-    </MSBuild>
-
-    <RunDotNet
-      IgnoreStandardErrorWarningFormat="true"
-      IgnoreExitCode="true"
-      Arguments="vstest;
-      --Framework:%(TargetFrameworkIdentifier),Version=v%(TargetFrameworkVersion);
-      --Logger:$([MSBuild]::Escape('trx;LogFileName=$(UnitTestFxTrxLogFile)'));
-      %(SharedFxTestAssembly.Identity);
-      --;RunConfiguration.NoAutoReporters=true">
-      <Output TaskParameter="ExitCode" PropertyName="VsTestExitCode" />
-    </RunDotNet>
-
-    <Message Text="##teamcity[importData type='vstest' path='$(UnitTestFxTrxPhysicalFilePath)']"
-      Importance="High"
-      Condition="'$(TEAMCITY_VERSION)' != '' AND Exists('$(UnitTestFxTrxLogFile)')" />
-    <Error Text="SharedFx.UnitTests failed with exit code '$(VsTestExitCode)'." Condition=" $(VsTestExitCode) != 0 " />
-  </Target>
-
 </Project>

+ 1 - 0
build/repo.props

@@ -147,6 +147,7 @@
         <DotNetProjects Include="
                           $(RepositoryRoot)src\Framework\ref\Microsoft.AspNetCore.App.Ref.csproj;
                           $(RepositoryRoot)src\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj;
+                          $(RepositoryRoot)src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj;
                           $(RepositoryRoot)src\DefaultBuilder\**\*.*proj;
                           $(RepositoryRoot)src\Features\JsonPatch\**\*.*proj;
                           $(RepositoryRoot)src\DataProtection\**\*.*proj;

+ 1 - 1
build/repo.targets

@@ -24,7 +24,7 @@
     <CompileDependsOn>$(CompileDependsOn);BuildProjects</CompileDependsOn>
 
     <PackageDependsOn>$(PackageDependsOn);PackProjects</PackageDependsOn>
-    <PackageDependsOn Condition=" '$(BuildAllProjects)' == 'true' ">$(PackageDependsOn);BuildSharedFx;RemoveSharedFrameworkOnlyRefsFromNuspec</PackageDependsOn>
+    <PackageDependsOn Condition=" '$(BuildAllProjects)' == 'true' ">$(PackageDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec;BuildSharedFx</PackageDependsOn>
 
     <TestDependsOn />
     <TestDependsOn Condition=" '$(_RunBuild)' == 'true' ">$(TestDependsOn);Compile</TestDependsOn>

+ 0 - 55
build/tasks/GenerateRestoreSourcesPropsFile.cs

@@ -1,55 +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.Linq;
-using System.IO;
-using System.Text;
-using System.Xml;
-using System.Xml.Linq;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace RepoTasks
-{
-    public class GenerateRestoreSourcesPropsFile : Task
-    {
-        [Required]
-        public ITaskItem[] Sources { get; set; }
-
-        [Required]
-        public string OutputPath { get; set; }
-
-        public override bool Execute()
-        {
-            OutputPath = OutputPath.Replace('\\', '/');
-            Directory.CreateDirectory(Path.GetDirectoryName(OutputPath));
-
-            var sources = new XElement("DotNetRestoreSources");
-            var propertyGroup = new XElement("PropertyGroup", sources);
-            var doc = new XDocument(new XElement("Project", propertyGroup));
-
-            propertyGroup.Add(new XElement("MSBuildAllProjects", "$(MSBuildAllProjects);$(MSBuildThisFileFullPath)"));
-
-            var sb = new StringBuilder();
-
-            foreach (var source in Sources)
-            {
-                sb.Append(source.ItemSpec).AppendLine(";");
-            }
-
-            sources.SetValue(sb.ToString());
-
-            var settings = new XmlWriterSettings
-            {
-                OmitXmlDeclaration = true,
-            };
-            using (var writer = XmlWriter.Create(OutputPath, settings))
-            {
-                Log.LogMessage(MessageImportance.Normal, $"Generate {OutputPath}");
-                doc.Save(writer);
-            }
-            return !Log.HasLoggedErrors;
-        }
-    }
-}

+ 13 - 1
build/tasks/GenerateSharedFrameworkDepsFile.cs

@@ -7,11 +7,11 @@ using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Reflection;
+using System.Text;
 using Microsoft.Build.Framework;
 using Microsoft.Build.Utilities;
 using Microsoft.DotNet.Build.Tasks;
 using Microsoft.Extensions.DependencyModel;
-using RepoTasks.Utilities;
 
 namespace RepoTasks
 {
@@ -38,6 +38,9 @@ namespace RepoTasks
         [Required]
         public string RuntimePackageName { get; set; }
 
+        [Required]
+        public string PlatformManifestOutputPath { get; set; }
+
         public override bool Execute()
         {
             ExecuteCore();
@@ -51,6 +54,7 @@ namespace RepoTasks
             var runtimeFiles = new List<RuntimeFile>();
             var nativeFiles = new List<RuntimeFile>();
             var resourceAssemblies = new List<ResourceAssembly>();
+            var platformManifest = new List<string>();
 
             foreach (var reference in References)
             {
@@ -62,6 +66,7 @@ namespace RepoTasks
                 {
                     var nativeFile = new RuntimeFile(fileName, null, fileVersion);
                     nativeFiles.Add(nativeFile);
+                    platformManifest.Add($"{fileName}|{FrameworkName}||{fileVersion}");
                 }
                 else
                 {
@@ -69,6 +74,7 @@ namespace RepoTasks
                         fileVersion: fileVersion,
                         assemblyVersion: assemblyVersion.ToString());
                     runtimeFiles.Add(runtimeFile);
+                    platformManifest.Add($"{fileName}|{FrameworkName}|{assemblyVersion}|{fileVersion}");
                 }
             }
 
@@ -91,6 +97,12 @@ namespace RepoTasks
                 Enumerable.Empty<RuntimeFallbacks>());
 
             Directory.CreateDirectory(Path.GetDirectoryName(DepsFilePath));
+            Directory.CreateDirectory(Path.GetDirectoryName(PlatformManifestOutputPath));
+
+            File.WriteAllText(
+                PlatformManifestOutputPath,
+                string.Join("\n", platformManifest.OrderBy(n => n)),
+                Encoding.UTF8);
 
             try
             {

+ 0 - 154
build/tasks/GenerateSharedFrameworkMetadataFiles.cs

@@ -1,154 +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.Collections.Generic;
-using System.IO;
-using System.Linq;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using Microsoft.Extensions.DependencyModel;
-using NuGet.Common;
-using NuGet.ProjectModel;
-using RepoTasks.Utilities;
-
-namespace RepoTasks
-{
-    public class GenerateSharedFrameworkMetadataFiles : Task
-    {
-        [Required]
-        public string AssetsFilePath { get; set; }
-
-        [Required]
-        public string DepsFilePath { get; set; }
-
-        [Required]
-        public string DepsFileOutputPath { get; set; }
-
-        [Required]
-        public string TargetFramework { get; set; }
-
-        [Required]
-        public string FrameworkName { get; set; }
-
-        [Required]
-        public string FrameworkVersion { get; set; }
-
-        [Required]
-        public string BaseRuntimeIdentifier { get; set; }
-
-        [Required]
-        public string PlatformManifestOutputPath { get; set; }
-
-        public override bool Execute()
-        {
-            ExecuteCore();
-
-            return !Log.HasLoggedErrors;
-        }
-
-        private void ExecuteCore()
-        {
-            DependencyContext context;
-            using (var depsStream = File.OpenRead(DepsFilePath))
-            {
-                context = new DependencyContextJsonReader().Read(depsStream);
-            }
-
-            var lockFile = LockFileUtilities.GetLockFile(AssetsFilePath, NullLogger.Instance);
-            if (lockFile == null)
-            {
-                throw new ArgumentException($"Could not load a LockFile at '{AssetsFilePath}'.", nameof(AssetsFilePath));
-            }
-
-            var manager = new RuntimeGraphManager();
-            var graph = manager.Collect(lockFile);
-            var expandedGraph = manager.Expand(graph, BaseRuntimeIdentifier);
-
-            var runtimeFiles = new List<RuntimeFile>();
-            var nativeFiles = new List<RuntimeFile>();
-            var resourceAssemblies = new List<ResourceAssembly>();
-            var platformManifest = new List<string>();
-
-            foreach (var library in context.RuntimeLibraries)
-            {
-                foreach (var file in library.RuntimeAssemblyGroups.SelectMany(g => g.RuntimeFiles))
-                {
-                    var fileName = Path.GetFileName(file.Path);
-                    var path = $"runtimes/{context.Target.Runtime}/lib/{TargetFramework}/{fileName}";
-                    runtimeFiles.Add(
-                        new RuntimeFile(
-                            path,
-                            file.AssemblyVersion,
-                            file.FileVersion));
-
-                    platformManifest.Add($"{fileName}|{FrameworkName}|{file.AssemblyVersion}|{file.FileVersion}");
-                }
-
-                foreach (var file in library.NativeLibraryGroups.SelectMany(g => g.RuntimeFiles))
-                {
-                    var fileName = Path.GetFileName(file.Path);
-                    var path = $"runtimes/{context.Target.Runtime}/native/{fileName}";
-                    nativeFiles.Add(
-                        new RuntimeFile(
-                            path,
-                            file.AssemblyVersion,
-                            file.FileVersion));
-
-                    if (!Version.TryParse(file.FileVersion, out var fileVersion))
-                    {
-                        fileVersion = new Version(0, 0, 0, 0);
-                    }
-                    platformManifest.Add($"{fileName}|{FrameworkName}||{fileVersion}");
-                }
-
-                resourceAssemblies.AddRange(
-                    library.ResourceAssemblies);
-            }
-
-            var runtimePackageName = $"runtime.{context.Target.Runtime}.{FrameworkName}";
-
-            var runtimeLibrary = new RuntimeLibrary("package",
-                runtimePackageName,
-                FrameworkVersion,
-                string.Empty,
-                new[] { new RuntimeAssetGroup(string.Empty, runtimeFiles) },
-                new[] { new RuntimeAssetGroup(string.Empty, nativeFiles) },
-                resourceAssemblies,
-                Array.Empty<Dependency>(),
-                hashPath: null,
-                path: $"{runtimePackageName.ToLowerInvariant()}/{FrameworkVersion}",
-                serviceable: true);
-
-            var targetingPackLibrary = new RuntimeLibrary("package",
-                FrameworkName,
-                FrameworkVersion,
-                string.Empty,
-                Array.Empty<RuntimeAssetGroup>(),
-                Array.Empty<RuntimeAssetGroup>(),
-                resourceAssemblies,
-                new[] { new Dependency(runtimeLibrary.Name, runtimeLibrary.Version) },
-                hashPath: null,
-                path: $"{FrameworkName.ToLowerInvariant()}/{FrameworkVersion}",
-                serviceable: true);
-
-            context = new DependencyContext(
-                context.Target,
-                CompilationOptions.Default,
-                Array.Empty<CompilationLibrary>(),
-                new[] { targetingPackLibrary, runtimeLibrary },
-                expandedGraph
-                );
-
-            Directory.CreateDirectory(Path.GetDirectoryName(PlatformManifestOutputPath));
-            Directory.CreateDirectory(Path.GetDirectoryName(DepsFileOutputPath));
-
-            File.WriteAllLines(PlatformManifestOutputPath, platformManifest.OrderBy(n => n));
-
-            using (var depsStream = File.Create(DepsFileOutputPath))
-            {
-                new DependencyContextWriter().Write(context, depsStream);
-            }
-        }
-    }
-}

+ 0 - 2
build/tasks/RepoTasks.tasks

@@ -3,10 +3,8 @@
     <_RepoTaskAssembly>$(MSBuildThisFileDirectory)bin\publish\RepoTasks.dll</_RepoTaskAssembly>
   </PropertyGroup>
 
-  <UsingTask TaskName="RepoTasks.GenerateRestoreSourcesPropsFile" AssemblyFile="$(_RepoTaskAssembly)" />
   <UsingTask TaskName="RepoTasks.GenerateGuid" AssemblyFile="$(_RepoTaskAssembly)" />
   <UsingTask TaskName="RepoTasks.GetMsiProperty" AssemblyFile="$(_RepoTaskAssembly)" />
   <UsingTask TaskName="RepoTasks.GenerateSharedFrameworkDepsFile" AssemblyFile="$(_RepoTaskAssembly)" />
-  <UsingTask TaskName="RepoTasks.GenerateSharedFrameworkMetadataFiles" AssemblyFile="$(_RepoTaskAssembly)" />
   <UsingTask TaskName="RepoTasks.RemoveSharedFrameworkDependencies" AssemblyFile="$(_RepoTaskAssembly)" />
 </Project>

+ 0 - 65
build/tasks/RuntimeGraphManager.cs

@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-// Sourced from  https://github.com/dotnet/core-setup/tree/be8d8e3486b2bf598ed69d39b1629a24caaba45e/tools-local/tasks, needs to be kept in sync
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using Microsoft.Extensions.DependencyModel;
-using NuGet.Packaging;
-using NuGet.ProjectModel;
-using NuGet.RuntimeModel;
-
-namespace RepoTasks.Utilities
-{
-    internal class RuntimeGraphManager
-    {
-        private const string RuntimeJsonFileName = "runtime.json";
-
-        public RuntimeGraph Collect(LockFile lockFile)
-        {
-            string userPackageFolder = lockFile.PackageFolders.FirstOrDefault()?.Path;
-            var fallBackFolders = lockFile.PackageFolders.Skip(1).Select(f => f.Path);
-            var packageResolver = new FallbackPackagePathResolver(userPackageFolder, fallBackFolders);
-
-            var graph = RuntimeGraph.Empty;
-            foreach (var library in lockFile.Libraries)
-            {
-                if (string.Equals(library.Type, "package", StringComparison.OrdinalIgnoreCase))
-                {
-                    var runtimeJson = library.Files.FirstOrDefault(f => f == RuntimeJsonFileName);
-                    if (runtimeJson != null)
-                    {
-                        var libraryPath = packageResolver.GetPackageDirectory(library.Name, library.Version);
-                        var runtimeJsonFullName = Path.Combine(libraryPath, runtimeJson);
-                        graph = RuntimeGraph.Merge(graph, JsonRuntimeFormat.ReadRuntimeGraph(runtimeJsonFullName));
-                    }
-                }
-            }
-            return graph;
-        }
-
-        public IEnumerable<RuntimeFallbacks> Expand(RuntimeGraph runtimeGraph, string runtime)
-        {
-            var importers = FindImporters(runtimeGraph, runtime);
-            foreach (var importer in importers)
-            {
-                // ExpandRuntime return runtime itself as first item so we are skiping it
-                yield return new RuntimeFallbacks(importer, runtimeGraph.ExpandRuntime(importer).Skip(1));
-            }
-        }
-
-        private IEnumerable<string> FindImporters(RuntimeGraph runtimeGraph, string runtime)
-        {
-            foreach (var runtimePair in runtimeGraph.Runtimes)
-            {
-                var expanded = runtimeGraph.ExpandRuntime(runtimePair.Key);
-                if (expanded.Contains(runtime))
-                {
-                    yield return runtimePair.Key;
-                }
-            }
-        }
-    }
-}

+ 1 - 1
docs/ProjectProperties.md

@@ -6,4 +6,4 @@ In addition to the standard set of MSBuild properties supported by Microsoft.NET
 Property name      | Meaning
 -------------------|--------------------------------------------------------------------------------------------
 IsShippingPackage  | When set to `true`, the package produced by from project is intended for use by customers. Defaults to  `false`, which means the package is intended for internal use only by Microsoft teams.
-IsAspNetCoreApp    | Set to `true` when the assembly is part of the [Microsoft.AspNetCore.App shared framework](./SharedFramework.md)
+IsAspNetCoreApp    | Set to `true` when the assembly is part of the [Microsoft.AspNetCore.App shared framework](./SharedFramework.md) and is not available as a NuGet package (unless IsShippingPackage is also set to `true`).

+ 5 - 0
eng/targets/ResolveReferences.targets

@@ -126,6 +126,11 @@
            Text="Cannot reference &quot;%(_InvalidReferenceToNonSharedFxAssembly.Identity)&quot;. This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />
   </Target>
 
+  <Target Name="_WarnAboutRedundantRef" AfterTargets="ResolveFrameworkReferences">
+    <Warning Condition="@(FrameworkReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore.App')->Count()) &gt; 1"
+             Text="Redundant &lt;FrameworkReference&gt;. If you have an explicit item in the project file, you might be able to remove it. Some SDKs, like Microsoft.NET.Sdk.Web, add this implicitly." />
+  </Target>
+
   <!--
     This target resolves remaining Referene items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
     This executes on NuGet restore and during DesignTimeBuild. It should not run in the outer, cross-targeting build.

+ 8 - 7
src/Framework/Directory.Build.props

@@ -1,13 +1,14 @@
-
 <Project>
+  <PropertyGroup>
+    <OutputInRepoRoot>true</OutputInRepoRoot>
+  </PropertyGroup>
+
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
 
   <PropertyGroup>
-    <!-- Temporary - some projects in this folder require a restore target against just-built packages. -->
-    <RestoreSources Condition="'$(_DisableRestoreFromLocalPackages)' != 'true'">
-      $(RestoreSources);
-      $(ArtifactsShippingPackagesDir);
-      $(ArtifactsNonShippingPackagesDir)
-    </RestoreSources>
+    <!-- Shared between targeting pack and runtime build. -->
+    <PlatformManifestFileName>Microsoft.AspNetCore.App.PlatformManifest.txt</PlatformManifestFileName>
+    <PlatformManifestOutputPath>$(ArtifactsObjDir)$(PlatformManifestFileName)</PlatformManifestOutputPath>
   </PropertyGroup>
+
 </Project>

+ 0 - 121
src/Framework/pkg/Metapackage.targets

@@ -1,121 +0,0 @@
-<Project>
-  <PropertyGroup>
-    <!-- There is no build output -->
-    <IncludeBuildOutput>false</IncludeBuildOutput>
-    <!-- There are no symbols. -->
-    <IncludeSymbols>false</IncludeSymbols>
-    <!-- There is no API to check -->
-    <EnableApiCheck>false</EnableApiCheck>
-    <!-- The only build output of a pkgproj is the project -->
-    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
-
-    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
-
-    <!-- Do not include dependencies in the genreate nuspec. -->
-    <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
-
-    <PackageId>$(MSBuildProjectName)</PackageId>
-    <TargetPath>$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg</TargetPath>
-
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Content Include="$(IntermediateOutputPath)runtime.json" PackagePath="\" />
-
-    <!-- Add version metadata. These are expected to match the metapackage version. -->
-    <AspNetCoreAppReferenceAndPackage Update="@(AspNetCoreAppReferenceAndPackage)" Version="$(SharedFxVersion)" />
-    <AspNetCoreAppReference Update="@(AspNetCoreAppReference)" Version="$(SharedFxVersion)" />
-
-    <!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
-    <PackageReference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)" />
-  </ItemGroup>
-
-  <ItemDefinitionGroup>
-    <TargetPathWithTargetPlatformMoniker>
-      <PackageId>$(PackageId)</PackageId>
-    </TargetPathWithTargetPlatformMoniker>
-  </ItemDefinitionGroup>
-
-  <Target Name="PrepareOutputPaths">
-    <MakeDir Directories="$(IntermediateOutputPath)" />
-  </Target>
-
-  <Target Name="GenerateRuntimeJson" BeforeTargets="BeforeBuild" DependsOnTargets="PrepareOutputPaths">
-    <ItemGroup>
-      <_SupportedRids Include="$(SupportedRuntimeIdentifiers)" />
-    </ItemGroup>
-
-    <PropertyGroup>
-      <!--
-        It's important to be careful about special characters in this property.
-          $  = %24
-          ;  = %3B
-          \n = %0A
-      -->
-      <RuntimeJsonFileContent>
-{
-  "runtimes": {
-    @(_SupportedRids->'"%(Identity)": { "$(PackageId)": { "runtime.%(Identity).$(PackageId)": "$(PackageVersion)" } }', ',%0A    ')
-  }
-}
-      </RuntimeJsonFileContent>
-    </PropertyGroup>
-
-    <WriteLinesToFile Lines="$(RuntimeJsonFileContent)" File="$(IntermediateOutputPath)runtime.json" Overwrite="true" />
-  </Target>
-
-  <Target Name="GenerateBuildProps" BeforeTargets="BeforeBuild" DependsOnTargets="PrepareOutputPaths">
-
-    <ItemGroup>
-      <_AspNetAppPackageConflictOverrides Include="@(AspNetCoreAppReference->'%(Identity)|%(Version)')" Condition=" '%(AspNetCoreAppReference.Version)' != '' " />
-      <_AspNetAppPackageConflictOverrides Include="@(AspNetCoreAppReferenceAndPackage->'%(Identity)|%(Version)')" Condition=" '%(AspNetCoreAppReferenceAndPackage.Version)' != '' " />
-      <_AspNetAppPackageConflictOverrides Include="@(ExternalAspNetCoreAppReference->'%(Identity)|%(Version)')" Condition=" '%(ExternalAspNetCoreAppReference.Version)' != '' " />
-    </ItemGroup>
-
-    <PropertyGroup>
-      <!--
-        It's important to be careful about special characters in this property.
-          $  = %24
-          ;  = %3B
-          \n = %0A
-      -->
-      <BuildPropsContent>
-<![CDATA[
-<Project>
-  <ItemGroup Condition="'%24(RuntimeIdentifier)' == '' or '%24(SelfContained)' != 'true'">
-    <PackageConflictPlatformManifests Include="%24(MSBuildThisFileDirectory)Microsoft.AspNetCore.App.PlatformManifest.txt" />
-  </ItemGroup>
-
-  <ItemGroup Condition="'%24(DisableDefaultPackageConflictOverrides)' != 'true'">
-    <PackageConflictOverrides Include="Microsoft.AspNetCore.App">
-      <OverriddenPackages>
-        @(_AspNetAppPackageConflictOverrides, '%3B%0A        ')%3B
-      </OverriddenPackages>
-    </PackageConflictOverrides>
-  </ItemGroup>
-</Project>
-]]>
-      </BuildPropsContent>
-    </PropertyGroup>
-
-    <WriteLinesToFile Lines="$(BuildPropsContent)" File="$(IntermediateOutputPath)Microsoft.AspNetCore.App.props" Overwrite="true" />
-  </Target>
-
-  <Target Name="ResolveReferenceItemsForPackage" DependsOnTargets="ResolveReferences" BeforeTargets="_GetPackageFiles">
-    <ItemGroup>
-      <Content Include="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)' != 'Microsoft.NETCore.App'">
-        <PackagePath>ref/$(TargetFramework)/%(ReferencePath.FileName)%(ReferencePath.Extension)</PackagePath>
-      </Content>
-      <Content Include="%(_ResolvedFxProjects.ManifestOutputDir)\Microsoft.AspNetCore.App.PlatformManifest.txt">
-        <PackagePath>build/$(TargetFramework)/Microsoft.AspNetCore.App.PlatformManifest.txt</PackagePath>
-      </Content>
-      <Content Include="$(IntermediateOutputPath)Microsoft.AspNetCore.App.props">
-        <PackagePath>build/$(TargetFramework)/Microsoft.AspNetCore.App.props</PackagePath>
-      </Content>
-    </ItemGroup>
-  </Target>
-
-  <Target Name="CopyFilesToOutputDirectory" />
-  <Target Name="CoreCompile" DependsOnTargets="ResolveReferenceItemsForPackage" />
-  <Target Name="CreateManifestResourceNames" />
-</Project>

+ 0 - 38
src/Framework/pkg/Microsoft.AspNetCore.App.pkgproj

@@ -1,38 +0,0 @@
-<Project>
-  <PropertyGroup>
-    <OutputInRepoRoot>true</OutputInRepoRoot>
-    <OutDirName>$(MSBuildProjectName).Pkg</OutDirName>
-
-    <!-- Don't add TFM to the project output path of shared framework projects -->
-    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
-  </PropertyGroup>
-
-  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-
-  <PropertyGroup>
-    <TargetFramework>netcoreapp3.0</TargetFramework>
-    <PackageTags>aspnetcore</PackageTags>
-    <IsPackable>true</IsPackable>
-    <PackageDescription>Provides a default set of APIs for building an ASP.NET Core application.
-
-This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
-    </PackageDescription>
-    <IsShippingPackage>true</IsShippingPackage>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Content Include="$(MSBuildProjectName).targets" PackagePath="build\$(TargetFramework)\" />
-    <Content Include="_._" PackagePath="lib\$(TargetFramework)\" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\src\Microsoft.AspNetCore.App.shfxproj">
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
-      <OutputItemType>_ResolvedFxProjects</OutputItemType>
-    </ProjectReference>
-  </ItemGroup>
-
-  <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-  <Import Project="Metapackage.targets" />
-</Project>

+ 0 - 30
src/Framework/pkg/Microsoft.AspNetCore.App.targets

@@ -1,30 +0,0 @@
-<Project>
-  <Target Name="EnsureTFMCompatibility" BeforeTargets="_CheckForInvalidConfigurationAndPlatform">
-    <Error
-      Text="This version of Microsoft.AspNetCore.App is only compatible with the netcoreapp3.0 target framework. Please target netcoreapp3.0 or choose a version of Microsoft.AspNetCore.App compatible with $(TargetFramework)."
-      Condition="'$(TargetFramework)' != 'netcoreapp3.0'"/>
-  </Target>
-
-  <!--
-    Adds metadata so the SDK will generate the UserSecretsIdAttribute.
-
-    If GeneratedUserSecretsAttributeFile is set, that means Microsoft.Extensions.Configuration.UserSecrets 2.1
-    or earlier was referenced as a package. This didn't use the AssemblyAttribute item group, so we cannot
-    avoid duplicate AssemblyAttribute items without skipping this target altogether..
-  -->
-  <Target Name="_GetUserSecretsAssemblyAttribute"
-          BeforeTargets="GetAssemblyAttributes"
-          Condition=" '$(UserSecretsId)' != '' AND '$(GenerateUserSecretsAttribute)' != 'false' AND '$(GeneratedUserSecretsAttributeFile)' == '' ">
-
-    <!--
-      If the Microsoft.Extensions.Configuration.UserSecrets package 2.2 or higher is referenced directly,
-      it will also add an AssemblyAttribute item. Since this attribute only allows one per assembly, do not
-      duplicate the item.
-    -->
-     <ItemGroup Condition=" @(AssemblyAttribute->WithMetadataValue('Identity', 'Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute')->Count()) == 0 ">
-      <AssemblyAttribute Include="Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute">
-        <_Parameter1>$(UserSecretsId.Trim())</_Parameter1>
-      </AssemblyAttribute>
-    </ItemGroup>
-  </Target>
-</Project>

+ 0 - 0
src/Framework/pkg/_._


+ 29 - 3
src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

@@ -25,7 +25,10 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <PackageType>DotnetPlatform</PackageType>
     <RefAssemblyPackagePath>ref/$(TargetFramework)/</RefAssemblyPackagePath>
 
-    <LayoutTargetDir>$(TargetingPackLayoutRoot)packs/Microsoft.AspNetCore.App.Ref/$(PackageVersion)/</LayoutTargetDir>
+    <TargetingPackSubPath>packs\Microsoft.AspNetCore.App.Ref\$(PackageVersion)\</TargetingPackSubPath>
+    <LayoutTargetDir>$(TargetingPackLayoutRoot)$(TargetingPackSubPath)</LayoutTargetDir>
+    <LocalInstallationOutputPath>$(LocalDotNetRoot)$(TargetingPackSubPath)</LocalInstallationOutputPath>
+
     <ArchiveOutputFileName Condition="'$(TargetRuntimeIdentifier)' == 'win-x64'">aspnetcore-targeting-pack-$(PackageVersion).zip</ArchiveOutputFileName>
     <ArchiveOutputFileName Condition="'$(TargetRuntimeIdentifier)' == 'linux-x64'">aspnetcore-targeting-pack-$(PackageVersion).tar.gz</ArchiveOutputFileName>
     <ArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName)</ArchiveOutputPath>
@@ -45,7 +48,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <IsProjectReferenceProvider>false</IsProjectReferenceProvider>
 
     <PackageConflictManifestFileName>PackageOverrides.txt</PackageConflictManifestFileName>
-    <PackageConflictManifestPackagePath>data/</PackageConflictManifestPackagePath>
+    <ManifestsPackagePath>data/</ManifestsPackagePath>
 
     <!-- Reference implementation assemblies in addition to ref assemblies to get xml docs -->
     <ReferenceImplementationAssemblies>true</ReferenceImplementationAssemblies>
@@ -54,6 +57,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
   <ItemGroup>
     <!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
     <Reference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)" />
+
+    <!-- Enforce build order. Targeting pack needs to bundle information about the runtime. -->
+    <ProjectReference Include="..\src\Microsoft.AspNetCore.App.Runtime.csproj">
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
+    </ProjectReference>
   </ItemGroup>
 
   <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
@@ -65,6 +74,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
       GeneratePackageConflictManifest;
       _ResolveTargetingPackContent;
       _BatchCopyToLayoutTargetDir;
+      _InstallTargetingPackIntoLocalDotNet;
       _CreateTargetingPackArchive;
     </BuildDependsOn>
   </PropertyGroup>
@@ -93,7 +103,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
       <AspNetCoreReferenceDocXml Include="@(_ResolvedProjectReferencePaths->WithMetadataValue('IsReferenceAssembly', 'false')->'%(RootDir)%(Directory)%(FileName).xml')" />
       <RefPackContent Include="@(AspNetCoreReferenceAssemblyPath)" PackagePath="$(RefAssemblyPackagePath)" />
       <RefPackContent Include="@(AspNetCoreReferenceDocXml)" PackagePath="$(RefAssemblyPackagePath)" />
-      <RefPackContent Include="$(TargetDir)$(PackageConflictManifestFileName)" PackagePath="$(PackageConflictManifestPackagePath)" />
+      <RefPackContent Include="$(TargetDir)$(PackageConflictManifestFileName)" PackagePath="$(ManifestsPackagePath)" />
+      <RefPackContent Include="$(PlatformManifestOutputPath)" PackagePath="$(ManifestsPackagePath)" />
 
       <_PackageFiles Include="@(RefPackContent)" />
     </ItemGroup>
@@ -125,6 +136,21 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <Message Importance="High" Text="$(MSBuildProjectName) -> $(LayoutTargetDir)" />
   </Target>
 
+  <ItemGroup>
+    <CreateDirectory Include="$(LocalInstallationOutputPath)" />
+  </ItemGroup>
+
+  <!-- Workaround https://github.com/dotnet/sdk/issues/2910 by copying targeting pack into local installation. -->
+  <Target Name="_InstallTargetingPackIntoLocalDotNet"
+          DependsOnTargets="_ResolveTargetingPackContent"
+          Inputs="@(RefPackContent)"
+          Outputs="@(RefPackContent->'$(LocalInstallationOutputPath)%(PackagePath)%(FileName)%(Extension)')">
+    <Copy SourceFiles="@(RefPackContent)"
+          DestinationFiles="@(RefPackContent->'$(LocalInstallationOutputPath)%(PackagePath)%(FileName)%(Extension)')"
+          UseHardlinksIfPossible="true" />
+    <Message Importance="High" Text="$(MSBuildProjectName) -> $(LocalInstallationOutputPath)" />
+  </Target>
+
   <Target Name="_CreateTargetingPackArchive"
           Inputs="@(RefPackContent)"
           Outputs="$(ArchiveOutputPath)">

+ 156 - 9
src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj

@@ -13,6 +13,7 @@
     <!-- Even though RuntimeIdentifier is set, shared framework projects are not self-contained projects -->
     <SelfContained>false</SelfContained>
     <PackageId>$(MSBuildProjectName).$(RuntimeIdentifier)</PackageId>
+    <PackageVersion>$(SharedFxVersion)</PackageVersion>
     <IsShippingPackage>true</IsShippingPackage>
     <HasReferenceAssembly>false</HasReferenceAssembly>
     <PackageDescription>Provides a default set of APIs for building an ASP.NET Core application. Contains assets used for self-contained deployments.
@@ -24,11 +25,29 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <!-- There is a ref directory next to this project but it's not auto generated, disable the guardrails -->
     <SkipRefDirectoryCheck>true</SkipRefDirectoryCheck>
     <PackageType>DotnetPlatform</PackageType>
+    <SharedRuntimeSubPath>shared\$(SharedFxName)\$(SharedFxVersion)\</SharedRuntimeSubPath>
+    <SharedFxLayoutTargetDir>$(SharedFrameworkLayoutRoot)$(SharedRuntimeSubPath)</SharedFxLayoutTargetDir>
+    <RedistLayoutTargetDir>$(RedistSharedFrameworkLayoutRoot)$(SharedRuntimeSubPath)</RedistLayoutTargetDir>
+    <LocalInstallationOutputPath>$(LocalDotNetRoot)$(SharedRuntimeSubPath)</LocalInstallationOutputPath>
+
+    <InternalArchiveOutputFileName>$(InternalInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</InternalArchiveOutputFileName>
+    <InternalArchiveOutputPath>$(InstallersOutputPath)$(InternalArchiveOutputFileName)</InternalArchiveOutputPath>
+    <BundleArchiveOutputFileName>$(RuntimeInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</BundleArchiveOutputFileName>
+    <RedistArchiveOutputPath>$(InstallersOutputPath)$(BundleArchiveOutputFileName)</RedistArchiveOutputPath>
+
+    <!-- This file is used by the dotnet/core-sdk repo to determine if the version of AspNetCore.App is coherent with Microsoft.NETCore.App. -->
+    <BaseRuntimeVersionFileName>aspnetcore_base_runtime.version</BaseRuntimeVersionFileName>
+    <BaseRuntimeVersionFileOutputPath>$(InstallersOutputPath)$(BaseRuntimeVersionFileName)</BaseRuntimeVersionFileOutputPath>
+
     <!-- NuGet appends target framework to this value. Example: runtimes/win-x64/lib/netcoreapp3.0/ -->
     <BuildOutputTargetFolder>runtimes/$(RuntimeIdentifier)/lib/</BuildOutputTargetFolder>
     <!-- Target framework is not append to this because native assets to not have a target framework. -->
     <NativeAssetsPackagePath>runtimes/$(RuntimeIdentifier)/native/</NativeAssetsPackagePath>
 
+    <DotNetRuntimeArchiveFileName>dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</DotNetRuntimeArchiveFileName>
+    <DotNetRuntimeDownloadUrl>$(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppPackageVersion)/$(DotNetRuntimeArchiveFileName)</DotNetRuntimeDownloadUrl>
+    <DotNetRuntimeArchive>$(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName)</DotNetRuntimeArchive>
+
     <!-- Setting this suppresses getting documentation .xml files in the shared runtime output. -->
     <AllowedReferenceRelatedFileExtensions>.pdb</AllowedReferenceRelatedFileExtensions>
 
@@ -53,6 +72,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <!-- There is no way to suppress the .dev.runtimeconfig.json generation. -->
     <ProjectRuntimeConfigDevFilePath>$(IntermediateOutputPath)ignoreme.dev.runtimeconfig.json</ProjectRuntimeConfigDevFilePath>
 
+    <VersionFileIntermediateOutputPath>$(IntermediateOutputPath).version</VersionFileIntermediateOutputPath>
+
     <!-- The project representing the shared framework doesn't produce a .NET assembly or symbols. -->
     <DebugType>none</DebugType>
     <CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
@@ -93,6 +114,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
 
     <RuntimePackageRoot>$(NuGetPackageRoot)/runtime.$(RuntimeIdentifier).microsoft.netcore.app/$(MicrosoftNETCoreAppPackageVersion)/</RuntimePackageRoot>
     <CrossgenToolPath>$(RuntimePackageRoot)tools/$(CrossgenToolPackagePath)</CrossgenToolPath>
+    <AssetTargetFallback>$(AssetTargetFallback);native,Version=0.0</AssetTargetFallback>
   </PropertyGroup>
 
   <ItemGroup>
@@ -104,12 +126,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <ProjectReference Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(BuildNative)' != 'false'" Include="$(RepositoryRoot)src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj">
       <SetPlatform>Platform=$(TargetArchitecture)</SetPlatform>
       <SetPlatform Condition="'$(TargetArchitecture)' == 'x86'">Platform=Win32</SetPlatform>
-      <!-- Suppress NuGet compatibility checks. We compensate for flowing .dll/.pdb files with the _ResolveCopyLocalNativeReference target. -->
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-      <!-- Optimization. Native projects don't have a .NET TargetFramework -->
-      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
-      <UndefineProperties>TargetFramework</UndefineProperties>
+      <!-- Custom attribute used to distinguish managed from native references. -->
+      <IsNativeImage>true</IsNativeImage>
+      <!-- A custom item group to be used in targets later.  -->
       <OutputItemType>_ResolvedNativeProjectReferencePaths</OutputItemType>
+      <!-- C++ projects don't invoke GetTargetPath by default when building. -->
+      <Targets>Build;GetTargetPath</Targets>
     </ProjectReference>
   </ItemGroup>
 
@@ -130,7 +152,15 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <CoreBuildDependsOn>
       $(CoreBuildDependsOn);
       GenerateSharedFxDepsFile;
+      GenerateSharedFxVersionsFiles;
       Crossgen;
+      _ResolveSharedFrameworkContent;
+      _DownloadAndExtractDotNetRuntime;
+      _BatchCopyToSharedFrameworkLayout;
+      _BatchCopyToRedistLayout;
+      _CreateInternalSharedFxArchive;
+      _CreateRedistSharedFxArchive;
+      _InstallFrameworkIntoLocalDotNet;
     </CoreBuildDependsOn>
     <CrossGenDependsOn>
       ResolveReferences;
@@ -175,10 +205,10 @@ This package is an internal implementation of the .NET Core SDK and is not meant
     <Warning Text="This project has native dependencies which were not built. Without this, tests may not function correctly. Run `build.cmd -BuildNative -BuildManaged` to build both C# and C++." />
   </Target>
 
-  <Target Name="_ResolveCopyLocalNativeReference">
+  <Target Name="_ResolveCopyLocalNativeReference" DependsOnTargets="ResolveProjectReferences">
     <ItemGroup>
-      <ReferenceCopyLocalPaths Include="@(_ResolvedNativeProjectReferencePaths)" IsNativeImage="true" />
-      <ReferenceCopyLocalPaths Include="@(_ResolvedNativeProjectReferencePaths->'%(RootDir)%(Directory)%(FileName).pdb')" IsNativeImage="true" />
+      <ReferenceCopyLocalPaths Include="@(_ResolvedNativeProjectReferencePaths)" />
+      <ReferenceCopyLocalPaths Include="@(_ResolvedNativeProjectReferencePaths->'%(RootDir)%(Directory)%(FileName).pdb')" />
     </ItemGroup>
   </Target>
 
@@ -198,7 +228,26 @@ This package is an internal implementation of the .NET Core SDK and is not meant
       FrameworkVersion="$(SharedFxVersion)"
       References="@(_RuntimeReference)"
       RuntimeIdentifier="$(RuntimeIdentifier)"
-      RuntimePackageName="$(PackageId)" />
+      RuntimePackageName="$(PackageId)"
+      PlatformManifestOutputPath="$(PlatformManifestOutputPath)" />
+  </Target>
+
+  <Target Name="GenerateSharedFxVersionsFiles" DependsOnTargets="InitializeSourceControlInformation">
+    <WriteLinesToFile
+      File="$(BaseRuntimeVersionFileOutputPath)"
+      Lines="$(MicrosoftNETCoreAppPackageVersion)"
+      Overwrite="true" />
+
+    <!-- Generates the .version file in the shared framework -->
+    <ItemGroup>
+      <VersionLines Include="$(SourceRevisionId)" />
+      <VersionLines Include="$(SharedFxVersion)" />
+    </ItemGroup>
+
+    <WriteLinesToFile
+      File="$(VersionFileIntermediateOutputPath)"
+      Lines="@(VersionLines)"
+      Overwrite="true" />
   </Target>
 
   <!-- This target resolves files into the BuiltProjectOutputGroupOutput which NuGet uses to generate the package files. -->
@@ -237,6 +286,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
 
   <ItemGroup>
     <CreateDirectory Include="$(CrossgenToolDir)" />
+    <CreateDirectory Include="$(SharedFxLayoutTargetDir)" />
+    <CreateDirectory Include="$(RedistLayoutTargetDir)" />
+    <CreateDirectory Include="$(LocalInstallationOutputPath)" />
   </ItemGroup>
 
   <Target Name="Crossgen" DependsOnTargets="$(CrossgenDependsOn)" />
@@ -294,4 +346,99 @@ This package is an internal implementation of the .NET Core SDK and is not meant
           StandardOutputImportance="High" />
   </Target>
 
+  <!--
+  #########################################
+  Targets related to creating .zip/.tar.gz
+  #########################################
+  -->
+  <Target Name="_DownloadAndExtractDotNetRuntime">
+   <DownloadFile Condition=" ! Exists('$(DotNetRuntimeArchive)')"
+      SourceUrl="$(DotNetRuntimeDownloadUrl)$(DotNetAssetRootAccessTokenSuffix)"
+      DestinationFolder="$(BaseIntermediateOutputPath)"
+      DestinationFileName="$(DotNetRuntimeArchiveFileName)" />
+
+    <!-- Extract the dotnet-runtime archive -->
+    <Exec Condition="'$(ArchiveExtension)' == '.tar.gz'"
+      Command="tar -xzf $(DotNetRuntimeArchive) -C $(RedistSharedFrameworkLayoutRoot)" />
+
+    <Unzip Condition="'$(ArchiveExtension)' == '.zip'"
+      SourceFiles="$(DotNetRuntimeArchive)"
+      DestinationFolder="$(RedistSharedFrameworkLayoutRoot)"
+      OverwriteReadOnlyFiles="true" />
+  </Target>
+
+  <Target Name="_ResolveSharedFrameworkContent" DependsOnTargets="ResolveReferences;Crossgen">
+    <ItemGroup>
+      <SharedFxContent Include="$(VersionFileIntermediateOutputPath)" />
+      <SharedFxContent Include="$(ProjectDepsFilePath)" />
+      <SharedFxContent Include="$(ProjectRuntimeConfigFilePath)" />
+      <SharedFxContent Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' != '.pdb'" />
+    </ItemGroup>
+  </Target>
+
+  <!-- Written to take advantage of target batching in MSBuild. -->
+  <Target Name="_BatchCopyToSharedFrameworkLayout"
+          DependsOnTargets="_ResolveSharedFrameworkContent"
+          Inputs="@(SharedFxContent)"
+          Outputs="@(SharedFxContent->'$(SharedFxLayoutTargetDir)%(FileName)%(Extension)')">
+
+    <Copy SourceFiles="@(SharedFxContent)"
+          DestinationFiles="@(SharedFxContent->'$(SharedFxLayoutTargetDir)%(FileName)%(Extension)')"
+          UseHardlinksIfPossible="true" />
+    <Message Importance="High" Text="$(MSbuildProjectFile) -> $(SharedFxLayoutTargetDir)" />
+  </Target>
+
+  <!-- Written to take advantage of target batching in MSBuild. -->
+  <Target Name="_BatchCopyToRedistLayout"
+          DependsOnTargets="_ResolveSharedFrameworkContent"
+          Inputs="@(SharedFxContent)"
+          Outputs="@(SharedFxContent->'$(RedistLayoutTargetDir)%(FileName)%(Extension)')">
+
+    <Copy SourceFiles="@(SharedFxContent)"
+          DestinationFiles="@(SharedFxContent->'$(RedistLayoutTargetDir)%(FileName)%(Extension)')"
+          UseHardlinksIfPossible="true" />
+    <Message Importance="High" Text="$(MSbuildProjectFile) -> $(RedistLayoutTargetDir)" />
+  </Target>
+
+  <!-- Required to workaround https://github.com/dotnet/core-setup/issues/4809. This copies the shared framework into the $reporoot/.dotnet folder so tests can run against the shared framework. -->
+  <Target Name="_InstallFrameworkIntoLocalDotNet"
+          Inputs="@(SharedFxContent)"
+          Outputs="@(SharedFxContent->'$(LocalInstallationOutputPath)%(FileName)%(Extension)')">
+
+    <Copy SourceFiles="@(SharedFxContent)"
+          DestinationFiles="@(SharedFxContent->'$(LocalInstallationOutputPath)%(FileName)%(Extension)')"
+          UseHardlinksIfPossible="true" />
+    <Message Importance="High" Text="$(MSbuildProjectFile) -> $(LocalInstallationOutputPath)" />
+  </Target>
+
+  <Target Name="_CreateInternalSharedFxArchive"
+          Inputs="@(SharedFxContent)"
+          Outputs="$(InternalArchiveOutputPath)">
+    <Message Importance="High" Text="$(MSbuildProjectFile) -> $(InternalArchiveOutputPath)" />
+    <ZipDirectory
+      SourceDirectory="$(SharedFrameworkLayoutRoot)"
+      DestinationFile="$(InternalArchiveOutputPath)"
+      Overwrite="true"
+      Condition="'$(ArchiveExtension)' == '.zip'" />
+    <Exec
+      Command="tar -czf $(InternalArchiveOutputPath) ."
+      WorkingDirectory="$(SharedFrameworkLayoutRoot)"
+      Condition="'$(ArchiveExtension)' == '.tar.gz'" />
+  </Target>
+
+  <Target Name="_CreateRedistSharedFxArchive"
+          Inputs="@(SharedFxContent)"
+          Outputs="$(RedistArchiveOutputPath)">
+    <Message Importance="High" Text="$(MSbuildProjectFile) -> $(RedistArchiveOutputPath)" />
+    <ZipDirectory
+      SourceDirectory="$(RedistSharedFrameworkLayoutRoot)"
+      DestinationFile="$(RedistArchiveOutputPath)"
+      Overwrite="true"
+      Condition="'$(ArchiveExtension)' == '.zip'" />
+    <Exec
+      Command="tar -czf $(RedistArchiveOutputPath) ."
+      WorkingDirectory="$(RedistSharedFrameworkLayoutRoot)"
+      Condition="'$(ArchiveExtension)' == '.tar.gz'" />
+  </Target>
+
 </Project>

+ 0 - 56
src/Framework/src/Microsoft.AspNetCore.App.shfxproj

@@ -1,56 +0,0 @@
-<Project>
-  <PropertyGroup>
-    <OutputInRepoRoot>true</OutputInRepoRoot>
-    <PlatformName>$(TargetOsName)-$(TargetArchitecture)</PlatformName>
-    <OutDirName>fx</OutDirName>
-  </PropertyGroup>
-
-  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-
-  <PropertyGroup>
-    <RuntimeIdentifier>$(TargetRuntimeIdentifier)</RuntimeIdentifier>
-    <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
-    <BaseSharedFrameworkName>Microsoft.NETCore.App</BaseSharedFrameworkName>
-    <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
-
-    <!-- Optimize the framework using the crossgen tool -->
-    <CrossgenOutput>true</CrossgenOutput>
-
-    <!-- Produce crossgen symbols when running the crossgen tool -->
-    <CrossgenSymbolsOutput>true</CrossgenSymbolsOutput>
-    <CrossgenSymbolsOutput Condition=" '$(CrossgenOutput)' == 'false' OR '$(TargetOsName)' == 'osx'">false</CrossgenSymbolsOutput>
-
-    <!-- Always generated, even though output type == Library -->
-    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
-    <!-- Even though RuntimeIdentifier is set, shared framework projects are not self-contained projects -->
-    <SelfContained>false</SelfContained>
-
-    <!-- Don't add TFM to the project output path of shared framework projects -->
-    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
-    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
-
-    <!-- The project representing the shared framework doesn't produce a .NET assembly or symbols -->
-    <DebugType>none</DebugType>
-    <CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
-    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
-    <IncludeMainProjectInDepsFile>false</IncludeMainProjectInDepsFile>
-
-    <!-- The runtime Package ID is for self-contained assets. -->
-    <PackageId>runtime.$(TargetRuntimeIdentifier).$(MSBuildProjectName)</PackageId>
-    <PackageDescription>This package provides assets used for self-contained deployments of an ASP.NET Core application. It is an internal implementation package not meant for direct consumption. Please do not reference directly.
-
-$(MSBuildProjectName) provides a default set of APIs for building an ASP.NET Core application.
-    </PackageDescription>
-    <IsShippingPackage>true</IsShippingPackage>
-
-    <IncludeSymbols>true</IncludeSymbols>
-    <NuspecFile>$(MSBuildThisFileDirectory)runtime.fx.nuspec</NuspecFile>
-    <PackageTags>aspnetcore;shared-framework</PackageTags>
-    <!-- Workaround for invalid NU5109 error when packing on macOS. -->
-    <NoPackageAnalysis>true</NoPackageAnalysis>
-  </PropertyGroup>
-
-  <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-  <Import Project="SharedFx.targets" />
-
-</Project>

+ 0 - 388
src/Framework/src/SharedFx.targets

@@ -1,388 +0,0 @@
-<!--
-This file defines targets for building a shared framework.
-This targets file should only be imported by .shfxproj files.
--->
-<Project>
-
-  <PropertyGroup>
-    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
-
-    <CoreBuildDependsOn>
-      BuildOnlySettings;
-      PrepareForBuild;
-      PreBuildEvent;
-      ResolveReferences;
-      GenerateSharedFxVersionsFile;
-      GenerateBuildDependencyFile;
-      PrepareForPublish;
-      GenerateBuildRuntimeConfigurationFiles;
-      ComputeAndCopyFilesToPublishDirectory;
-      GeneratePublishDependencyFile;
-      GenerateSharedFxMetadataFiles;
-      CopySharedFxToOutput;
-      CollectSharedFxOutput;
-      PostBuildEvent;
-      GetTargetPath;
-      PrepareForRun;
-    </CoreBuildDependsOn>
-
-    <CollectOutputSharedFxDependsOn>
-      PrepareForCrossGen;
-      CrossGenAssemblies;
-      CrossGenSymbols;
-    </CollectOutputSharedFxDependsOn>
-
-    <PrepareForBuildDependsOn>
-      PrepareOutputPaths;
-    </PrepareForBuildDependsOn>
-
-    <ResolveReferencesDependsOn>
-      BeforeResolveReferences;
-      AssignProjectConfiguration;
-      ResolveProjectReferences;
-      FindInvalidProjectReferences;
-      AfterResolveReferences
-    </ResolveReferencesDependsOn>
-
-    <PrepareForRunDependsOn>
-      CollectSharedFxOutput;
-      GetCopyToSharedFrameworkItems;
-      InstallFrameworkIntoLocalDotNet;
-    </PrepareForRunDependsOn>
-
-    <!-- The name of the shared framework. -->
-    <SharedFxName Condition=" '$(SharedFxName)' == '' ">$(MSBuildProjectName)</SharedFxName>
-
-    <LibPrefix Condition=" '$(TargetOsName)' != 'win' ">lib</LibPrefix>
-    <LibExtension>.so</LibExtension>
-    <LibExtension Condition=" '$(TargetOsName)' == 'win' ">.dll</LibExtension>
-    <LibExtension Condition=" '$(TargetOsName)' == 'osx' ">.dylib</LibExtension>
-    <ExeExtension Condition=" '$(TargetOsName)' == 'win' ">.exe</ExeExtension>
-    <!-- 3B = semicolon in ASCII -->
-    <PathSeparator Condition="'$(PathSeparator)' == ''">:</PathSeparator>
-    <PathSeparator Condition=" '$(TargetOsName)' == 'win' ">%3B</PathSeparator>
-
-    <IntermediateOutputPath>$(IntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
-
-    <!-- Override the SDK Default for this location for copying published output. -->
-    <PublishDir>$(IntermediateOutputPath)u\</PublishDir>
-
-    <!-- If symbols generation is disabled, there is no use in producing a symbols.nupkg files. -->
-    <IncludeSymbols Condition="'$(CrossgenSymbolsOutput)' == 'false'">false</IncludeSymbols>
-
-    <ManifestOutputDir Condition="'$(ManifestOutputDir)' == ''">$(OutputPath)manifest\</ManifestOutputDir>
-    <MetadataOutputPath Condition="'$(MetadataOutputPath)' == ''">$(OutputPath)files\</MetadataOutputPath>
-    <SymbolsOutputPath Condition="'$(SymbolsOutputPath)' == ''">$(OutputPath)symbols\</SymbolsOutputPath>
-    <NativeAssetsOutputPath Condition="'$(NativeAssetsOutputPath)' == ''">$(OutputPath)native\</NativeAssetsOutputPath>
-    <RuntimeAssetsOutputPath Condition="'$(RuntimeAssetsOutputPath)' == ''">$(OutputPath)lib\$(TargetFramework)\</RuntimeAssetsOutputPath>
-    <LocalInstallationOutputPath>$(LocalDotNetRoot)shared\$(SharedFxName)\$(SharedFxVersion)\</LocalInstallationOutputPath>
-
-    <CrossGenToolDir>$(IntermediateOutputPath)crossgen\</CrossGenToolDir>
-    <!-- Crossgen executable name -->
-    <CrossGenExecutable>crossgen</CrossGenExecutable>
-    <CrossGenExecutable Condition=" '$(TargetOsName)' == 'win' ">$(CrossGenExecutable).exe</CrossGenExecutable>
-    <!-- Default crossgen executable relative path -->
-    <CrossGenTool>$(CrossGenExecutable)</CrossGenTool>
-    <!-- Disambiguated RID-specific crossgen executable relative path -->
-    <CrossGenTool Condition=" '$(TargetRuntimeIdentifier)' == 'linux-arm' ">x64_arm\$(CrossGenTool)</CrossGenTool>
-    <CrossGenTool Condition=" '$(TargetRuntimeIdentifier)' == 'linux-arm64' ">x64_arm64\$(CrossGenTool)</CrossGenTool>
-    <CrossGenTool Condition=" '$(TargetRuntimeIdentifier)' == 'win-arm' ">x86_arm\$(CrossGenTool)</CrossGenTool>
-
-    <!-- Map BaseSharedFrameworkName into properties used by the SDK to determine publish output trimming and deps.json generation -->
-    <MicrosoftNETPlatformLibrary>$(BaseSharedFrameworkName)</MicrosoftNETPlatformLibrary>
-    <!-- Prevents runtimeconfig.dev.json from ending up in publish output. -->
-    <ProjectRuntimeConfigDevFilePath>$(IntermediateOutputPath)$(SharedFxName).runtimeconfig.dev.json</ProjectRuntimeConfigDevFilePath>
-    <!-- Redirects the output of GeneratePublishDependencyFile into obj/ because we need to do post-processing on the .deps.json file -->
-    <ProjectDepsFilePath>$(IntermediateOutputPath)$(SharedFxName).intermediate.deps.json</ProjectDepsFilePath>
-    <PublishDepsFilePath>$(ProjectDepsFilePath)</PublishDepsFilePath>
-
-    <!-- The output path of generated files -->
-    <PublishRuntimeConfigFilePath>$(MetadataOutputPath)$(SharedFxName).runtimeconfig.json</PublishRuntimeConfigFilePath>
-    <!-- The SDK renamed PublishRuntimeConfigFilePath to PublishRuntimeConfigFilePath, so set both to be safe. -->
-    <ProjectRuntimeConfigFilePath>$(PublishRuntimeConfigFilePath)</ProjectRuntimeConfigFilePath>
-    <SharedFxDepsFilePath>$(MetadataOutputPath)$(SharedFxName).deps.json</SharedFxDepsFilePath>
-    <VersionFileOutputPath>$(MetadataOutputPath).version</VersionFileOutputPath>
-    <PlatformManifestOutputPath>$(ManifestOutputDir)$(SharedFxName).PlatformManifest.txt</PlatformManifestOutputPath>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <CopyToSharedFramework Include="$(SharedFxDepsFilePath)" OutputPath="$(LocalInstallationOutputPath)$(SharedFxName).deps.json" />
-    <CopyToSharedFramework Include="$(VersionFileOutputPath)" OutputPath="$(LocalInstallationOutputPath).version" />
-    <CopyToSharedFramework Include="$(PublishRuntimeConfigFilePath)" OutputPath="$(LocalInstallationOutputPath)$(SharedFxName).runtimeconfig.json" />
-  </ItemGroup>
-
-  <ItemDefinitionGroup>
-    <TargetPathWithTargetPlatformMoniker>
-      <!--
-        This lists all folders of assets which should be collected into the same folder in a shared framework installer.
-        This is set on this item group so it flows across project references into installer projects.
-      -->
-      <InstallerAssetPaths>
-        $(MetadataOutputPath);
-        $(RuntimeAssetsOutputPath);
-        $(NativeAssetsOutputPath);
-      </InstallerAssetPaths>
-      <MetadataOutputPath>$(MetadataOutputPath)</MetadataOutputPath>
-      <RuntimeAssetsOutputPath>$(RuntimeAssetsOutputPath)</RuntimeAssetsOutputPath>
-      <NativeAssetsOutputPath>$(NativeAssetsOutputPath)</NativeAssetsOutputPath>
-      <!-- Don't include the platform manifest in installer assets. -->
-      <ManifestOutputDir>$(ManifestOutputDir)</ManifestOutputDir>
-      <SharedFxName>$(SharedFxName)</SharedFxName>
-      <PackageId>$(PackageId)</PackageId>
-    </TargetPathWithTargetPlatformMoniker>
-  </ItemDefinitionGroup>
-
-  <ItemGroup>
-    <!-- Add version metadata. These are expected to match the metapackage version. -->
-    <AspNetCoreAppReferenceAndPackage Update="@(AspNetCoreAppReferenceAndPackage)" Version="$(SharedFxVersion)" />
-    <AspNetCoreAppReference Update="@(AspNetCoreAppReference)" Version="$(SharedFxVersion)" />
-
-    <!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
-    <PackageReference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)">
-      <IncludeAssets>Runtime;Native</IncludeAssets>
-      <Publish>true</Publish>
-    </PackageReference>
-  </ItemGroup>
-
-  <!-- Check some required properties before building a shared framework/ -->
-  <Target Name="_CheckForRequiredFxProperties" BeforeTargets="_CheckForInvalidConfigurationAndPlatform">
-    <Error Condition=" '$(BaseSharedFrameworkName)' == '' "
-           Text="Missing required property: BaseSharedFrameworkName. Shared frameworks must specify which framework is used at the base." />
-
-    <Error Condition=" '$(TargetRuntimeIdentifier)' == '' "
-           Text="Missing required property: TargetRuntimeIdentifier. Shared frameworks are rid-specific, so this must be set." />
-
-    <ItemGroup>
-      <_UnknownRid Remove="@(_UnknownRid)" />
-      <_UnknownRid Include="$(TargetRuntimeIdentifier)" Exclude="$(SupportedRuntimeIdentifiers)" />
-    </ItemGroup>
-
-    <Error Condition=" '@(_UnknownRid)' != '' "
-           Text="&quot;$(TargetRuntimeIdentifier)&quot; not acceptable runtime identifier. Please specify an acceptable value: {$(SupportedRuntimeIdentifiers)}." />
-
-    <Message Importance="High" Text="Building $(SharedFxName) (fx: $(TargetRuntimeIdentifier))" />
-  </Target>
-
-  <Target Name="PrepareOutputPaths">
-    <MakeDir Directories="$(MetadataOutputPath);$(SymbolsOutputPath);$(NativeAssetsOutputPath);$(RuntimeAssetsOutputPath);$(LocalInstallationOutputPath)" />
-  </Target>
-
-  <!-- Generates the .version file in the shared framework -->
-  <Target Name="GenerateSharedFxVersionsFile" DependsOnTargets="InitializeSourceControlInformation">
-    <ItemGroup>
-      <VersionLines Include="$(SourceRevisionId)" />
-      <VersionLines Include="$(PackageVersion)" />
-    </ItemGroup>
-
-    <WriteLinesToFile
-      File="$(VersionFileOutputPath)"
-      Lines="@(VersionLines)"
-      Overwrite="true" />
-  </Target>
-
-  <!-- Generates the .deps.json and PlatformManifest.txt files for a shared framework. -->
-  <Target Name="GenerateSharedFxMetadataFiles"
-          Inputs="$(PublishDepsFilePath);$(ProjectAssetsFile);$(MSBuildAllProjects)"
-          Outputs="$(SharedFxDepsFilePath)">
-    <GenerateSharedFrameworkMetadataFiles
-      FrameworkName="$(SharedFxName)"
-      FrameworkVersion="$(SharedFxVersion)"
-      AssetsFilePath="$(ProjectAssetsFile)"
-      TargetFramework="$(TargetFramework)"
-      DepsFilePath="$(PublishDepsFilePath)"
-      DepsFileOutputPath="$(SharedFxDepsFilePath)"
-      PlatformManifestOutputPath="$(PlatformManifestOutputPath)"
-      BaseRuntimeIdentifier="$(TargetOsName)" />
-  </Target>
-
-  <!-- Optimizes shared framework output -->
-  <Target Name="CollectSharedFxOutput" DependsOnTargets="$(CollectOutputSharedFxDependsOn)">
-    <Message Importance="High" Text="$(SharedFxName) (fx: $(TargetRuntimeIdentifier)) -> $(OutputPath)" />
-  </Target>
-
-  <!-- Prepare the project to run crossgen. -->
-  <Target Name="CopySharedFxToOutput" DependsOnTargets="_GetCopyToOutputItems;_BatchCopyToOutputIfNewer" />
-
-  <Target Name="_GetCopyToOutputItems" DependsOnTargets="RunResolvePackageDependencies;ComputeFilesToPublish">
-    <ItemGroup>
-      <NativeAssetsToPublish Include="@(_ResolvedCopyLocalPublishAssets)" Condition="'%(AssetType)' == 'native' " />
-      <ResourceAssetsToPublish Include="@(_ResolvedCopyLocalPublishAssets)" Condition="'%(AssetType)' == 'resources'" />
-      <RuntimeAssetsToPublish Include="@(_ResolvedCopyLocalPublishAssets)" Condition="'%(AssetType)' == 'runtime'" />
-      <OtherAssemblies Include="@(_ResolvedCopyLocalPublishAssets)" Exclude="@(NativeAssetsToPublish);@(ResourceAssetsToPublish);@(RuntimeAssetsToPublish)" />
-    </ItemGroup>
-
-    <Error Text="Unaccounted shared framework assemblies found: @(OtherAssemblies). These files have an unknown asset type." Condition="'@(OtherAssemblies)' != ''" />
-
-    <ItemGroup>
-      <CopyToOutputItem Condition=" '$(CrossGenOutput)' != 'true' "
-            Include="@(RuntimeAssetsToPublish)" OutputPath="$(RuntimeAssetsOutputPath)%(RuntimeAssetsToPublish.DestinationSubPath)" />
-      <CopyToSharedFramework Condition=" '$(CrossGenOutput)' != 'true' "
-            Include="@(RuntimeAssetsToPublish)" OutputPath="$(LocalInstallationOutputPath)%(RuntimeAssetsToPublish.DestinationSubPath)" />
-      <CopyToOutputItem Include="@(NativeAssetsToPublish)" OutputPath="$(NativeAssetsOutputPath)%(NativeAssetsToPublish.DestinationSubPath)" />
-      <CopyToSharedFramework Include="@(NativeAssetsToPublish)" OutputPath="$(LocalInstallationOutputPath)%(NativeAssetsToPublish.DestinationSubPath)" />
-      <CopyToOutputItem Include="@(ResourceAssetsToPublish)" OutputPath="$(RuntimeAssetsOutputPath)%(ResourceAssetsToPublish.DestinationSubPath)" />
-      <CopyToSharedFramework Include="@(ResourceAssetsToPublish)" OutputPath="$(LocalInstallationOutputPath)%(ResourceAssetsToPublish.DestinationSubPath)" />
-    </ItemGroup>
-  </Target>
-
-  <Target Name="_BatchCopyToOutputIfNewer"
-          Inputs="@(CopyToOutputItem)"
-          Outputs="@(CopyToOutputItem->'%(OutputPath)')">
-    <Copy SourceFiles="@(CopyToOutputItem)"
-          DestinationFiles="@(CopyToOutputItem->'%(OutputPath)')"
-          UseHardlinksIfPossible="true" />
-  </Target>
-
-  <Target Name="PrepareForCrossGen" DependsOnTargets="RunResolvePackageDependencies;RunResolvePublishAssemblies" Condition=" '$(CrossGenOutput)' != 'false' ">
-    <MakeDir Directories="$(CrossGenToolDir)" />
-
-    <PropertyGroup>
-      <RuntimePackageName>Microsoft.NETCore.App</RuntimePackageName>
-    </PropertyGroup>
-
-    <ItemGroup>
-      <RuntimePackage Include="@(PackageDefinitions)" Condition="$([System.String]::new('%(PackageDefinitions.Name)').Contains('runtime')) AND $([System.String]::new('%(PackageDefinitions.Name)').Contains('$(RuntimePackageName)'))" />
-    </ItemGroup>
-
-    <Error Text="Could not identify the crossgen package for $(TargetRuntimeIdentifier)" Condition="@(RuntimePackage->Count()) == 0" />
-
-    <ItemGroup>
-      <RuntimePackageFiles Include="%(RuntimePackage.ResolvedPath)\runtimes\**\*" />
-      <CrossGenToolFile Include="%(RuntimePackage.ResolvedPath)\**\$(CrossGenTool)" />
-    </ItemGroup>
-
-    <!-- Create tool directory with crossgen executable and runtime assemblies -->
-    <Copy SourceFiles="@(RuntimePackageFiles);@(CrossGenToolFile)" DestinationFolder="$(CrossGenToolDir)"/>
-
-    <ItemGroup>
-      <ClrJitAssembly Include="$(CrossGenToolDir)\**\$(LibPrefix)clrjit$(LibExtension)" />
-    </ItemGroup>
-
-    <Error Text="Expected to resolve a single runtime package but instead resolved @(RuntimePackage->Count()) with identities %(RuntimePackage.Identity)" Condition="'@(RuntimePackage->Count())' != 1" />
-    <Error Text="Could not find crossgen $(CrossGenTool) in %(RuntimePackage.ResolvedPath)" Condition="@(CrossGenToolFile->Count()) == 0" />
-    <Error Text="Found multiple crossgen $(CrossGenTool) in %(RuntimePackage.ResolvedPath)" Condition="@(CrossGenToolFile->Count()) > 1" />
-    <Error Text="Expected to resolve a single clr jit assembly but instead resolved @(ClrJitAssembly->Count()) with identities %(ClrJitAssembly.Identity)" Condition="'@(ClrJitAssembly->Count())' != 1" />
-
-    <!-- Resolve list of assemblies to crossgen -->
-    <ItemGroup>
-      <AssembliesToCrossgen Include="@(RuntimeAssetsToPublish)">
-        <Source>%(FullPath)</Source>
-        <Rsp>$(IntermediateOutputPath)%(RecursiveDir)%(Filename).rsp</Rsp>
-        <SymbolsRsp>$(IntermediateOutputPath)%(RecursiveDir)%(Filename).symbols.rsp</SymbolsRsp>
-        <SymbolsOutputPath>$(SymbolsOutputPath)%(RecursiveDir)%(Filename).ni.pdb</SymbolsOutputPath>
-        <Destination>$(RuntimeAssetsOutputPath)%(RecursiveDir)%(Filename)%(Extension)</Destination>
-        <DestinationSubPath>%(RecursiveDir)%(Filename)%(Extension)</DestinationSubPath>
-        <Symbols>$(SymbolsOutputPath)%(RecursiveDir)</Symbols>
-      </AssembliesToCrossgen>
-      <CopyToSharedFramework Include="%(AssembliesToCrossgen.Destination)" OutputPath="$(LocalInstallationOutputPath)%(AssembliesToCrossgen.DestinationSubPath)" />
-    </ItemGroup>
-  </Target>
-
-  <!--
-    Run the crossgen tool.
-    This uses .rsp files to get around OS limitations in the maximum number of characters that can be passed in on command-line.
-  -->
-  <Target Name="CrossGenAssemblies" Condition=" '$(CrossGenOutput)' != 'false' "
-    DependsOnTargets="CopySharedFxToOutput;ResolveReferences"
-    Inputs="@(AssembliesToCrossgen)"
-    Outputs="%(AssembliesToCrossgen.Destination)">
-
-    <ItemGroup>
-      <!-- These are the paths used by crossgen to find assemblies that are expected to exist at runtime in the shared frameworks. -->
-      <_PlatformAssemblyPaths Remove="@(_PlatformAssemblyPaths)" />
-      <_PlatformAssemblyPaths Include="$(CrossGenToolDir)" />
-      <_PlatformAssemblyPaths Include="$(PublishDir)" />
-    </ItemGroup>
-
-    <PropertyGroup>
-      <PlatformAssemblyPaths>@(_PlatformAssemblyPaths->Distinct(), '$(PathSeparator)')</PlatformAssemblyPaths>
-    </PropertyGroup>
-
-    <ItemGroup>
-      <CrossGenArgs Include="-nologo" />
-      <CrossGenArgs Include="-readytorun" />
-      <CrossGenArgs Include="-in %(AssembliesToCrossgen.Source)" />
-      <CrossGenArgs Include="-out %(AssembliesToCrossgen.Destination)" />
-      <CrossGenArgs Include="-platform_assemblies_paths $(PlatformAssemblyPaths)" />
-      <CrossGenArgs Include="-JITPath %(ClrJitAssembly.FullPath)" />
-    </ItemGroup>
-
-    <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(AssembliesToCrossgen.Rsp)'))" />
-    <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(AssembliesToCrossgen.Destination)'))" />
-    <WriteLinesToFile File="%(AssembliesToCrossgen.Rsp)" Lines="@(CrossGenArgs)" Overwrite="true" />
-
-    <Copy Condition="'$(CrossGenSharedFx)' == 'false'"
-          SourceFiles="%(AssembliesToCrossgen.Source)"
-          DestinationFiles="%(AssembliesToCrossgen.Destination)" />
-    <Exec Condition="'$(CrossGenSharedFx)' != 'false'"
-          Command="$(CrossGenToolDir)$(CrossGenExecutable) @%(AssembliesToCrossgen.Rsp)"
-          EnvironmentVariables="COMPlus_PartialNGen=0"
-          IgnoreStandardErrorWarningFormat="true"
-          StandardOutputImportance="Normal" />
-  </Target>
-
-  <Target Name="CrossGenSymbols" Condition=" '$(CrossgenSymbolsOutput)' != 'false' "
-    DependsOnTargets="CrossGenAssemblies"
-    Inputs="@(AssembliesToCrossgen)"
-    Outputs="%(AssembliesToCrossgen.SymbolsOutputPath)">
-    <PropertyGroup>
-      <CrossGenSymbolsType>CreatePerfMap</CrossGenSymbolsType>
-      <CrossGenSymbolsType Condition="'$(OS)' == 'Windows_NT'">CreatePDB</CrossGenSymbolsType>
-    </PropertyGroup>
-
-    <ItemGroup>
-      <CrossGenSymbolsArgs Include="-nologo" />
-      <CrossGenSymbolsArgs Include="-readytorun" />
-      <CrossGenSymbolsArgs Include="-platform_assemblies_paths $(PlatformAssemblyPaths)" />
-      <CrossGenSymbolsArgs Include="-$(CrossGenSymbolsType)" />
-      <CrossGenSymbolsArgs Include="%(AssembliesToCrossgen.Symbols)" />
-      <CrossGenSymbolsArgs Include="%(AssembliesToCrossgen.Destination)" />
-    </ItemGroup>
-
-    <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(AssembliesToCrossgen.Symbols)'))" />
-    <WriteLinesToFile File="%(AssembliesToCrossgen.SymbolsRsp)" Lines="@(CrossGenSymbolsArgs)" Overwrite="true" />
-
-    <Exec Command="$(CrossGenToolDir)$(CrossGenExecutable) @%(AssembliesToCrossgen.SymbolsRsp)"
-          EnvironmentVariables="COMPlus_PartialNGen=0"
-          IgnoreStandardErrorWarningFormat="true"
-          StandardOutputImportance="Normal" />
-  </Target>
-
-  <Target Name="CreateManifestResourceNames" />
-
-  <Target Name="PopulateNuspec" BeforeTargets="GenerateNuspec">
-    <PropertyGroup>
-      <NuspecProperties>
-        id=$(PackageId);
-        version=$(PackageVersion);
-        authors=$(Authors);
-        rid=$(TargetRuntimeIdentifier);
-        description=$(PackageDescription);
-        tags=$(PackageTags.Replace(';', ' '));
-        licenseUrl=$(PackageLicenseUrl);
-        projectUrl=$(PackageProjectUrl);
-        iconUrl=$(PackageIconUrl);
-        repositoryUrl=$(RepositoryUrl);
-        repositoryCommit=$(SourceRevisionId);
-        copyright=$(Copyright);
-        targetFramework=$(TargetFramework);
-        symbolsAssets=$([MSBuild]::NormalizeDirectory($(SymbolsOutputPath)));
-        nativeAssets=$([MSBuild]::NormalizeDirectory($(NativeAssetsOutputPath)));
-        runtimeAssets=$([MSBuild]::NormalizeDirectory($(RuntimeAssetsOutputPath)));
-      </NuspecProperties>
-    </PropertyGroup>
-  </Target>
-
-  <Target Name="PrepareForRun" DependsOnTargets="$(PrepareForRunDependsOn)" />
-
-  <Target Name="GetCopyToSharedFrameworkItems" DependsOnTargets="PrepareForCrossGen;CopySharedFxToOutput" />
-
-  <!-- Required to workaround https://github.com/dotnet/core-setup/issues/4809. This copies the shared framework into the $reporoot/.dotnet folder so tests can run against the shared framework. -->
-  <Target Name="InstallFrameworkIntoLocalDotNet"
-          Inputs="@(CopyToSharedFramework)"
-          Outputs="@(CopyToSharedFramework->'%(OutputPath)')">
-    <Copy SourceFiles="@(CopyToSharedFramework)"
-          DestinationFiles="@(CopyToSharedFramework->'%(OutputPath)')"
-          UseHardlinksIfPossible="true" />
-  </Target>
-</Project>

+ 0 - 0
src/Framework/src/_._


+ 0 - 24
src/Framework/src/runtime.fx.nuspec

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
-  <metadata minClientVersion="2.12">
-    <id>$id$</id>
-    <version>$version$</version>
-    <authors>$authors$</authors>
-    <licenseUrl>$licenseUrl$</licenseUrl>
-    <projectUrl>$projectUrl$</projectUrl>
-    <iconUrl>$iconUrl$</iconUrl>
-    <description>$description$</description>
-    <copyright>$copyright$</copyright>
-    <tags>$tags$</tags>
-    <repository type="git" url="$repositoryUrl$" commit="$repositoryCommit$" />
-    <requireLicenseAcceptance>true</requireLicenseAcceptance>
-    <serviceable>true</serviceable>
-  </metadata>
-  <files>
-    <file src="$symbolsAssets$" target="runtimes/$rid$/lib/$targetFramework$/" />
-    <file src="$runtimeAssets$" target="runtimes/$rid$/lib/$targetFramework$/" />
-    <file src="$nativeAssets$" target="runtimes/$rid$/native/" />
-    <!-- This is a dummy reference which prevents NuGet from adding any compilation references when this package is imported. -->
-    <file src="_._" target="ref/netstandard/" />
-  </files>
-</package>

+ 30 - 21
src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

@@ -3,12 +3,21 @@
   <PropertyGroup>
     <TargetFramework>netcoreapp3.0</TargetFramework>
     <RootNamespace>Microsoft.AspNetCore</RootNamespace>
+    <!-- https://github.com/aspnet/AspNetCore/issues/7939: This unit test requires the shared framework be available in Helix. -->
+    <BuildHelixPayload>false</BuildHelixPayload>
   </PropertyGroup>
 
   <ItemGroup>
+    <_ExpectedSharedFrameworkBinaries Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)" />
+    <_ExpectedSharedFrameworkBinaries Condition="'$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' != 'arm'" Include="aspnetcorev2_inprocess" />
+
+    <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
+      <_Parameter1>SharedFxVersion</_Parameter1>
+      <_Parameter2>$(SharedFxVersion)</_Parameter2>
+    </AssemblyAttribute>
     <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
-      <_Parameter1>PackageVersion</_Parameter1>
-      <_Parameter2>$(PackageVersion)</_Parameter2>
+      <_Parameter1>TargetingPackVersion</_Parameter1>
+      <_Parameter2>$(TargetingPackVersion)</_Parameter2>
     </AssemblyAttribute>
     <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
       <_Parameter1>TargetRuntimeIdentifier</_Parameter1>
@@ -18,6 +27,18 @@
       <_Parameter1>MicrosoftNETCoreAppPackageVersion</_Parameter1>
       <_Parameter2>$(RuntimeFrameworkVersion)</_Parameter2>
     </AssemblyAttribute>
+    <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
+      <_Parameter1>SharedFxDependencies</_Parameter1>
+      <_Parameter2>@(_ExpectedSharedFrameworkBinaries)</_Parameter2>
+    </AssemblyAttribute>
+    <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
+      <_Parameter1>SharedFrameworkLayoutRoot</_Parameter1>
+      <_Parameter2>$(SharedFrameworkLayoutRoot)</_Parameter2>
+    </AssemblyAttribute>
+    <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
+      <_Parameter1>TargetingPackLayoutRoot</_Parameter1>
+      <_Parameter2>$(TargetingPackLayoutRoot)</_Parameter2>
+    </AssemblyAttribute>
   </ItemGroup>
 
   <ItemGroup>
@@ -25,34 +46,22 @@
   </ItemGroup>
 
   <ItemGroup>
-    <ProjectReference Include="..\src\Microsoft.AspNetCore.App.shfxproj">
+    <ProjectReference Include="..\ref\Microsoft.AspNetCore.App.Ref.csproj">
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-      <OutputItemType>_ResolvedFrameworkReference</OutputItemType>
+      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
+    </ProjectReference>
+    <ProjectReference Include="..\src\Microsoft.AspNetCore.App.Runtime.csproj">
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
     </ProjectReference>
   </ItemGroup>
 
-  <Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="ResolveProjectReferences;InitializeSourceControlInformation">
+  <Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="InitializeSourceControlInformation">
     <ItemGroup>
       <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
         <_Parameter1>RepositoryCommit</_Parameter1>
         <_Parameter2>$(SourceRevisionId)</_Parameter2>
       </AssemblyAttribute>
-      <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
-        <_Parameter1>SharedFxDependencies</_Parameter1>
-        <_Parameter2>@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)</_Parameter2>
-      </AssemblyAttribute>
-      <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
-        <_Parameter1>MetadataOutputPath</_Parameter1>
-        <_Parameter2>%(_ResolvedFrameworkReference.MetadataOutputPath)</_Parameter2>
-      </AssemblyAttribute>
-      <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
-        <_Parameter1>ManifestOutputDir</_Parameter1>
-        <_Parameter2>%(_ResolvedFrameworkReference.ManifestOutputDir)</_Parameter2>
-      </AssemblyAttribute>
-      <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
-        <_Parameter1>RuntimeAssetsOutputPath</_Parameter1>
-        <_Parameter2>%(_ResolvedFrameworkReference.RuntimeAssetsOutputPath)</_Parameter2>
-      </AssemblyAttribute>
     </ItemGroup>
   </Target>
 

+ 25 - 81
src/Framework/test/SharedFxTests.cs

@@ -15,19 +15,21 @@ namespace Microsoft.AspNetCore
     {
         private readonly string _expectedTfm;
         private readonly string _expectedRid;
+        private readonly string _sharedFxRoot;
         private readonly ITestOutputHelper _output;
 
         public SharedFxTests(ITestOutputHelper output)
         {
             _output = output;
-            _expectedTfm = "netcoreapp" + TestData.GetPackageVersion().Substring(0, 3);
+            _expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3);
             _expectedRid = TestData.GetSharedFxRuntimeIdentifier();
+            _sharedFxRoot = Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetSharedFxVersion());
         }
 
         [Fact]
         public void SharedFrameworkContainsExpectedFiles()
         {
-            var actualAssemblies = Directory.GetFiles(TestData.GetTestDataValue("RuntimeAssetsOutputPath"), "*.dll")
+            var actualAssemblies = Directory.GetFiles(_sharedFxRoot, "*.dll")
                 .Select(Path.GetFileNameWithoutExtension)
                 .ToHashSet();
             var expectedAssemblies = TestData.GetSharedFxDependencies()
@@ -51,71 +53,13 @@ namespace Microsoft.AspNetCore
             Assert.Empty(unexpected);
         }
 
-        [Fact]
-        public void PlatformManifestListsAllFiles()
-        {
-            var platformManifestPath = Path.Combine(TestData.GetManifestOutputDir(), "Microsoft.AspNetCore.App.PlatformManifest.txt");
-            var expectedAssemblies = TestData.GetSharedFxDependencies()
-                .Split(';', StringSplitOptions.RemoveEmptyEntries)
-                .ToHashSet();
-
-            _output.WriteLine("==== file contents ====");
-            _output.WriteLine(File.ReadAllText(platformManifestPath));
-            _output.WriteLine("==== expected assemblies ====");
-            _output.WriteLine(string.Join('\n', expectedAssemblies.OrderBy(i => i)));
-
-            AssertEx.FileExists(platformManifestPath);
-
-            var manifestFileLines = File.ReadAllLines(platformManifestPath);
-
-            var actualAssemblies = manifestFileLines
-                .Where(s => !string.IsNullOrEmpty(s))
-                .Select(i =>
-                {
-                    var fileName = i.Split('|')[0];
-                    return fileName.EndsWith(".dll", StringComparison.Ordinal)
-                        ? fileName.Substring(0, fileName.Length - 4)
-                        : fileName;
-                })
-                .ToHashSet();
-
-            var missing = expectedAssemblies.Except(actualAssemblies);
-            var unexpected = actualAssemblies.Except(expectedAssemblies)
-                .Where(s => !string.Equals(s, "aspnetcorev2_inprocess", StringComparison.Ordinal)); // this native assembly only appears in Windows builds.
-
-            if (_expectedRid.StartsWith("win", StringComparison.Ordinal) && !_expectedRid.Contains("arm"))
-            {
-                Assert.Contains("aspnetcorev2_inprocess", actualAssemblies);
-            }
-
-            _output.WriteLine("==== missing assemblies from the manifest ====");
-            _output.WriteLine(string.Join('\n', missing));
-            _output.WriteLine("==== unexpected assemblies in the manifest ====");
-            _output.WriteLine(string.Join('\n', unexpected));
-
-            Assert.Empty(missing);
-            Assert.Empty(unexpected);
-
-            Assert.All(manifestFileLines, line =>
-            {
-                var parts = line.Split('|');
-                Assert.Equal(4, parts.Length);
-                Assert.Equal("Microsoft.AspNetCore.App", parts[1]);
-                if (parts[2].Length > 0)
-                {
-                    Assert.True(Version.TryParse(parts[2], out _), "Assembly version must be convertable to System.Version");
-                }
-                Assert.True(Version.TryParse(parts[3], out _), "File version must be convertable to System.Version");
-            });
-        }
-
         [Fact]
         public void ItContainsValidRuntimeConfigFile()
         {
-            var runtimeConfigFilePath = Path.Combine(TestData.GetMetadataOutput(), "Microsoft.AspNetCore.App.runtimeconfig.json");
+            var runtimeConfigFilePath = Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.runtimeconfig.json");
 
             AssertEx.FileExists(runtimeConfigFilePath);
-            AssertEx.FileDoesNotExists(Path.Combine(TestData.GetMetadataOutput(), "Microsoft.AspNetCore.App.runtimeconfig.dev.json"));
+            AssertEx.FileDoesNotExists(Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.runtimeconfig.dev.json"));
 
             var runtimeConfig = JObject.Parse(File.ReadAllText(runtimeConfigFilePath));
 
@@ -128,10 +72,11 @@ namespace Microsoft.AspNetCore
         [Fact]
         public void ItContainsValidDepsJson()
         {
-            var depsFilePath = Path.Combine(TestData.GetMetadataOutput(), "Microsoft.AspNetCore.App.deps.json");
+            var depsFilePath = Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.deps.json");
 
-            var target = $".NETCoreApp,Version=v{TestData.GetPackageVersion().Substring(0, 3)}/{_expectedRid}";
-            var ridPackageId = $"runtime.{_expectedRid}.Microsoft.AspNetCore.App";
+            var target = $".NETCoreApp,Version=v{TestData.GetSharedFxVersion().Substring(0, 3)}/{_expectedRid}";
+            var ridPackageId = $"Microsoft.AspNetCore.App.Runtime.{_expectedRid}";
+            var libraryId = $"{ridPackageId}/{TestData.GetSharedFxVersion()}";
 
             AssertEx.FileExists(depsFilePath);
 
@@ -140,7 +85,6 @@ namespace Microsoft.AspNetCore
             Assert.Equal(target, (string)depsFile["runtimeTarget"]["name"]);
             Assert.NotNull(depsFile["compilationOptions"]);
             Assert.Empty(depsFile["compilationOptions"]);
-            Assert.NotEmpty(depsFile["runtimes"][_expectedRid]);
             Assert.All(depsFile["libraries"], item =>
             {
                 var prop = Assert.IsType<JProperty>(item);
@@ -149,24 +93,22 @@ namespace Microsoft.AspNetCore
                 Assert.Empty(lib["sha512"].Value<string>());
             });
 
-            Assert.NotNull(depsFile["libraries"][$"Microsoft.AspNetCore.App/{TestData.GetPackageVersion()}"]);
-            Assert.NotNull(depsFile["libraries"][$"runtime.{_expectedRid}.Microsoft.AspNetCore.App/{TestData.GetPackageVersion()}"]);
-            Assert.Equal(2, depsFile["libraries"].Values().Count());
+            Assert.NotNull(depsFile["libraries"][libraryId]);
+            Assert.Single(depsFile["libraries"].Values());
 
             var targetLibraries = depsFile["targets"][target];
-            Assert.Equal(2, targetLibraries.Values().Count());
-            var metapackage = targetLibraries[$"Microsoft.AspNetCore.App/{TestData.GetPackageVersion()}"];
-            Assert.Null(metapackage["runtime"]);
-            Assert.Null(metapackage["native"]);
-
-            var runtimeLibrary = targetLibraries[$"{ridPackageId}/{TestData.GetPackageVersion()}"];
+            Assert.Single(targetLibraries.Values());
+            var runtimeLibrary = targetLibraries[libraryId];
             Assert.Null(runtimeLibrary["dependencies"]);
             Assert.All(runtimeLibrary["runtime"], item =>
             {
                 var obj = Assert.IsType<JProperty>(item);
-                Assert.StartsWith($"runtimes/{_expectedRid}/lib/{_expectedTfm}/", obj.Name);
-                Assert.NotEmpty(obj.Value["assemblyVersion"].Value<string>());
-                Assert.NotEmpty(obj.Value["fileVersion"].Value<string>());
+                var assemblyVersion = obj.Value["assemblyVersion"].Value<string>();
+                Assert.NotEmpty(assemblyVersion);
+                Assert.True(Version.TryParse(assemblyVersion, out _), $"{assemblyVersion} should deserialize to System.Version");
+                var fileVersion = obj.Value["fileVersion"].Value<string>();
+                Assert.NotEmpty(fileVersion);
+                Assert.True(Version.TryParse(fileVersion, out _), $"{fileVersion} should deserialize to System.Version");
             });
 
             if (_expectedRid.StartsWith("win", StringComparison.Ordinal) && !_expectedRid.Contains("arm"))
@@ -174,7 +116,9 @@ namespace Microsoft.AspNetCore
                 Assert.All(runtimeLibrary["native"], item =>
                 {
                     var obj = Assert.IsType<JProperty>(item);
-                    Assert.StartsWith($"runtimes/{_expectedRid}/native/", obj.Name);
+                    var fileVersion = obj.Value["fileVersion"].Value<string>();
+                    Assert.NotEmpty(fileVersion);
+                    Assert.True(Version.TryParse(fileVersion, out _), $"{fileVersion} should deserialize to System.Version");
                 });
             }
             else
@@ -186,12 +130,12 @@ namespace Microsoft.AspNetCore
         [Fact]
         public void ItContainsVersionFile()
         {
-            var versionFile = Path.Combine(TestData.GetMetadataOutput(), ".version");
+            var versionFile = Path.Combine(_sharedFxRoot, ".version");
             AssertEx.FileExists(versionFile);
             var lines = File.ReadAllLines(versionFile);
             Assert.Equal(2, lines.Length);
             Assert.Equal(TestData.GetRepositoryCommit(), lines[0]);
-            Assert.Equal(TestData.GetPackageVersion(), lines[1]);
+            Assert.Equal(TestData.GetSharedFxVersion(), lines[1]);
         }
     }
 }

+ 79 - 0
src/Framework/test/TargetingPackTests.cs

@@ -0,0 +1,79 @@
+// 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.Collections.Generic;
+using System.IO;
+using System.Linq;
+using Newtonsoft.Json.Linq;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Microsoft.AspNetCore
+{
+    public class TargetingPackTests
+    {
+        private readonly string _expectedRid;
+        private readonly string _targetingPackRoot;
+        private readonly ITestOutputHelper _output;
+
+        public TargetingPackTests(ITestOutputHelper output)
+        {
+            _output = output;
+            _expectedRid = TestData.GetSharedFxRuntimeIdentifier();
+            _targetingPackRoot = Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion"));
+        }
+
+        [Fact]
+        public void PlatformManifestListsAllFiles()
+        {
+            var platformManifestPath = Path.Combine(_targetingPackRoot, "data", "Microsoft.AspNetCore.App.PlatformManifest.txt");
+            var expectedAssemblies = TestData.GetSharedFxDependencies()
+                .Split(';', StringSplitOptions.RemoveEmptyEntries)
+                .ToHashSet();
+
+            _output.WriteLine("==== file contents ====");
+            _output.WriteLine(File.ReadAllText(platformManifestPath));
+            _output.WriteLine("==== expected assemblies ====");
+            _output.WriteLine(string.Join('\n', expectedAssemblies.OrderBy(i => i)));
+
+            AssertEx.FileExists(platformManifestPath);
+
+            var manifestFileLines = File.ReadAllLines(platformManifestPath);
+
+            var actualAssemblies = manifestFileLines
+                .Where(s => !string.IsNullOrEmpty(s))
+                .Select(i =>
+                {
+                    var fileName = i.Split('|')[0];
+                    return fileName.EndsWith(".dll", StringComparison.Ordinal)
+                        ? fileName.Substring(0, fileName.Length - 4)
+                        : fileName;
+                })
+                .ToHashSet();
+
+            var missing = expectedAssemblies.Except(actualAssemblies);
+            var unexpected = actualAssemblies.Except(expectedAssemblies);
+
+            _output.WriteLine("==== missing assemblies from the manifest ====");
+            _output.WriteLine(string.Join('\n', missing));
+            _output.WriteLine("==== unexpected assemblies in the manifest ====");
+            _output.WriteLine(string.Join('\n', unexpected));
+
+            Assert.Empty(missing);
+            Assert.Empty(unexpected);
+
+            Assert.All(manifestFileLines, line =>
+            {
+                var parts = line.Split('|');
+                Assert.Equal(4, parts.Length);
+                Assert.Equal("Microsoft.AspNetCore.App", parts[1]);
+                if (parts[2].Length > 0)
+                {
+                    Assert.True(Version.TryParse(parts[2], out _), "Assembly version must be convertable to System.Version");
+                }
+                Assert.True(Version.TryParse(parts[3], out _), "File version must be convertable to System.Version");
+            });
+        }
+    }
+}

+ 1 - 5
src/Framework/test/TestData.cs

@@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore
 {
     public class TestData
     {
-        public static string GetPackageVersion() => GetTestDataValue("PackageVersion");
+        public static string GetSharedFxVersion() => GetTestDataValue("SharedFxVersion");
 
         public static string GetMicrosoftNETCoreAppPackageVersion() => GetTestDataValue("MicrosoftNETCoreAppPackageVersion");
 
@@ -18,10 +18,6 @@ namespace Microsoft.AspNetCore
 
         public static string GetSharedFxDependencies() => GetTestDataValue("SharedFxDependencies");
 
-        public static string GetMetadataOutput() => GetTestDataValue("MetadataOutputPath");
-
-        public static string GetManifestOutputDir() => GetTestDataValue("ManifestOutputDir");
-
         public static string GetTestDataValue(string key)
              => typeof(TestData).Assembly.GetCustomAttributes<TestDataAttribute>().Single(d => d.Key == key).Value;
     }

+ 0 - 51
src/Installers/Archive/Archive.Internal.zipproj

@@ -1,51 +0,0 @@
-<!--
-  This archive should only contain the ASP.NET Core shared runtime and is intended for internal-use only.
-  For example, this .zip is used to handoff bits to partner teams who then incorporate our shared frameworks
-  into their installers or redist's.
--->
-<Project>
-
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
-
-  <PropertyGroup>
-    <!-- Use a short folder name to avoid MAX_PATH issues on Windows -->
-    <IntermediateOutputPath>$(ArtifactsObjDir)ai\$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
-    <OutputFileName>$(InternalInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</OutputFileName>
-    <OutputPath>$(InstallersOutputPath)</OutputPath>
-    <TargetPath>$(InstallersOutputPath)$(OutputFileName)</TargetPath>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
-      <OutputItemType>_ResolvedFxProjects</OutputItemType>
-    </ProjectReference>
-  </ItemGroup>
-
-  <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
-
-  <Target Name="GetTargetPath" Returns="$(TargetPath)" />
-
-  <Target Name="Build" DependsOnTargets="ResolveProjectReferences;GetTargetPath">
-    <MakeDir Directories="$(OutputPath);$(IntermediateOutputPath)" />
-
-    <ItemGroup>
-      <SharedFxAssetFolder Include="%(_ResolvedFxProjects.InstallerAssetPaths)" SharedFxName="%(_ResolvedFxProjects.SharedFxName)" />
-      <FileToZip Include="%(SharedFxAssetFolder.Identity)\**\*">
-        <DestinationDir>$(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\</DestinationDir>
-      </FileToZip>
-    </ItemGroup>
-
-    <Copy SourceFiles="@(FileToZip)" DestinationFiles="@(FileToZip->'%(DestinationDir)%(RecursiveDir)%(FileName)%(Extension)')" />
-
-    <Exec Condition="'$(ArchiveExtension)' == '.tar.gz'"
-      Command="tar -czf $(TargetPath) -C $(IntermediateOutputPath) ." />
-
-    <ZipDirectory Condition="'$(ArchiveExtension)' == '.zip'"
-      DestinationFile="$(TargetPath)"
-      SourceDirectory="$(IntermediateOutputPath)"
-      Overwrite="true" />
-  </Target>
-
-</Project>

+ 0 - 110
src/Installers/Archive/Archive.Redist.zipproj

@@ -1,110 +0,0 @@
-<!--
-  This archive contains everything necessary to use the ASP.NET Core shared runtime,
-  including binaries from the base .NET Core runtime and the dotnet.exe muxer.
--->
-<Project>
-
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
-
-  <PropertyGroup>
-    <!-- Use a short folder name to avoid MAX_PATH issues on Windows -->
-    <BaseIntermediateOutputPath>$(ArtifactsObjDir)ar\</BaseIntermediateOutputPath>
-    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
-    <OutputFileName>$(RuntimeInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</OutputFileName>
-    <OutputPath>$(InstallersOutputPath)</OutputPath>
-    <TargetPath>$(InstallersOutputPath)$(OutputFileName)</TargetPath>
-    <DotNetRuntimeArchiveFileName>dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</DotNetRuntimeArchiveFileName>
-    <DotNetRuntimeDownloadUrl>$(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppPackageVersion)/$(DotNetRuntimeArchiveFileName)</DotNetRuntimeDownloadUrl>
-    <DotNetRuntimeArchive>$(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName)</DotNetRuntimeArchive>
-    <!-- This file is used by the dotnet/core-sdk to determine if our shared framework aligns with the version they pull. -->
-    <BaseRuntimeVersionFileName>aspnetcore_base_runtime.version</BaseRuntimeVersionFileName>
-    <BaseRuntimeVersionFileOutputPath>$(OutputPath)$(BaseRuntimeVersionFileName)</BaseRuntimeVersionFileOutputPath>
-    <!-- This file can be used in READMEs or other webpages -->
-    <SvgBadgeFileName>aspnetcore-runtime-$(TargetRuntimeIdentifier)-version-badge.svg</SvgBadgeFileName>
-    <SvgBadgeOutputPath>$(OutputPath)$(SvgBadgeFileName)</SvgBadgeOutputPath>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
-      <OutputItemType>_ResolvedFxProjects</OutputItemType>
-    </ProjectReference>
-  </ItemGroup>
-
-  <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
-
-  <Target Name="GetTargetPath" Returns="$(TargetPath)" />
-
-  <Target Name="PrepareForBuild">
-    <MakeDir Directories="$(OutputPath);$(IntermediateOutputPath)" />
-  </Target>
-
-  <Target Name="GenerateMetadataFiles" DependsOnTargets="PrepareForBuild">
-    <!--
-      Used by the dotnet/core-sdk build to determine which version of Microsoft.NETCore.App is used.
-    -->
-    <WriteLinesToFile File="$(BaseRuntimeVersionFileOutputPath)" Lines="$(MicrosoftNETCoreAppPackageVersion)" Overwrite="true" />
-
-    <PropertyGroup>
-      <SvgBadgeLabel>version</SvgBadgeLabel>
-      <SvgBadgeValue>$(PackageVersion)</SvgBadgeValue>
-      <SvgBadgeColor>#007EC6</SvgBadgeColor>
-      <SvgBadgeWidth>$([MSBuild]::Add(56, $([MSBuild]::Multiply($(PackageVersion.Length), 6.67))))</SvgBadgeWidth>
-      <SvgBadgeContent>
-<![CDATA[
-<svg xmlns="http://www.w3.org/2000/svg" width="$(SvgBadgeWidth)" height="20">
-    <g>
-        <rect width="$(SvgBadgeWidth)" height="20" rx="0" fill="#007EC6" />
-        <rect width="52" height="20" rx="0" fill="#555"  />
-    </g>
-    <g fill="#fff" text-anchor="left" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
-        <text x="6" y="15" fill="#010101" fill-opacity=".3">$(SvgBadgeLabel)</text>
-        <text x="6" y="14">$(SvgBadgeLabel)</text>
-        <text x="60" y="15" fill="#010101" fill-opacity=".3">$(SvgBadgeValue)</text>
-        <text x="60" y="14">$(SvgBadgeValue)</text>
-    </g>
-</svg>
-]]>
-      </SvgBadgeContent>
-    </PropertyGroup>
-
-    <WriteLinesToFile File="$(SvgBadgeOutputPath)" Lines="$(SvgBadgeContent)" Overwrite="true" />
-  </Target>
-
-  <Target Name="Build" DependsOnTargets="PrepareForBuild;ResolveProjectReferences;GetTargetPath;GenerateMetadataFiles">
-    <DownloadFile Condition=" ! Exists('$(DotNetRuntimeArchive)')"
-      SourceUrl="$(DotNetRuntimeDownloadUrl)$(DotNetAssetRootAccessTokenSuffix)"
-      DestinationFolder="$(BaseIntermediateOutputPath)"
-      DestinationFileName="$(DotNetRuntimeArchiveFileName)" />
-
-    <ItemGroup>
-      <SharedFxAssetFolder Include="%(_ResolvedFxProjects.InstallerAssetPaths)" SharedFxName="%(_ResolvedFxProjects.SharedFxName)" />
-      <FileToZip Include="%(SharedFxAssetFolder.Identity)\**\*">
-        <DestinationDir>$(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\</DestinationDir>
-      </FileToZip>
-    </ItemGroup>
-
-    <!-- Extract the dotnet-runtime archive -->
-    <Exec Condition="'$(ArchiveExtension)' == '.tar.gz'"
-      Command="tar -xzf $(DotNetRuntimeArchive) -C $(IntermediateOutputPath)" />
-
-    <Unzip Condition="'$(ArchiveExtension)' == '.zip'"
-      SourceFiles="$(DotNetRuntimeArchive)"
-      DestinationFolder="$(IntermediateOutputPath)"
-      OverwriteReadOnlyFiles="true" />
-
-    <Copy SourceFiles="@(FileToZip)" DestinationFiles="@(FileToZip->'%(DestinationDir)%(RecursiveDir)%(FileName)%(Extension)')" />
-
-    <!-- Zip up all contents of the archive. -->
-
-    <Exec Condition="'$(ArchiveExtension)' == '.tar.gz'"
-      Command="tar -czf $(TargetPath) -C $(IntermediateOutputPath) ." />
-
-    <ZipDirectory Condition="'$(ArchiveExtension)' == '.zip'"
-      DestinationFile="$(TargetPath)"
-      SourceDirectory="$(IntermediateOutputPath)"
-      Overwrite="true" />
-  </Target>
-
-</Project>

+ 0 - 2
src/Installers/Debian/Directory.Build.props

@@ -10,8 +10,6 @@
   <PropertyGroup>
     <OutputPath>$(InstallersOutputPath)</OutputPath>
     <IntermediateOutputPath>$(IntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
-    <!-- Must be named "package_root/". This is expected by the build.sh script in the tools folder. -->
-    <IntermediatePackageRoot>$(IntermediateOutputPath)package_root\</IntermediatePackageRoot>
 
     <!-- Installer settings -->
     <DebianPackageInstallRoot>/usr/share/dotnet</DebianPackageInstallRoot>

+ 4 - 3
src/Installers/Debian/Directory.Build.targets

@@ -12,9 +12,10 @@
   </PropertyGroup>
 
   <Target Name="PrepareForBuild">
-    <Error Text="Currently only linux-x64 is supported by Debian installers." Condition=" '$(TargetRuntimeIdentifier)' != 'linux-x64' " />
+    <MakeDir Directories="$(IntermediateOutputPath);$(OutputPath)" />
 
-    <MakeDir Directories="$(IntermediateOutputPath);$(IntermediatePackageRoot);$(OutputPath)" />
+    <Error Text="Currently only linux-x64 is supported by Debian installers." Condition=" '$(TargetRuntimeIdentifier)' != 'linux-x64' " />
+    <Error Text="Missing required property: PackageContentRoot" Condition=" '$(PackageContentRoot)' == '' " />
   </Target>
 
   <Target Name="GetTargetPath" Returns="$(TargetPath)" />
@@ -47,7 +48,7 @@
 
     <!-- Build SharedFx Bundle Deb package -->
 
-    <Exec Command="$(DebianBuildScript) -i '$(IntermediateOutputPath)' -o '$(IntermediateOutputPath)out/'" />
+    <Exec Command="$(DebianBuildScript) -i '$(IntermediateOutputPath)' -o '$(IntermediateOutputPath)out/' -C '$(PackageContentRoot)'" />
 
     <PropertyGroup>
       <BuildScriptOutputFileName>$(PackageId)_$(PackageVersion)-$(PackageRevision)_$(DebianPackageArch).deb</BuildScriptOutputFileName>

+ 3 - 20
src/Installers/Debian/Runtime/Debian.Runtime.debproj

@@ -6,6 +6,7 @@
 
   <PropertyGroup>
     <TargetFileName>$(RuntimeInstallerBaseName)-$(SharedFxVersion)-x64.deb</TargetFileName>
+    <PackageContentRoot>$(SharedFrameworkLayoutRoot)</PackageContentRoot>
 
     <!-- CLI would take a dependency such as 'aspnetcore-runtime-M.N >= M.N.P'. Here M.N is part of the id and M.N.P is the PackageVersion -->
     <PackageId>$(RuntimeInstallerBaseName)-$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</PackageId>
@@ -28,29 +29,11 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <ProjectReference Include="..\..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
+    <ProjectReference Include="..\..\..\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj">
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
       <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
-      <OutputItemType>_ResolvedFxProjects</OutputItemType>
     </ProjectReference>
   </ItemGroup>
 
   <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
-
-  <PropertyGroup>
-    <DebBuildDependsOn>$(DebBuildDependsOn);LayoutSharedFramework</DebBuildDependsOn>
-  </PropertyGroup>
-
-  <Target Name="LayoutSharedFramework" DependsOnTargets="PrepareForBuild;ResolveProjectReferences">
-    <!-- Layout files in package_root/ for the build.sh script. -->
-    <ItemGroup>
-      <SharedFxAssetFolder Include="%(_ResolvedFxProjects.InstallerAssetPaths)" SharedFxName="%(_ResolvedFxProjects.SharedFxName)" />
-      <PackageFiles Include="%(SharedFxAssetFolder.Identity)\**\*" Condition="'%(SharedFxAssetFolder.Identity)' != ''">
-        <DestinationDir>$(IntermediatePackageRoot)shared\%(SharedFxAssetFolder.SharedFxName)\$(SharedFxVersion)\</DestinationDir>
-      </PackageFiles>
-    </ItemGroup>
-
-    <Copy SourceFiles="@(PackageFiles)"
-          DestinationFiles="@(PackageFiles->'%(DestinationDir)%(RecursiveDir)%(FileName)%(Extension)')"
-          UseHardlinksIfPossible="true" />
-  </Target>
 </Project>

+ 2 - 12
src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj

@@ -6,6 +6,8 @@
 
   <PropertyGroup>
     <TargetFileName>$(TargetingPackInstallerBaseName)-$(TargetingPackVersion).deb</TargetFileName>
+    <PackageContentRoot>$(TargetingPackLayoutRoot)</PackageContentRoot>
+
     <!-- CLI would take a dependency such as 'aspnetcore-targeting-pack-M.N >= M.N.P'. Here M.N is part of the id and M.N.P is the PackageVersion -->
     <PackageId>$(TargetingPackInstallerBaseName)-$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</PackageId>
 
@@ -19,7 +21,6 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <!-- This is here to enforce build order. -->
     <ProjectReference Include="..\..\..\Framework\ref\Microsoft.AspNetCore.App.Ref.csproj">
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
       <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
@@ -29,19 +30,8 @@
   <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
 
   <PropertyGroup>
-    <DebBuildDependsOn>$(DebBuildDependsOn);LayoutTargetingPack</DebBuildDependsOn>
     <!-- Suppresses building this project completely during servicing builds. -->
     <DebBuildDependsOn Condition="'$(IsTargetingPackBuilding)' == 'false'" />
   </PropertyGroup>
 
-  <Target Name="LayoutTargetingPack" DependsOnTargets="PrepareForBuild;ResolveProjectReferences">
-    <!-- Layout files in package_root/ for the build.sh script. -->
-    <ItemGroup>
-      <PackageFiles Include="$(TargetingPackLayoutRoot)**\*" />
-    </ItemGroup>
-
-    <Copy SourceFiles="@(PackageFiles)"
-          DestinationFolder="$(IntermediatePackageRoot)"
-          UseHardlinksIfPossible="true" />
-  </Target>
 </Project>

+ 22 - 16
src/Installers/Debian/tools/build.sh

@@ -26,7 +26,7 @@ execute(){
     package_all
     generate_all
     create_source_tarball
-    
+
     # Actually Build Package Files
     (cd ${PACKAGE_SOURCE_DIR}; debuild -us -uc)
 
@@ -36,7 +36,7 @@ execute(){
 parse_args_and_set_env_vars(){
     OPTIND=1 # Reset in case getopts has been used previously in the shell.
 
-    while getopts ":n:v:i:o:h" opt; do
+    while getopts ":n:v:i:o:h:C:" opt; do
       case $opt in
         n)
           export PACKAGE_NAME="$OPTARG"
@@ -47,6 +47,9 @@ parse_args_and_set_env_vars(){
         i)
           export INPUT_DIR="$OPTARG"
           ;;
+        C)
+          export CONTENT_DIR="$OPTARG"
+          ;;
         o)
           export OUTPUT_DIR="$OPTARG"
           ;;
@@ -64,21 +67,22 @@ parse_args_and_set_env_vars(){
           ;;
       esac
     done
-    
+
      # Special Input Directories + Paths
     ABSOLUTE_PLACEMENT_DIR="${INPUT_DIR}/\$"
-    PACKAGE_ROOT_PLACEMENT_DIR="${INPUT_DIR}/package_root"
+    PACKAGE_ROOT_PLACEMENT_DIR="${CONTENT_DIR}"
     CONFIG="$INPUT_DIR/debian_config.json"
 
     return 0
 }
 
 print_help(){
-    echo "Usage: package_tool [-i <INPUT_DIR>] [-o <OUTPUT_DIRECTORY>] 
+    echo "Usage: package_tool [-i <INPUT_DIR>] [-o <OUTPUT_DIRECTORY>]
     [-n <PACKAGE_NAME>] [-v <PACKAGE_VERSION>] [-h]
 
     REQUIRED:
         -i <INPUT_DIR>: Input directory conforming to package_tool conventions and debian_config.json
+        -C <CONTENT_DIR>: Directory containing the files which should be packaged.
         -o <OUTPUT_DIR>: Output directory for debian package and other artifacts
 
     OPTIONAL:
@@ -104,9 +108,11 @@ validate_inputs(){
         ret=1
     fi
 
-    if [[ ! -d "$PACKAGE_ROOT_PLACEMENT_DIR" ]]; then
-        echo "ERROR: package_root directory does not exist"
-        echo $PACKAGE_ROOT_PLACEMENT_DIR
+    if [[ -z "$CONTENT_DIR" ]]; then
+        echo "ERROR: -C <CONTENT_DIR> Not Specified."
+        ret=1
+    elif [[ ! -d "$PACKAGE_ROOT_PLACEMENT_DIR" ]]; then
+        echo "ERROR: '$PACKAGE_ROOT_PLACEMENT_DIR' directory does not exist"
         ret=1
     fi
 
@@ -115,13 +121,13 @@ validate_inputs(){
         echo $CONFIG
         ret=1
     fi
-    
+
     return $ret
 }
 
 parse_config_and_set_env_vars(){
     extract_base_cmd="python $SCRIPT_DIR/scripts/extract_json_value.py"
-    
+
     # Arguments Take Precedence over Config
     [ -z "$PACKAGE_VERSION" ] && PACKAGE_VERSION="$($extract_base_cmd $CONFIG "release.package_version")"
     [ -z "$PACKAGE_NAME" ] && PACKAGE_NAME="$($extract_base_cmd $CONFIG "package_name")"
@@ -152,7 +158,7 @@ package_all(){
     package_absolute_placement
     package_samples
     package_docs
-    package_install_scripts 
+    package_install_scripts
 }
 
 generate_all(){
@@ -187,18 +193,18 @@ package_package_root_placement(){
 package_absolute_placement(){
     if [[ -d "$ABSOLUTE_PLACEMENT_DIR" ]]; then
         abs_in_package_dir="\$"
-    
+
         add_dir_to_install ${ABSOLUTE_PLACEMENT_DIR} $abs_in_package_dir
-    
+
         # Get List of all files in directory tree, relative to ABSOLUTE_PLACEMENT_DIR
         abs_files=( $(_get_files_in_dir_tree $ABSOLUTE_PLACEMENT_DIR) )
-    
+
         # For each file add a a system placement
         for abs_file in ${abs_files[@]}
         do
             parent_dir=$(dirname $abs_file)
             filename=$(basename $abs_file)
-    
+
             add_system_file_placement "$abs_in_package_dir/$abs_file" "/$parent_dir"
         done
     fi
@@ -232,7 +238,7 @@ generate_config_templates(){
 generate_manpages(){
     if [[ -f "$DOCS_JSON_PATH" ]]; then
         mkdir -p $DOCS_DIR
-        
+
         # Generate the manpages from json spec
         python ${SCRIPT_DIR}/scripts/manpage_generator.py ${DOCS_JSON_PATH} ${DOCS_DIR}
     fi

+ 0 - 15
src/Installers/Directory.Build.props

@@ -1,15 +0,0 @@
-<Project>
-
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
-
-  <PropertyGroup>
-    <RuntimeInstallerBaseName>aspnetcore-runtime</RuntimeInstallerBaseName>
-    <TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
-    <!-- Name = aspnet-runtime-internal for files are only produced so we can hand them off to the dotnet/cli repo. -->
-    <InternalInstallerBaseName>$(RuntimeInstallerBaseName)-internal</InternalInstallerBaseName>
-
-    <ArchiveExtension>.tar.gz</ArchiveExtension>
-    <ArchiveExtension Condition="'$(TargetOsName)' == 'win'">.zip</ArchiveExtension>
-  </PropertyGroup>
-
-</Project>

+ 3 - 3
src/Installers/Rpm/Directory.Build.targets

@@ -16,12 +16,12 @@
   <Target Name="GetTargetPath" Returns="$(TargetPath)" />
 
   <Target Name="PrepareForBuild">
-    <MakeDir Directories="$(IntermediateOutputPath);$(IntermediatePackageRoot)" />
+    <MakeDir Directories="$(IntermediateOutputPath)" />
 
     <Error Text="Currently only linux-x64 is supported by Rpm installers." Condition=" '$(TargetRuntimeIdentifier)' != 'linux-x64' " />
 
     <Error Text="Missing required property: RpmPackageInstallRoot" Condition=" '$(RpmPackageInstallRoot)' == '' " />
-    <Error Text="Missing required property: IntermediatePackageRoot" Condition=" '$(IntermediatePackageRoot)' == '' " />
+    <Error Text="Missing required property: PackageContentRoot" Condition=" '$(PackageContentRoot)' == '' " />
   </Target>
 
   <PropertyGroup>
@@ -72,7 +72,7 @@
       <FpmArgs Include="--license;$(PackageLicenseType)" />
       <FpmArgs Include="--url;$(PackageProjectUrl)" />
       <FpmArgs Include="--directories;%(InstallerOwnedDirectory.Identity)" Condition=" '%(InstallerOwnedDirectory.Identity)' != '' " />
-      <FpmArgs Include="$(IntermediatePackageRoot)=$(RpmPackageInstallRoot)" />
+      <FpmArgs Include="$(PackageContentRoot)=$(RpmPackageInstallRoot)" />
     </ItemGroup>
 
     <Run FileName="fpm" Arguments="@(FpmArgs)" />

+ 3 - 21
src/Installers/Rpm/Rpm.Runtime.Common.targets

@@ -14,34 +14,16 @@
     <PackageSummary>$(SharedFxProductName)</PackageSummary>
     <PackageDescription>$(SharedFxDescription)</PackageDescription>
 
-    <IntermediatePackageRoot>$(IntermediateOutputPath)content\</IntermediatePackageRoot>
+    <PackageContentRoot>$(SharedFrameworkLayoutRoot)</PackageContentRoot>
   </PropertyGroup>
 
   <ItemGroup>
-    <ProjectReference Include="$(MSBuildThisFileDirectory)..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
+    <ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj">
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
       <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
-      <OutputItemType>_ResolvedFxProjects</OutputItemType>
     </ProjectReference>
 
     <InstallerOwnedDirectory Include="$(RpmPackageInstallRoot)shared/Microsoft.AspNetCore.App" />
     <RpmDependency Include="dotnet-runtime-$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)" Version="$(MicrosoftNETCoreAppPackageVersion.Split('-')[0])" />
   </ItemGroup>
-
-  <PropertyGroup>
-    <RpmBuildDependsOn>$(RpmBuildDependsOn);LayoutSharedFramework;</RpmBuildDependsOn>
-  </PropertyGroup>
-
-  <Target Name="LayoutSharedFramework" DependsOnTargets="PrepareForBuild;ResolveProjectReferences">
-    <ItemGroup>
-      <SharedFxAssetFolder Include="%(_ResolvedFxProjects.InstallerAssetPaths)" SharedFxName="%(_ResolvedFxProjects.SharedFxName)" />
-      <PackageFiles Include="%(SharedFxAssetFolder.Identity)\**\*">
-        <DestinationDir>$(IntermediatePackageRoot)shared\%(SharedFxAssetFolder.SharedFxName)\$(SharedFxVersion)\</DestinationDir>
-      </PackageFiles>
-    </ItemGroup>
-
-    <Copy SourceFiles="@(PackageFiles)"
-          DestinationFiles="@(PackageFiles->'%(DestinationDir)%(RecursiveDir)%(FileName)%(Extension)')"
-          UseHardlinksIfPossible="true" />
-  </Target>
-
 </Project>

+ 1 - 1
src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj

@@ -5,7 +5,7 @@
     <RpmPackageInstallRoot>/usr/share/dotnet/</RpmPackageInstallRoot>
     <TargetFileName>$(TargetingPackInstallerBaseName)-$(TargetingPackVersion)-x64.rpm</TargetFileName>
 
-    <IntermediatePackageRoot>$(TargetingPackLayoutRoot)</IntermediatePackageRoot>
+    <PackageContentRoot>$(TargetingPackLayoutRoot)</PackageContentRoot>
 
     <!-- installer versions -->
     <!-- CLI would take a dependency such as 'aspnetcore-targeting-pack-M.N >= M.N.P'. Here M.N is the part of the id and M.N.P is the package version -->

+ 1 - 0
src/ProjectTemplates/test/GenerateTestProps.targets

@@ -7,6 +7,7 @@
         MicrosoftNETCorePlatformsPackageVersion=$(MicrosoftNETCorePlatformsPackageVersion);
         MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion);
         MicrosoftAspNetCoreAppPackageVersion=$(SharedFxVersion);
+        SupportedRuntimeIdentifiers=$(SupportedRuntimeIdentifiers);
       </PropsProperties>
     </PropertyGroup>
 

+ 4 - 0
src/ProjectTemplates/test/ProjectTemplates.Tests.csproj

@@ -27,6 +27,10 @@
   </ItemGroup>
 
   <ItemGroup>
+    <ProjectReference Include="$(RepositoryRoot)src\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj">
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
+    </ProjectReference>
     <ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
     <ProjectReference Include="../testassets/DotNetToolsInstaller/DotNetToolsInstaller.csproj" ReferenceOutputAssembly="false" />
     <ProjectReference Include="../Web.Client.ItemTemplates/Microsoft.DotNet.Web.Client.ItemTemplates.csproj" ReferenceOutputAssembly="false" />

+ 4 - 1
src/ProjectTemplates/test/TemplateTests.props.in

@@ -17,7 +17,10 @@
       Update="Microsoft.AspNetCore.App"
       DefaultRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppPackageVersion}"
       LatestRuntimeFrameworkVersion="${MicrosoftAspNetCoreAppPackageVersion}"
-      TargetingPackVersion="${MicrosoftAspNetCoreAppPackageVersion}" />
+      TargetingPackName="Microsoft.AspNetCore.App.Ref"
+      TargetingPackVersion="${MicrosoftAspNetCoreAppPackageVersion}"
+      RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
+      RuntimePackRuntimeIdentifiers="${SupportedRuntimeIdentifiers}" />
   </ItemGroup>
 
   <ItemGroup Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true' OR '$(RazorSdkCurrentVersionProps)' != ''">

+ 1 - 1
src/SignalR/clients/ts/signalr-protocol-msgpack/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@aspnet/signalr-protocol-msgpack",
-  "version": "3.0.0-preview3-t000",
+  "version": "3.0.0-preview4-t000",
   "description": "MsgPack Protocol support for ASP.NET Core SignalR",
   "main": "./dist/cjs/index.js",
   "module": "./dist/esm/index.js",

+ 1 - 1
src/SignalR/clients/ts/signalr/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@aspnet/signalr",
-  "version": "3.0.0-preview3-t000",
+  "version": "3.0.0-preview4-t000",
   "description": "ASP.NET Core SignalR Client",
   "main": "./dist/cjs/index.js",
   "module": "./dist/esm/index.js",

+ 2 - 5
src/SiteExtensions/LoggingBranch/LoggingBranch.csproj

@@ -29,14 +29,11 @@
 
     <PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
 
-    <ProjectReference Include="..\..\Framework\pkg\Microsoft.AspNetCore.App.pkgproj">
-      <Targets>Pack</Targets>
+    <ProjectReference Include="..\..\Framework\ref\Microsoft.AspNetCore.App.Ref.csproj">
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
       <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
     </ProjectReference>
-
-     <ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
-      <Targets>Pack</Targets>
+    <ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj">
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
       <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
     </ProjectReference>

+ 5 - 2
src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj

@@ -11,7 +11,7 @@
     <PackageTags>aspnetcore;AzureSiteExtension</PackageTags>
     <PackageId>AspNetCoreRuntime.$(TrimmedVersion).$(TargetArchitecture)</PackageId>
     <NoPackageAnalysis>true</NoPackageAnalysis>
-    <DotNetUnpackFolder>$(ArtifactsObjDir)ar\$(TargetRuntimeIdentifier)\</DotNetUnpackFolder>
+    <DotNetUnpackFolder>$(RedistSharedFrameworkLayoutRoot)</DotNetUnpackFolder>
     <IsShippingPackage>true</IsShippingPackage>
   </PropertyGroup>
 
@@ -25,7 +25,10 @@
   <ItemGroup>
     <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" />
+    <ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.Runtime.csproj">
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+      <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
+    </ProjectReference>
 
     <NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="$(TargetArchitecture)" />
     <NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" Platform="$(TargetArchitecture)" />