diff --git a/Directory.Build.props b/Directory.Build.props
index 07e500124b..b49a722dc7 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -30,6 +30,15 @@
$(Product) $(PackageVersion) Shared Framework
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.
+
+ aspnetcore-runtime
+ aspnetcore-targeting-pack
+
+ $(RuntimeInstallerBaseName)-internal
@@ -61,7 +70,7 @@
false
- true
+ true
@@ -94,7 +103,7 @@
- true
+ true
true
@@ -179,6 +188,13 @@
true
$(ArtifactsObjDir)TargetingPack.Layout\$(Configuration)\
+
+ $(ArtifactsObjDir)SharedFx.Layout\$(Configuration)\$(TargetRuntimeIdentifier)\
+
+ $(ArtifactsObjDir)RedistSharedFx.Layout\$(Configuration)\$(TargetRuntimeIdentifier)\
+
+ .tar.gz
+ .zip
diff --git a/Directory.Build.targets b/Directory.Build.targets
index f4c001068d..4623263e54 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -8,6 +8,11 @@
-->
false
+
+ false
+
$(ArtifactsShippingPackagesDir)
$(ArtifactsNonShippingPackagesDir)
diff --git a/build/CodeSign.targets b/build/CodeSign.targets
index e3b5a47269..96fffe035b 100644
--- a/build/CodeSign.targets
+++ b/build/CodeSign.targets
@@ -15,7 +15,7 @@
- $(ArtifactsDir)obj\ar\
+ $(ArtifactsDir)obj\RedistSharedFx.Layout\$(Configuration)\
$(BaseRedistNetCorePath)$(TargetRuntimeIdentifier)\
diff --git a/build/SharedFx.targets b/build/SharedFx.targets
index 27eb7e65b3..a616306a70 100644
--- a/build/SharedFx.targets
+++ b/build/SharedFx.targets
@@ -1,17 +1,10 @@
- $(RepositoryRoot)src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj
- $([MSBuild]::NormalizePath($(UnitTestFxProject)))
- _BuildSharedFxProjects;TestSharedFx
+ _BuildSharedFxProjects;RemoveSharedFrameworkOnlyRefsFromNuspec
$(BuildSharedFxDependsOn);CodeSign
-
-
-
-
-
@@ -21,7 +14,7 @@
-
+
<_RestoreGraphProjectInput>@(FxProjectToBuild)
@@ -42,35 +35,4 @@
SkipNonexistentTargets="true" />
-
-
-
-
- $(LogOutputDir)SharedFx-UnitTests-$(PackageVersion)-$(TargetRuntimeIdentifier).trx
-
- $(UnitTestFxTrxLogFile)
- $(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/repo.props b/build/repo.props
index 87c9fbb6f9..f453c3c5c8 100644
--- a/build/repo.props
+++ b/build/repo.props
@@ -147,6 +147,7 @@
$(PackageDependsOn);BuildSharedFx;RemoveSharedFrameworkOnlyRefsFromNuspec
+ $(PackageDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec;BuildSharedFx
$(TestDependsOn);Compile
diff --git a/build/tasks/GenerateRestoreSourcesPropsFile.cs b/build/tasks/GenerateRestoreSourcesPropsFile.cs
deleted file mode 100644
index 2d27ba4e6a..0000000000
--- a/build/tasks/GenerateRestoreSourcesPropsFile.cs
+++ /dev/null
@@ -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;
- }
- }
-}
diff --git a/build/tasks/GenerateSharedFrameworkDepsFile.cs b/build/tasks/GenerateSharedFrameworkDepsFile.cs
index 97bec5ca78..a4022e7491 100644
--- a/build/tasks/GenerateSharedFrameworkDepsFile.cs
+++ b/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();
var nativeFiles = new List();
var resourceAssemblies = new List();
+ var platformManifest = new List();
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());
Directory.CreateDirectory(Path.GetDirectoryName(DepsFilePath));
+ Directory.CreateDirectory(Path.GetDirectoryName(PlatformManifestOutputPath));
+
+ File.WriteAllText(
+ PlatformManifestOutputPath,
+ string.Join("\n", platformManifest.OrderBy(n => n)),
+ Encoding.UTF8);
try
{
diff --git a/build/tasks/GenerateSharedFrameworkMetadataFiles.cs b/build/tasks/GenerateSharedFrameworkMetadataFiles.cs
deleted file mode 100644
index 9105cbbb5a..0000000000
--- a/build/tasks/GenerateSharedFrameworkMetadataFiles.cs
+++ /dev/null
@@ -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();
- var nativeFiles = new List();
- var resourceAssemblies = new List();
- var platformManifest = new List();
-
- 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(),
- hashPath: null,
- path: $"{runtimePackageName.ToLowerInvariant()}/{FrameworkVersion}",
- serviceable: true);
-
- var targetingPackLibrary = new RuntimeLibrary("package",
- FrameworkName,
- FrameworkVersion,
- string.Empty,
- Array.Empty(),
- Array.Empty(),
- 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(),
- 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);
- }
- }
- }
-}
diff --git a/build/tasks/RepoTasks.tasks b/build/tasks/RepoTasks.tasks
index c7160bfd92..39f085fd04 100644
--- a/build/tasks/RepoTasks.tasks
+++ b/build/tasks/RepoTasks.tasks
@@ -3,10 +3,8 @@
<_RepoTaskAssembly>$(MSBuildThisFileDirectory)bin\publish\RepoTasks.dll
-
-
diff --git a/build/tasks/RuntimeGraphManager.cs b/build/tasks/RuntimeGraphManager.cs
deleted file mode 100644
index 82f373ef8d..0000000000
--- a/build/tasks/RuntimeGraphManager.cs
+++ /dev/null
@@ -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 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 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;
- }
- }
- }
- }
-}
diff --git a/docs/ProjectProperties.md b/docs/ProjectProperties.md
index 939c7c8bcd..a05fa69bde 100644
--- a/docs/ProjectProperties.md
+++ b/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)
\ No newline at end of file
+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`).
diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets
index 1e710ba8f8..f67d97dce2 100644
--- a/eng/targets/ResolveReferences.targets
+++ b/eng/targets/ResolveReferences.targets
@@ -126,6 +126,11 @@
Text="Cannot reference "%(_InvalidReferenceToNonSharedFxAssembly.Identity)". This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />
+
+
+
+
-
- $(RestoreSources);
- $(ArtifactsShippingPackagesDir);
- $(ArtifactsNonShippingPackagesDir)
-
+
+ Microsoft.AspNetCore.App.PlatformManifest.txt
+ $(ArtifactsObjDir)$(PlatformManifestFileName)
+
diff --git a/src/Framework/pkg/Metapackage.targets b/src/Framework/pkg/Metapackage.targets
deleted file mode 100644
index d8831bbf4d..0000000000
--- a/src/Framework/pkg/Metapackage.targets
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
- false
-
- false
-
- false
-
- true
-
- false
-
-
- true
-
- $(MSBuildProjectName)
- $(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(PackageId)
-
-
-
-
-
-
-
-
-
- <_SupportedRids Include="$(SupportedRuntimeIdentifiers)" />
-
-
-
-
-
-{
- "runtimes": {
- @(_SupportedRids->'"%(Identity)": { "$(PackageId)": { "runtime.%(Identity).$(PackageId)": "$(PackageVersion)" } }', ',%0A ')
- }
-}
-
-
-
-
-
-
-
-
-
- <_AspNetAppPackageConflictOverrides Include="@(AspNetCoreAppReference->'%(Identity)|%(Version)')" Condition=" '%(AspNetCoreAppReference.Version)' != '' " />
- <_AspNetAppPackageConflictOverrides Include="@(AspNetCoreAppReferenceAndPackage->'%(Identity)|%(Version)')" Condition=" '%(AspNetCoreAppReferenceAndPackage.Version)' != '' " />
- <_AspNetAppPackageConflictOverrides Include="@(ExternalAspNetCoreAppReference->'%(Identity)|%(Version)')" Condition=" '%(ExternalAspNetCoreAppReference.Version)' != '' " />
-
-
-
-
-
-
-
-
-
-
-
-
-
- @(_AspNetAppPackageConflictOverrides, '%3B%0A ')%3B
-
-
-
-
-]]>
-
-
-
-
-
-
-
-
-
- ref/$(TargetFramework)/%(ReferencePath.FileName)%(ReferencePath.Extension)
-
-
- build/$(TargetFramework)/Microsoft.AspNetCore.App.PlatformManifest.txt
-
-
- build/$(TargetFramework)/Microsoft.AspNetCore.App.props
-
-
-
-
-
-
-
-
diff --git a/src/Framework/pkg/Microsoft.AspNetCore.App.pkgproj b/src/Framework/pkg/Microsoft.AspNetCore.App.pkgproj
deleted file mode 100644
index 13cf74ed9e..0000000000
--- a/src/Framework/pkg/Microsoft.AspNetCore.App.pkgproj
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
- true
- $(MSBuildProjectName).Pkg
-
-
- false
-
-
-
-
-
- netcoreapp3.0
- aspnetcore
- true
- 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.
-
- true
-
-
-
-
-
-
-
-
-
- false
- true
- _ResolvedFxProjects
-
-
-
-
-
-
diff --git a/src/Framework/pkg/Microsoft.AspNetCore.App.targets b/src/Framework/pkg/Microsoft.AspNetCore.App.targets
deleted file mode 100644
index e173a44408..0000000000
--- a/src/Framework/pkg/Microsoft.AspNetCore.App.targets
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- <_Parameter1>$(UserSecretsId.Trim())
-
-
-
-
diff --git a/src/Framework/pkg/_._ b/src/Framework/pkg/_._
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj b/src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj
index 5d0b9d9649..65e002ea3f 100644
--- a/src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj
+++ b/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
DotnetPlatform
ref/$(TargetFramework)/
- $(TargetingPackLayoutRoot)packs/Microsoft.AspNetCore.App.Ref/$(PackageVersion)/
+ packs\Microsoft.AspNetCore.App.Ref\$(PackageVersion)\
+ $(TargetingPackLayoutRoot)$(TargetingPackSubPath)
+ $(LocalDotNetRoot)$(TargetingPackSubPath)
+
aspnetcore-targeting-pack-$(PackageVersion).zip
aspnetcore-targeting-pack-$(PackageVersion).tar.gz
$(InstallersOutputPath)$(ArchiveOutputFileName)
@@ -45,7 +48,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
false
PackageOverrides.txt
- data/
+ data/
true
@@ -54,6 +57,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
+
+
+
+ false
+ true
+
@@ -65,6 +74,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
GeneratePackageConflictManifest;
_ResolveTargetingPackContent;
_BatchCopyToLayoutTargetDir;
+ _InstallTargetingPackIntoLocalDotNet;
_CreateTargetingPackArchive;
@@ -93,7 +103,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
-
+
+
<_PackageFiles Include="@(RefPackContent)" />
@@ -125,6 +136,21 @@ This package is an internal implementation of the .NET Core SDK and is not meant
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
index 024bd9f6a1..57b4f31400 100644
--- a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
+++ b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
@@ -13,6 +13,7 @@
false
$(MSBuildProjectName).$(RuntimeIdentifier)
+ $(SharedFxVersion)
true
false
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
true
DotnetPlatform
+ shared\$(SharedFxName)\$(SharedFxVersion)\
+ $(SharedFrameworkLayoutRoot)$(SharedRuntimeSubPath)
+ $(RedistSharedFrameworkLayoutRoot)$(SharedRuntimeSubPath)
+ $(LocalDotNetRoot)$(SharedRuntimeSubPath)
+
+ $(InternalInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)
+ $(InstallersOutputPath)$(InternalArchiveOutputFileName)
+ $(RuntimeInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)
+ $(InstallersOutputPath)$(BundleArchiveOutputFileName)
+
+
+ aspnetcore_base_runtime.version
+ $(InstallersOutputPath)$(BaseRuntimeVersionFileName)
+
runtimes/$(RuntimeIdentifier)/lib/
runtimes/$(RuntimeIdentifier)/native/
+ dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)
+ $(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppPackageVersion)/$(DotNetRuntimeArchiveFileName)
+ $(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName)
+
.pdb
@@ -53,6 +72,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
$(IntermediateOutputPath)ignoreme.dev.runtimeconfig.json
+ $(IntermediateOutputPath).version
+
none
false
@@ -93,6 +114,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
$(NuGetPackageRoot)/runtime.$(RuntimeIdentifier).microsoft.netcore.app/$(MicrosoftNETCoreAppPackageVersion)/
$(RuntimePackageRoot)tools/$(CrossgenToolPackagePath)
+ $(AssetTargetFallback);native,Version=0.0
@@ -104,12 +126,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Platform=$(TargetArchitecture)
Platform=Win32
-
- false
-
- true
- TargetFramework
+
+ true
+
_ResolvedNativeProjectReferencePaths
+
+ Build;GetTargetPath
@@ -130,7 +152,15 @@ This package is an internal implementation of the .NET Core SDK and is not meant
$(CoreBuildDependsOn);
GenerateSharedFxDepsFile;
+ GenerateSharedFxVersionsFiles;
Crossgen;
+ _ResolveSharedFrameworkContent;
+ _DownloadAndExtractDotNetRuntime;
+ _BatchCopyToSharedFrameworkLayout;
+ _BatchCopyToRedistLayout;
+ _CreateInternalSharedFxArchive;
+ _CreateRedistSharedFxArchive;
+ _InstallFrameworkIntoLocalDotNet;
ResolveReferences;
@@ -175,10 +205,10 @@ This package is an internal implementation of the .NET Core SDK and is not meant
-
+
-
-
+
+
@@ -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)" />
+
+
+
+
+
+
+
+
+
+
+
+
@@ -237,6 +286,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
+
+
+
@@ -294,4 +346,99 @@ This package is an internal implementation of the .NET Core SDK and is not meant
StandardOutputImportance="High" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Framework/src/Microsoft.AspNetCore.App.shfxproj b/src/Framework/src/Microsoft.AspNetCore.App.shfxproj
deleted file mode 100644
index a5c0d7dd65..0000000000
--- a/src/Framework/src/Microsoft.AspNetCore.App.shfxproj
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
- true
- $(TargetOsName)-$(TargetArchitecture)
- fx
-
-
-
-
-
- $(TargetRuntimeIdentifier)
- $(DefaultNetCoreTargetFramework)
- Microsoft.NETCore.App
- true
-
-
- true
-
-
- true
- false
-
-
- true
-
- false
-
-
- false
- false
-
-
- none
- false
- false
- false
-
-
- runtime.$(TargetRuntimeIdentifier).$(MSBuildProjectName)
- 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.
-
- true
-
- true
- $(MSBuildThisFileDirectory)runtime.fx.nuspec
- aspnetcore;shared-framework
-
- true
-
-
-
-
-
-
diff --git a/src/Framework/src/SharedFx.targets b/src/Framework/src/SharedFx.targets
deleted file mode 100644
index 9ecc033804..0000000000
--- a/src/Framework/src/SharedFx.targets
+++ /dev/null
@@ -1,388 +0,0 @@
-
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
-
-
- BuildOnlySettings;
- PrepareForBuild;
- PreBuildEvent;
- ResolveReferences;
- GenerateSharedFxVersionsFile;
- GenerateBuildDependencyFile;
- PrepareForPublish;
- GenerateBuildRuntimeConfigurationFiles;
- ComputeAndCopyFilesToPublishDirectory;
- GeneratePublishDependencyFile;
- GenerateSharedFxMetadataFiles;
- CopySharedFxToOutput;
- CollectSharedFxOutput;
- PostBuildEvent;
- GetTargetPath;
- PrepareForRun;
-
-
-
- PrepareForCrossGen;
- CrossGenAssemblies;
- CrossGenSymbols;
-
-
-
- PrepareOutputPaths;
-
-
-
- BeforeResolveReferences;
- AssignProjectConfiguration;
- ResolveProjectReferences;
- FindInvalidProjectReferences;
- AfterResolveReferences
-
-
-
- CollectSharedFxOutput;
- GetCopyToSharedFrameworkItems;
- InstallFrameworkIntoLocalDotNet;
-
-
-
- $(MSBuildProjectName)
-
- lib
- .so
- .dll
- .dylib
- .exe
-
- :
- %3B
-
- $(IntermediateOutputPath)$(TargetRuntimeIdentifier)\
-
-
- $(IntermediateOutputPath)u\
-
-
- false
-
- $(OutputPath)manifest\
- $(OutputPath)files\
- $(OutputPath)symbols\
- $(OutputPath)native\
- $(OutputPath)lib\$(TargetFramework)\
- $(LocalDotNetRoot)shared\$(SharedFxName)\$(SharedFxVersion)\
-
- $(IntermediateOutputPath)crossgen\
-
- crossgen
- $(CrossGenExecutable).exe
-
- $(CrossGenExecutable)
-
- x64_arm\$(CrossGenTool)
- x64_arm64\$(CrossGenTool)
- x86_arm\$(CrossGenTool)
-
-
- $(BaseSharedFrameworkName)
-
- $(IntermediateOutputPath)$(SharedFxName).runtimeconfig.dev.json
-
- $(IntermediateOutputPath)$(SharedFxName).intermediate.deps.json
- $(ProjectDepsFilePath)
-
-
- $(MetadataOutputPath)$(SharedFxName).runtimeconfig.json
-
- $(PublishRuntimeConfigFilePath)
- $(MetadataOutputPath)$(SharedFxName).deps.json
- $(MetadataOutputPath).version
- $(ManifestOutputDir)$(SharedFxName).PlatformManifest.txt
-
-
-
-
-
-
-
-
-
-
-
-
- $(MetadataOutputPath);
- $(RuntimeAssetsOutputPath);
- $(NativeAssetsOutputPath);
-
- $(MetadataOutputPath)
- $(RuntimeAssetsOutputPath)
- $(NativeAssetsOutputPath)
-
- $(ManifestOutputDir)
- $(SharedFxName)
- $(PackageId)
-
-
-
-
-
-
-
-
-
-
- Runtime;Native
- true
-
-
-
-
-
-
-
-
-
-
- <_UnknownRid Remove="@(_UnknownRid)" />
- <_UnknownRid Include="$(TargetRuntimeIdentifier)" Exclude="$(SupportedRuntimeIdentifiers)" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Microsoft.NETCore.App
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %(FullPath)
- $(IntermediateOutputPath)%(RecursiveDir)%(Filename).rsp
- $(IntermediateOutputPath)%(RecursiveDir)%(Filename).symbols.rsp
- $(SymbolsOutputPath)%(RecursiveDir)%(Filename).ni.pdb
- $(RuntimeAssetsOutputPath)%(RecursiveDir)%(Filename)%(Extension)
- %(RecursiveDir)%(Filename)%(Extension)
- $(SymbolsOutputPath)%(RecursiveDir)
-
-
-
-
-
-
-
-
-
-
- <_PlatformAssemblyPaths Remove="@(_PlatformAssemblyPaths)" />
- <_PlatformAssemblyPaths Include="$(CrossGenToolDir)" />
- <_PlatformAssemblyPaths Include="$(PublishDir)" />
-
-
-
- @(_PlatformAssemblyPaths->Distinct(), '$(PathSeparator)')
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CreatePerfMap
- CreatePDB
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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)));
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Framework/src/_._ b/src/Framework/src/_._
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/src/Framework/src/runtime.fx.nuspec b/src/Framework/src/runtime.fx.nuspec
deleted file mode 100644
index 292d128d1b..0000000000
--- a/src/Framework/src/runtime.fx.nuspec
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- $id$
- $version$
- $authors$
- $licenseUrl$
- $projectUrl$
- $iconUrl$
- $description$
- $copyright$
- $tags$
-
- true
- true
-
-
-
-
-
-
-
-
-
diff --git a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj
index 5ab3b47fc1..87365c13b8 100644
--- a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj
+++ b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj
@@ -3,12 +3,21 @@
netcoreapp3.0
Microsoft.AspNetCore
+
+ false
+ <_ExpectedSharedFrameworkBinaries Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)" />
+ <_ExpectedSharedFrameworkBinaries Condition="'$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' != 'arm'" Include="aspnetcorev2_inprocess" />
+
- <_Parameter1>PackageVersion
- <_Parameter2>$(PackageVersion)
+ <_Parameter1>SharedFxVersion
+ <_Parameter2>$(SharedFxVersion)
+
+
+ <_Parameter1>TargetingPackVersion
+ <_Parameter2>$(TargetingPackVersion)
<_Parameter1>TargetRuntimeIdentifier
@@ -18,6 +27,18 @@
<_Parameter1>MicrosoftNETCoreAppPackageVersion
<_Parameter2>$(RuntimeFrameworkVersion)
+
+ <_Parameter1>SharedFxDependencies
+ <_Parameter2>@(_ExpectedSharedFrameworkBinaries)
+
+
+ <_Parameter1>SharedFrameworkLayoutRoot
+ <_Parameter2>$(SharedFrameworkLayoutRoot)
+
+
+ <_Parameter1>TargetingPackLayoutRoot
+ <_Parameter2>$(TargetingPackLayoutRoot)
+
@@ -25,34 +46,22 @@
-
+
false
- _ResolvedFrameworkReference
+ true
+
+
+ false
+ true
-
+
<_Parameter1>RepositoryCommit
<_Parameter2>$(SourceRevisionId)
-
- <_Parameter1>SharedFxDependencies
- <_Parameter2>@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)
-
-
- <_Parameter1>MetadataOutputPath
- <_Parameter2>%(_ResolvedFrameworkReference.MetadataOutputPath)
-
-
- <_Parameter1>ManifestOutputDir
- <_Parameter2>%(_ResolvedFrameworkReference.ManifestOutputDir)
-
-
- <_Parameter1>RuntimeAssetsOutputPath
- <_Parameter2>%(_ResolvedFrameworkReference.RuntimeAssetsOutputPath)
-
diff --git a/src/Framework/test/SharedFxTests.cs b/src/Framework/test/SharedFxTests.cs
index 140a1a2ac1..8a3a13320d 100644
--- a/src/Framework/test/SharedFxTests.cs
+++ b/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(item);
@@ -149,24 +93,22 @@ namespace Microsoft.AspNetCore
Assert.Empty(lib["sha512"].Value());
});
- 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(item);
- Assert.StartsWith($"runtimes/{_expectedRid}/lib/{_expectedTfm}/", obj.Name);
- Assert.NotEmpty(obj.Value["assemblyVersion"].Value());
- Assert.NotEmpty(obj.Value["fileVersion"].Value());
+ var assemblyVersion = obj.Value["assemblyVersion"].Value();
+ Assert.NotEmpty(assemblyVersion);
+ Assert.True(Version.TryParse(assemblyVersion, out _), $"{assemblyVersion} should deserialize to System.Version");
+ var fileVersion = obj.Value["fileVersion"].Value();
+ 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(item);
- Assert.StartsWith($"runtimes/{_expectedRid}/native/", obj.Name);
+ var fileVersion = obj.Value["fileVersion"].Value();
+ 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]);
}
}
}
diff --git a/src/Framework/test/TargetingPackTests.cs b/src/Framework/test/TargetingPackTests.cs
new file mode 100644
index 0000000000..68832e2842
--- /dev/null
+++ b/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");
+ });
+ }
+ }
+}
diff --git a/src/Framework/test/TestData.cs b/src/Framework/test/TestData.cs
index 10d0f2839a..b81d6af975 100644
--- a/src/Framework/test/TestData.cs
+++ b/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().Single(d => d.Key == key).Value;
}
diff --git a/src/Installers/Archive/Archive.Internal.zipproj b/src/Installers/Archive/Archive.Internal.zipproj
deleted file mode 100644
index 35cee32ac9..0000000000
--- a/src/Installers/Archive/Archive.Internal.zipproj
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
- $(ArtifactsObjDir)ai\$(TargetRuntimeIdentifier)\
- $(InternalInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)
- $(InstallersOutputPath)
- $(InstallersOutputPath)$(OutputFileName)
-
-
-
-
- false
- true
- _ResolvedFxProjects
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Installers/Archive/Archive.Redist.zipproj b/src/Installers/Archive/Archive.Redist.zipproj
deleted file mode 100644
index abb30f65f5..0000000000
--- a/src/Installers/Archive/Archive.Redist.zipproj
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
- $(ArtifactsObjDir)ar\
- $(BaseIntermediateOutputPath)$(TargetRuntimeIdentifier)\
- $(RuntimeInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)
- $(InstallersOutputPath)
- $(InstallersOutputPath)$(OutputFileName)
- dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)
- $(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppPackageVersion)/$(DotNetRuntimeArchiveFileName)
- $(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName)
-
- aspnetcore_base_runtime.version
- $(OutputPath)$(BaseRuntimeVersionFileName)
-
- aspnetcore-runtime-$(TargetRuntimeIdentifier)-version-badge.svg
- $(OutputPath)$(SvgBadgeFileName)
-
-
-
-
- false
- true
- _ResolvedFxProjects
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- version
- $(PackageVersion)
- #007EC6
- $([MSBuild]::Add(56, $([MSBuild]::Multiply($(PackageVersion.Length), 6.67))))
-
-
-
-
-
-
-
- $(SvgBadgeLabel)
- $(SvgBadgeLabel)
- $(SvgBadgeValue)
- $(SvgBadgeValue)
-
-
-]]>
-
-
-
-
-
-
-
-
-
-
-
-
- $(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Installers/Debian/Directory.Build.props b/src/Installers/Debian/Directory.Build.props
index 80a542cd9b..c0e9981de7 100644
--- a/src/Installers/Debian/Directory.Build.props
+++ b/src/Installers/Debian/Directory.Build.props
@@ -10,8 +10,6 @@
$(InstallersOutputPath)
$(IntermediateOutputPath)$(TargetRuntimeIdentifier)\
-
- $(IntermediateOutputPath)package_root\
/usr/share/dotnet
diff --git a/src/Installers/Debian/Directory.Build.targets b/src/Installers/Debian/Directory.Build.targets
index 36e823a338..5a5c19191e 100644
--- a/src/Installers/Debian/Directory.Build.targets
+++ b/src/Installers/Debian/Directory.Build.targets
@@ -12,9 +12,10 @@
-
+
-
+
+
@@ -47,7 +48,7 @@
-
+
$(PackageId)_$(PackageVersion)-$(PackageRevision)_$(DebianPackageArch).deb
diff --git a/src/Installers/Debian/Runtime/Debian.Runtime.debproj b/src/Installers/Debian/Runtime/Debian.Runtime.debproj
index cdd7b12d01..6baf4c265a 100644
--- a/src/Installers/Debian/Runtime/Debian.Runtime.debproj
+++ b/src/Installers/Debian/Runtime/Debian.Runtime.debproj
@@ -6,6 +6,7 @@
$(RuntimeInstallerBaseName)-$(SharedFxVersion)-x64.deb
+ $(SharedFrameworkLayoutRoot)
$(RuntimeInstallerBaseName)-$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)
@@ -28,29 +29,11 @@
-
+
+ false
true
- _ResolvedFxProjects
-
-
- $(DebBuildDependsOn);LayoutSharedFramework
-
-
-
-
-
-
-
- $(IntermediatePackageRoot)shared\%(SharedFxAssetFolder.SharedFxName)\$(SharedFxVersion)\
-
-
-
-
-
diff --git a/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj b/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj
index 5f3508eb2c..7b78c9f52b 100644
--- a/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj
+++ b/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj
@@ -6,6 +6,8 @@
$(TargetingPackInstallerBaseName)-$(TargetingPackVersion).deb
+ $(TargetingPackLayoutRoot)
+
$(TargetingPackInstallerBaseName)-$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)
@@ -19,7 +21,6 @@
-
false
true
@@ -29,19 +30,8 @@
- $(DebBuildDependsOn);LayoutTargetingPack
-
-
-
-
-
-
-
-
diff --git a/src/Installers/Debian/tools/build.sh b/src/Installers/Debian/tools/build.sh
index 6bd678c8ef..85806ac5aa 100755
--- a/src/Installers/Debian/tools/build.sh
+++ b/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 ] [-o ]
+ echo "Usage: package_tool [-i ] [-o ]
[-n ] [-v ] [-h]
REQUIRED:
-i : Input directory conforming to package_tool conventions and debian_config.json
+ -C : Directory containing the files which should be packaged.
-o : 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 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
diff --git a/src/Installers/Directory.Build.props b/src/Installers/Directory.Build.props
deleted file mode 100644
index 8028e62456..0000000000
--- a/src/Installers/Directory.Build.props
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
- aspnetcore-runtime
- aspnetcore-targeting-pack
-
- $(RuntimeInstallerBaseName)-internal
-
- .tar.gz
- .zip
-
-
-
diff --git a/src/Installers/Rpm/Directory.Build.targets b/src/Installers/Rpm/Directory.Build.targets
index 7f12d09ec8..021da2c25a 100644
--- a/src/Installers/Rpm/Directory.Build.targets
+++ b/src/Installers/Rpm/Directory.Build.targets
@@ -16,12 +16,12 @@
-
+
-
+
@@ -72,7 +72,7 @@
-
+
diff --git a/src/Installers/Rpm/Rpm.Runtime.Common.targets b/src/Installers/Rpm/Rpm.Runtime.Common.targets
index a64e3eec5c..141efc28ef 100644
--- a/src/Installers/Rpm/Rpm.Runtime.Common.targets
+++ b/src/Installers/Rpm/Rpm.Runtime.Common.targets
@@ -14,34 +14,16 @@
$(SharedFxProductName)
$(SharedFxDescription)
- $(IntermediateOutputPath)content\
+ $(SharedFrameworkLayoutRoot)
-
+
+ false
true
- _ResolvedFxProjects
-
-
- $(RpmBuildDependsOn);LayoutSharedFramework;
-
-
-
-
-
-
- $(IntermediatePackageRoot)shared\%(SharedFxAssetFolder.SharedFxName)\$(SharedFxVersion)\
-
-
-
-
-
-
diff --git a/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj b/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj
index 6b59d6ddf5..16fc7ecb7d 100644
--- a/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj
+++ b/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj
@@ -5,7 +5,7 @@
/usr/share/dotnet/
$(TargetingPackInstallerBaseName)-$(TargetingPackVersion)-x64.rpm
- $(TargetingPackLayoutRoot)
+ $(TargetingPackLayoutRoot)
diff --git a/src/ProjectTemplates/test/GenerateTestProps.targets b/src/ProjectTemplates/test/GenerateTestProps.targets
index 5112861a1c..cd786f2c92 100644
--- a/src/ProjectTemplates/test/GenerateTestProps.targets
+++ b/src/ProjectTemplates/test/GenerateTestProps.targets
@@ -7,6 +7,7 @@
MicrosoftNETCorePlatformsPackageVersion=$(MicrosoftNETCorePlatformsPackageVersion);
MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion);
MicrosoftAspNetCoreAppPackageVersion=$(SharedFxVersion);
+ SupportedRuntimeIdentifiers=$(SupportedRuntimeIdentifiers);
diff --git a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj
index 9ab06a140a..2b6dbd8473 100644
--- a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj
+++ b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj
@@ -27,6 +27,10 @@
+
+ false
+ true
+
diff --git a/src/ProjectTemplates/test/TemplateTests.props.in b/src/ProjectTemplates/test/TemplateTests.props.in
index ff2c8a9cc4..807101c20e 100644
--- a/src/ProjectTemplates/test/TemplateTests.props.in
+++ b/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}" />
diff --git a/src/SignalR/clients/ts/signalr-protocol-msgpack/package.json b/src/SignalR/clients/ts/signalr-protocol-msgpack/package.json
index 30bf64403a..bfb1960536 100644
--- a/src/SignalR/clients/ts/signalr-protocol-msgpack/package.json
+++ b/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",
diff --git a/src/SignalR/clients/ts/signalr/package.json b/src/SignalR/clients/ts/signalr/package.json
index 288d444f23..c749def5bd 100644
--- a/src/SignalR/clients/ts/signalr/package.json
+++ b/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",
diff --git a/src/SiteExtensions/LoggingBranch/LoggingBranch.csproj b/src/SiteExtensions/LoggingBranch/LoggingBranch.csproj
index b0ad58a7cf..e2e8ce34fc 100644
--- a/src/SiteExtensions/LoggingBranch/LoggingBranch.csproj
+++ b/src/SiteExtensions/LoggingBranch/LoggingBranch.csproj
@@ -29,14 +29,11 @@
-
- Pack
+
false
true
-
-
- Pack
+
false
true
diff --git a/src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj b/src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj
index 0bd58e2bad..c439e70ddd 100644
--- a/src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj
+++ b/src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj
@@ -11,7 +11,7 @@
aspnetcore;AzureSiteExtension
AspNetCoreRuntime.$(TrimmedVersion).$(TargetArchitecture)
true
- $(ArtifactsObjDir)ar\$(TargetRuntimeIdentifier)\
+ $(RedistSharedFrameworkLayoutRoot)
true
@@ -25,7 +25,10 @@
-
+
+ false
+ true
+