diff --git a/.azure/pipelines/ci-official.yml b/.azure/pipelines/ci-official.yml index 6647260d893b..bf6f9e35a8f3 100644 --- a/.azure/pipelines/ci-official.yml +++ b/.azure/pipelines/ci-official.yml @@ -6,6 +6,8 @@ trigger: exclude: - release/2.0 +name: $(Date:yyMMdd)-$(Rev:rr) + phases: - phase: Windows queue: diff --git a/.editorconfig b/.editorconfig index 4eb7559fcef6..35147d7db8a6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,7 +11,7 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.{cs}] +[*.cs] indent_size = 4 dotnet_sort_system_directives_first = true:warning diff --git a/Directory.Build.props b/Directory.Build.props index 813f3db1f2d0..a75b38991795 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,12 +3,32 @@ Microsoft ASP.NET Core + + Microsoft + Microsoft Corporation. + © Microsoft Corporation. All rights reserved. + en-US + https://raw.githubusercontent.com/aspnet/AspNetCore/2.0.0/LICENSE.txt + https://go.microsoft.com/fwlink/?LinkID=288859 + https://asp.net + true + true + $(MSBuildThisFileDirectory) https://github.com/aspnet/AspNetCore git + $(MSBuildThisFileDirectory)eng\AspNetCore.snk true true + + + SHA256 + + true + + + false @@ -17,12 +37,30 @@ $(RepositoryRoot)artifacts\ $(ArtifactsDir)obj\ + Debug $(ArtifactsDir)$(Configuration)\ $(ArtifactsConfigurationDir)bin\ + $(ArtifactsConfigurationDir)installers\ $(ArtifactsConfigurationDir)packages\ + + + win-x64 + osx-x64 + linux-x64 + + + + win-x64; + win-x86; + osx-x64; + linux-musl-x64; + linux-x64; + linux-arm + - + + diff --git a/Directory.Build.targets b/Directory.Build.targets index ebda4d3771d0..8ad5f961270b 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -8,6 +8,7 @@ 99.9 - + + diff --git a/Microsoft.AspNetCore.sln b/Microsoft.AspNetCore.sln deleted file mode 100644 index 809b017e25f3..000000000000 --- a/Microsoft.AspNetCore.sln +++ /dev/null @@ -1,39 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{EE2CAA71-82AA-41C0-AE87-5B4FB77D6CFE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedFx.UnitTests", "test\SharedFx.UnitTests\SharedFx.UnitTests.csproj", "{99CC38EC-902B-4B3F-AD33-177018110199}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {99CC38EC-902B-4B3F-AD33-177018110199}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Debug|x64.ActiveCfg = Debug|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Debug|x64.Build.0 = Debug|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Debug|x86.ActiveCfg = Debug|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Debug|x86.Build.0 = Debug|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Release|Any CPU.Build.0 = Release|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Release|x64.ActiveCfg = Release|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Release|x64.Build.0 = Release|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Release|x86.ActiveCfg = Release|Any CPU - {99CC38EC-902B-4B3F-AD33-177018110199}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {99CC38EC-902B-4B3F-AD33-177018110199} = {EE2CAA71-82AA-41C0-AE87-5B4FB77D6CFE} - EndGlobalSection -EndGlobal diff --git a/build/SharedFx.props b/build/SharedFx.props index a32a5f1851ee..14595bab891f 100644 --- a/build/SharedFx.props +++ b/build/SharedFx.props @@ -13,17 +13,10 @@ <_SymbolsSourceDir>$(RepositoryRoot).deps\symbols\ <_DockerRootDir>/opt/code/ <_InstallersOutputDir>$(ArtifactsDir)installers\ - - : - %3B + .tar.gz .zip - lib - .so - .dll - .dylib - .exe netcoreapp2.2 diff --git a/build/SharedFx.targets b/build/SharedFx.targets index b612e5cb2e92..c2afa7094587 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -2,558 +2,59 @@ - $([MSBuild]::NormalizeDirectory($(ArtifactsDir)))runtime\ + $(RepositoryRoot)\src\Framework\Framework.UnitTests\Framework.UnitTests.csproj - - - <_MetapackageProject Include="$(RepositoryRoot)src\Packages\Microsoft.AspNetCore.All\Microsoft.AspNetCore.All.csproj" /> - <_MetapackageProject Include="$(RepositoryRoot)src\Packages\Microsoft.AspNetCore.App\Microsoft.AspNetCore.App.csproj" /> - <_MetapackageProject Include="$(RepositoryRoot)src\Packages\Microsoft.AspNetCore.Analyzers\Microsoft.AspNetCore.Analyzers.csproj" /> - - - - - - - - - <_SharedFrameworkSymbolsPackage Include="@(SharedFrameworkName)" Condition="'%(AllSharedFxRIDs.CrossgenSymbols)' != 'false' AND '%(AllSharedFxRIDs.Crossgen)' != 'false'"> - %(AllSharedFxRIDs.Identity) - - <_SharedFrameworkSymbolsPackage Update="@(_SharedFrameworkSymbolsPackage)" PackageId="runtime.%(Rid).%(Identity)" /> - - NuGetSymbolsPackage - %(_SharedFrameworkSymbolsPackage.PackageId) - $(PackageVersion) - shipoob - - - - - - - $(_MetapackageSrcRoot)$(MetapackageName)\ - $(_WorkRoot)pkg\$(MetapackageName)\ - - $(CommonProps);Configuration=$(Configuration) - $(CommonProps);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath) - $(CommonProps);DotNetBuildOffline=true - $(CommonProps);AspNetUniverseBuildOffline=true - $(CommonProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp22PackageVersion) - $(CommonProps);AppMetapackageVersion=$(PackageVersion) - - - - - - - - - - - - - - - - - - - - - - - - - - - <_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)"> - - MetapackageName=Microsoft.AspNetCore.App; - MetapackageReferenceType=AppMetapackage; - MetapackageDependencyVersionRangeType=MajorMinor - - - - <_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)"> - - MetapackageName=Microsoft.AspNetCore.All; - MetapackageReferenceType=AllMetapackage; - MetapackageDependencyVersionRangeType=Minimum - - - - <_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)"> - - MetapackageName=Microsoft.AspNetCore.Analyzers; - MetapackageReferenceType=Analyzer; - MetapackageDependencyVersionRangeType=Minimum - - - - - + + + + + + + + + + + + + + + - - - true - false - true - false - true - - - + + - $(_WorkRoot)AppSharedFx\ - $(_WorkRoot)AllSharedFx\ - $(_WorkRoot)Publish\ - $(_WorkRoot)CrossGen\ - $(_WorkRoot)CrossGenSymbols\ - $(_WorkRoot)CrossGenTool\ - $(_WorkRoot)CrossGenRsp\ - $(SharedFxIntermediateOutputPath)shared\Microsoft.AspNetCore.App\$(PackageVersion)\ - $(SharedFxIntermediateOutputPath)shared\Microsoft.AspNetCore.All\$(PackageVersion)\ - $(SharedFxRID) - - - : - %3B - - Configuration=$(Configuration);RuntimeIdentifier=$(SharedFxRestoreRid) - $(CommonSharedFxProps);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath) - $(CommonSharedFxProps);DotNetBuildOffline=true - $(CommonSharedFxProps);AspNetUniverseBuildOffline=true - - - - - - $(CommonSharedFxProps) - $(RestoreProps);SharedFxPackage=$(SharedFxPackage) - $(RestoreProps);SharedFxPackageVersion=$(PackageVersion) - $(RestoreProps);SharedFxBase=$(SharedFxBase) - $(RestoreProps);SharedFxBaseVersion=$(SharedFxBaseVersion) - - - - - - - - - - - - - - - - RepositoryCommit=$(RepositoryCommit);SharedFxWorkDirectory=$(AppSharedFxWorkDirectory) - $(AppSharedFxProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp22PackageVersion) - $(AppSharedFxProps);SharedFxPackage=Microsoft.AspNetCore.App - RepositoryCommit=$(RepositoryCommit);SharedFxWorkDirectory=$(AllSharedFxWorkDirectory) - $(AllSharedFxProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp22PackageVersion) - $(AllSharedFxProps);SharedFxPackage=Microsoft.AspNetCore.All - $(AllSharedFxProps);SharedFxDep=Microsoft.AspNetCore.App - $(AllSharedFxProps);SharedFxDepVersion=$(PackageVersion) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - win - linux - osx - - - - - - - - - - - - - - - SharedFxPackage=Microsoft.AspNetCore.App - $(AppSharedFxProps);SharedFxWorkDirectory=$(AppSharedFxWorkDirectory) - $(AppSharedFxProps);SharedFxPublishDirectory=$(AppSharedFxPublishDirectory) - SharedFxPackage=Microsoft.AspNetCore.All - $(AllSharedFxProps);SharedFxWorkDirectory=$(AllSharedFxWorkDirectory) - $(AllSharedFxProps);SharedFxPublishDirectory=$(AllSharedFxPublishDirectory) - - - - - - - - - - - Microsoft.NETCore.App - crossgen - $(CrossGenTool).exe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_AppRuntimeAssemblies Include="@(AppPublishAssemblies)" Condition="'%(AssetType)' == 'runtime'"> - %(PackageName).%(PackageVersion).symbols.nupkg - %(RootDir)%(Directory)%(Filename).pdb - - <_AllRuntimeAssemblies Include="@(AllPublishAssemblies)" Exclude="@(_AppRuntimeAssemblies)" Condition="'%(AssetType)' == 'runtime'"> - %(PackageName).%(PackageVersion).symbols.nupkg - %(RootDir)%(Directory)%(Filename).pdb - - - <_AssembliesToCrossgen Include="$(SharedFxIntermediateOutputPath)**\*.dll" /> - - - - - - - - - - - - - - - - - - - - %(FullPath) - $(SharedFxCrossGenRspDirectory)%(RecursiveDir)%(Filename).rsp - $(SharedFxCrossGenRspDirectory)%(RecursiveDir)%(Filename).symbols.rsp - $(SharedFxCrossGenDirectory)%(RecursiveDir)%(Filename)%(Extension) - $(SharedFxCrossGenDirectory)%(RecursiveDir) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CreatePerfMap - CreatePDB - - - - - - - - - - - - - - - - - - - - runtime.$(SharedFxRID).$(SymbolsNuspecIdSuffix) - - - - <_SymbolFiles Include="$(SymbolsWorkDir)**\*.pdb;$(SymbolsWorkDir)**\*.map;$(SymbolsWorkDir)**\*.dll" /> - - %(RecursiveDir)%(Filename)%(Extension) - - - - - - - - - - - - - $(SharedFxCrossGenDirectory)shared\Microsoft.AspNetCore.App\$(PackageVersion)\ - $(SharedFxCrossGenDirectory)shared\Microsoft.AspNetCore.All\$(PackageVersion)\ - $(_WorkRoot)Symbols\Microsoft.AspNetCore.App\ - $(_WorkRoot)Symbols\Microsoft.AspNetCore.All\ - - - - - - - - - - - - - - - - - - - - - - - - - - SymbolsWorkDir=$(AppSharedFxSymbolsDirectory) - $(AppSymbolsArguments);SymbolsNuspecIdSuffix=Microsoft.AspNetCore.App - $(AppSymbolsArguments);Description=Symbol packages for Microsoft.AspNetCore.App shared framework - SymbolsWorkDir=$(AllSharedFxSymbolsDirectory) - $(AllSymbolsArguments);SymbolsNuspecIdSuffix=Microsoft.AspNetCore.All - $(AllSymbolsArguments);Description=Symbol packages for Microsoft.AspNetCore.All shared framework - - - - - - - - - - - - - - - - - - - - - - - $(RepositoryRoot)\test\SharedFx.UnitTests\SharedFx.UnitTests.csproj $(LogOutputDir)SharedFx-UnitTests-$(Version).trx $(UnitTestFxTrxLogFile) $(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx - - - DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); - DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath); - SharedFxOutputPath=$(SharedFxIntermediateOutputPath); - RepositoryCommit=$(RepositoryCommit); - VSTestLogger=$([MSBuild]::Escape('trx;LogFileName=$(UnitTestFxTrxLogFile)')); - SharedFxRuntimeIdentifier=$(SharedFXRid) - - - + + - + --;RunConfiguration.NoAutoReporters=true"> diff --git a/build/SharedFxInstaller.targets b/build/SharedFxInstaller.targets index 50cfb4d5a518..bebfb54451bf 100644 --- a/build/SharedFxInstaller.targets +++ b/build/SharedFxInstaller.targets @@ -1,5 +1,5 @@ - + @@ -20,67 +20,6 @@ Condition="!Exists('$(SharedFxIntermediateArchiveFilePrefix)-%(NonWindowsSharedFxRIDs.Identity).tar.gz')" /> - - - - - - - - - - .tar.gz - .zip - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/artifacts.props b/build/artifacts.props index db430f5c9c18..b4c17f7d61f1 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -2,18 +2,13 @@ - - false - - false - - false - - Dependency + @@ -24,73 +19,72 @@ - + - - - + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + - + - - + + - - - - + + + + - - - + + + - - - - - - - + + + + + + + - + @@ -100,167 +94,167 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + + - + - + - - + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - + - - - - + + + + - - - + + + - + - - + + - - - - - - + + + + + + - + - - - - - - - + + + + + + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - + + + + + - - + + - + diff --git a/build/external-dependencies.props b/build/external-dependencies.props index 532e2c37a0c6..9ed3c8aebdb0 100644 --- a/build/external-dependencies.props +++ b/build/external-dependencies.props @@ -5,54 +5,37 @@ - - false - - false - - - - - - - false - - false - true - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - @@ -64,7 +47,7 @@ - + @@ -191,7 +174,7 @@ - + diff --git a/build/repo.beforecommon.props b/build/repo.beforecommon.props deleted file mode 100644 index f470e9b2a653..000000000000 --- a/build/repo.beforecommon.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - true - - diff --git a/build/repo.targets b/build/repo.targets index d6c00978c36d..764d74f46f69 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -15,7 +15,7 @@ SetTeamCityBuildNumberToVersion;$(PrepareDependsOn);VerifyPackageArtifactConfig;VerifyExternalDependencyConfig;PrepareOutputPaths $(CleanDependsOn);CleanArtifacts;CleanRepoArtifacts $(RestoreDependsOn);InstallDotNet - $(CompileDependsOn);BuildRepositories + $(CompileDependsOn);BuildRepositories;BuildSharedFx $(PackageDependsOn);BuildMetapackages;CheckExpectedPackagesExist $(TestDependsOn);_TestRepositories $(GetArtifactInfoDependsOn);ResolveRepoInfo @@ -25,7 +25,7 @@ - + MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreAppPackageVersion); @@ -42,6 +42,14 @@ + + + + - - - - - - - - diff --git a/build/sources.props b/build/sources.props index 5b458ddf090d..a08e49dfdb41 100644 --- a/build/sources.props +++ b/build/sources.props @@ -21,5 +21,10 @@ https://vside.myget.org/F/vssdk/api/v3/index.json; https://vside.myget.org/F/vsmac/api/v3/index.json + + https://dotnetcli.blob.core.windows.net/dotnet/ + + + $(PublicCoreFeedPrefix) diff --git a/build/tasks/AddMetapackageReferences.cs b/build/tasks/AddMetapackageReferences.cs deleted file mode 100644 index 3cb11666ab2f..000000000000 --- a/build/tasks/AddMetapackageReferences.cs +++ /dev/null @@ -1,134 +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.Xml; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using NuGet.Versioning; -using RepoTasks.Utilities; - -namespace RepoTasks -{ - public class AddMetapackageReferences : Task - { - [Required] - public string ReferencePackagePath { get; set; } - - [Required] - public string MetapackageReferenceType { get; set; } - - [Required] - public string DependencyVersionRangeType { get; set; } - - // MSBuild doesn't allow binding to enums directly. - private enum VersionRangeType - { - Minimum, // [1.1.1, ) - MajorMinor, // [1.1.1, 1.2.0) - } - - [Required] - public ITaskItem[] PackageArtifacts { get; set; } - - [Required] - public ITaskItem[] ExternalDependencies { get; set; } - - public override bool Execute() - { - if (!Enum.TryParse(DependencyVersionRangeType, out var dependencyVersionType)) - { - Log.LogError("Unexpected value {0} for DependencyVersionRangeType", DependencyVersionRangeType); - return false; - } - - // Parse input - var metapackageArtifacts = PackageArtifacts.Where(p => p.GetMetadata(MetapackageReferenceType) == "true"); - var externalArtifacts = ExternalDependencies.Where(p => p.GetMetadata(MetapackageReferenceType) == "true"); - - var xmlDoc = new XmlDocument(); - xmlDoc.Load(ReferencePackagePath); - - // Project - var projectElement = xmlDoc.FirstChild; - - // Items - var itemGroupElement = xmlDoc.CreateElement("ItemGroup"); - Log.LogMessage(MessageImportance.High, $"{MetapackageReferenceType} will include the following packages"); - - foreach (var package in metapackageArtifacts) - { - var packageName = package.ItemSpec; - var packageVersion = package.GetMetadata("Version"); - if (string.IsNullOrEmpty(packageVersion)) - { - Log.LogError("Missing version information for package {0}", packageName); - continue; - } - - var packageVersionValue = GetDependencyVersion(dependencyVersionType, packageName, packageVersion); - Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersionValue}"); - - var packageReferenceElement = xmlDoc.CreateElement("PackageReference"); - packageReferenceElement.SetAttribute("Include", packageName); - packageReferenceElement.SetAttribute("Version", packageVersionValue); - packageReferenceElement.SetAttribute("PrivateAssets", "None"); - - itemGroupElement.AppendChild(packageReferenceElement); - } - - foreach (var package in externalArtifacts) - { - var packageName = package.ItemSpec; - var packageVersion = package.GetMetadata("Version"); - - if (string.IsNullOrEmpty(packageVersion)) - { - Log.LogError("Missing version information for package {0}", packageName); - continue; - } - - var packageVersionValue = - Enum.TryParse(package.GetMetadata("MetapackageVersionRangeType"), out var packageVersionType) - ? GetDependencyVersion(packageVersionType, packageName, packageVersion) - : GetDependencyVersion(dependencyVersionType, packageName, packageVersion); - - Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersionValue}"); - - var packageReferenceElement = xmlDoc.CreateElement("PackageReference"); - packageReferenceElement.SetAttribute("Include", packageName); - packageReferenceElement.SetAttribute("Version", packageVersionValue); - packageReferenceElement.SetAttribute("PrivateAssets", "None"); - - itemGroupElement.AppendChild(packageReferenceElement); - } - - projectElement.AppendChild(itemGroupElement); - - // Save updated file - xmlDoc.AppendChild(projectElement); - xmlDoc.Save(ReferencePackagePath); - - return !Log.HasLoggedErrors; - } - - private string GetDependencyVersion(VersionRangeType dependencyVersionType, string packageName, string packageVersion) - { - switch (dependencyVersionType) - { - case VersionRangeType.MajorMinor: - if (!NuGetVersion.TryParse(packageVersion, out var nugetVersion)) - { - Log.LogError("Invalid NuGet version '{0}' for package {1}", packageVersion, packageName); - return null; - } - return $"[{packageVersion}, {nugetVersion.Major}.{nugetVersion.Minor + 1}.0)"; - case VersionRangeType.Minimum: - return packageVersion; - default: - throw new NotImplementedException(); - } - } - } -} diff --git a/build/tasks/ProcessSharedFrameworkDeps.cs b/build/tasks/ProcessSharedFrameworkDeps.cs index 87250780a818..49189544f3a9 100644 --- a/build/tasks/ProcessSharedFrameworkDeps.cs +++ b/build/tasks/ProcessSharedFrameworkDeps.cs @@ -3,8 +3,10 @@ // 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 System.Security.Cryptography; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Microsoft.Extensions.DependencyModel; @@ -14,7 +16,7 @@ namespace RepoTasks { - public partial class ProcessSharedFrameworkDeps : Task + public class ProcessSharedFrameworkDeps : Task { [Required] public string AssetsFilePath { get; set; } @@ -22,6 +24,15 @@ public partial class ProcessSharedFrameworkDeps : Task [Required] public string DepsFilePath { get; set; } + [Required] + public string OutputPath { get; set; } + + [Required] + public string FrameworkName { get; set; } + + // When generating the .deps.json file, these files are used to replace "project" libraries with "packages". + public ITaskItem[] ResolvedPackageProjectReferences { get; set; } + public string[] PackagesToRemove { get; set; } [Required] @@ -42,7 +53,7 @@ private void ExecuteCore() context = new DependencyContextJsonReader().Read(depsStream); } - LockFile lockFile = LockFileUtilities.GetLockFile(AssetsFilePath, NullLogger.Instance); + var lockFile = LockFileUtilities.GetLockFile(AssetsFilePath, NullLogger.Instance); if (lockFile == null) { throw new ArgumentException($"Could not load a LockFile at '{AssetsFilePath}'.", nameof(AssetsFilePath)); @@ -52,25 +63,66 @@ private void ExecuteCore() var graph = manager.Collect(lockFile); var expandedGraph = manager.Expand(graph, Runtime); - var trimmedRuntimeLibraries = context.RuntimeLibraries; + // Remove the runtime entry for the project which generates the original deps.json. For example, there is no Microsoft.AspNetCore.App.dll. + var trimmedRuntimeLibraries = RuntimeReference.RemoveSharedFxRuntimeEntry(context.RuntimeLibraries, FrameworkName); + + trimmedRuntimeLibraries = ResolveProjectsAsPackages(ResolvedPackageProjectReferences, trimmedRuntimeLibraries); if (PackagesToRemove != null && PackagesToRemove.Any()) { - trimmedRuntimeLibraries = RuntimeReference.RemoveReferences(context.RuntimeLibraries, PackagesToRemove); + trimmedRuntimeLibraries = RuntimeReference.RemoveReferences(trimmedRuntimeLibraries, PackagesToRemove); } context = new DependencyContext( context.Target, - context.CompilationOptions, - context.CompileLibraries, + CompilationOptions.Default, + Array.Empty(), trimmedRuntimeLibraries, expandedGraph ); - using (var depsStream = File.Create(DepsFilePath)) + using (var depsStream = File.Create(OutputPath)) { new DependencyContextWriter().Write(context, depsStream); } } + + private IEnumerable ResolveProjectsAsPackages(ITaskItem[] resolvedProjects, IEnumerable compilationLibraries) + { + var projects = resolvedProjects.ToDictionary(k => k.GetMetadata("PackageId"), k => k, StringComparer.OrdinalIgnoreCase); + + foreach (var library in compilationLibraries) + { + if (projects.TryGetValue(library.Name, out var project)) + { + Log.LogMessage("Replacing the library entry for {0}", library.Name); + + var packagePath = project.ItemSpec; + var packageId = library.Name; + var version = library.Version; + string packageHash; + using (var sha512 = SHA512.Create()) + { + packageHash = "sha512-" + sha512.ComputeHashAsBase64(File.OpenRead(packagePath), leaveStreamOpen: false); + } + + yield return new RuntimeLibrary("package", + library.Name, + library.Version, + packageHash, + library.RuntimeAssemblyGroups, + library.NativeLibraryGroups, + library.ResourceAssemblies, + library.Dependencies, + serviceable: true, + path: $"{library.Name}/{library.Version}".ToLowerInvariant(), + hashPath: $"{library.Name}.{library.Version}.nupkg.sha512".ToLowerInvariant()); + } + else + { + yield return library; + } + } + } } -} \ No newline at end of file +} diff --git a/build/tasks/RepoTasks.tasks b/build/tasks/RepoTasks.tasks index 5339c01d0107..5df75df38555 100644 --- a/build/tasks/RepoTasks.tasks +++ b/build/tasks/RepoTasks.tasks @@ -3,7 +3,6 @@ <_RepoTaskAssembly>$(MSBuildThisFileDirectory)bin\publish\RepoTasks.dll - @@ -12,9 +11,8 @@ + - - diff --git a/build/tasks/ResolveSymbolsRecursivePath.cs b/build/tasks/ResolveSymbolsRecursivePath.cs deleted file mode 100644 index 21dd795fcd88..000000000000 --- a/build/tasks/ResolveSymbolsRecursivePath.cs +++ /dev/null @@ -1,29 +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.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using RepoTasks.Utilities; - -namespace RepoTasks -{ - public class ResolveSymbolsRecursivePath : Task - { - [Required] - [Output] - public ITaskItem[] Symbols { get; set; } - - public override bool Execute() - { - foreach (var symbol in Symbols) - { - var fullPath = symbol.GetMetadata("PortablePDB"); - symbol.SetMetadata("SymbolsRecursivePath", fullPath.Substring(fullPath.IndexOf($"{Path.DirectorySeparatorChar}lib{Path.DirectorySeparatorChar}"))); - } - - return true; - } - } -} diff --git a/build/tasks/ResolveVersionRange.cs b/build/tasks/ResolveVersionRange.cs new file mode 100644 index 000000000000..cedc94b40472 --- /dev/null +++ b/build/tasks/ResolveVersionRange.cs @@ -0,0 +1,68 @@ +// 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 Microsoft.Build.Framework; +using Microsoft.Build.Utilities; +using NuGet.Versioning; +using RepoTasks.Utilities; + +namespace RepoTasks +{ + public class ResolveVersionRange : Task + { + [Required] + [Output] + public ITaskItem[] Items { get; set; } + + [Required] + public string Version { get; set; } + + [Required] + public string RangeType { get; set; } + + // MSBuild doesn't allow binding to enums directly. + private enum VersionRangeType + { + Minimum, // [1.1.1, ) + MajorMinor, // [1.1.1, 1.2.0) + } + + public override bool Execute() + { + if (!Enum.TryParse(RangeType, out var rangeType)) + { + Log.LogError("Unexpected value {0} for RangeType", RangeType); + return false; + } + + var versionRange = GetVersionRange(rangeType, Version); + + foreach (var item in Items) + { + item.SetMetadata("_OriginalVersion", Version); + item.SetMetadata("Version", versionRange); + } + + return !Log.HasLoggedErrors; + } + + private string GetVersionRange(VersionRangeType rangeType, string packageVersion) + { + switch (rangeType) + { + case VersionRangeType.MajorMinor: + if (!NuGetVersion.TryParse(packageVersion, out var nugetVersion)) + { + Log.LogError("Invalid NuGet version '{0}'", packageVersion); + return null; + } + return $"[{packageVersion}, {nugetVersion.Major}.{nugetVersion.Minor + 1}.0)"; + case VersionRangeType.Minimum: + return packageVersion; + default: + throw new NotImplementedException(); + } + } + } +} diff --git a/build/tasks/TrimDeps.cs b/build/tasks/TrimDeps.cs deleted file mode 100644 index b63bdb35cc4c..000000000000 --- a/build/tasks/TrimDeps.cs +++ /dev/null @@ -1,60 +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.IO; -using System.Linq; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace RepoTasks -{ - public class TrimDeps : Task - { - [Required] - public ITaskItem[] DepsFiles { get; set; } - - public override bool Execute() - { - foreach (var depsFile in DepsFiles) - { - ChangeEntryPointLibraryName(depsFile.GetMetadata("Identity")); - } - - // Parse input - return true; - } - - - private void ChangeEntryPointLibraryName(string depsFile) - { - JToken deps; - using (var file = File.OpenText(depsFile)) - using (JsonTextReader reader = new JsonTextReader(file)) - { - deps = JObject.ReadFrom(reader); - } - - foreach (JProperty target in deps["targets"]) - { - var targetLibrary = target.Value.Children().FirstOrDefault(); - if (targetLibrary == null) - { - continue; - } - - targetLibrary.Remove(); - } - - var library = deps["libraries"].Children().First(); - library.Remove(); - - using (var file = File.CreateText(depsFile)) - using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented }) - { - deps.WriteTo(writer); - } - } - } -} diff --git a/build/tasks/Utilities/RuntimeReference.cs b/build/tasks/Utilities/RuntimeReference.cs index 4907a7372345..8f682eaa52fb 100644 --- a/build/tasks/Utilities/RuntimeReference.cs +++ b/build/tasks/Utilities/RuntimeReference.cs @@ -11,7 +11,30 @@ namespace RepoTasks.Utilities { internal class RuntimeReference { - public static List RemoveReferences(IReadOnlyList runtimeLibraries, IEnumerable packages) + public static IEnumerable RemoveSharedFxRuntimeEntry(IEnumerable runtimeLibraries, string fxName) + { + foreach (var runtimeLib in runtimeLibraries) + { + if (string.Equals(runtimeLib.Name, fxName, StringComparison.OrdinalIgnoreCase)) + { + yield return new RuntimeLibrary(runtimeLib.Type, + runtimeLib.Name, + runtimeLib.Version, + runtimeLib.Hash, + Array.Empty(), // runtimeLib.RuntimeAssemblyGroups, + runtimeLib.NativeLibraryGroups, + runtimeLib.ResourceAssemblies, + runtimeLib.Dependencies, + runtimeLib.Serviceable); + } + else + { + yield return runtimeLib; + } + } + } + + public static List RemoveReferences(IEnumerable runtimeLibraries, IEnumerable packages) { List result = new List(); @@ -60,4 +83,4 @@ public static List RemoveReferences(IReadOnlyList - - - netcoreapp2.2 - true - true - - - - - - - - - - - - - - - - - - - - diff --git a/build/tools/templates/SharedFxSymbols/SharedFrameworkSymbols.nuspec b/build/tools/templates/SharedFxSymbols/SharedFrameworkSymbols.nuspec deleted file mode 100644 index 1ba4b6c85df1..000000000000 --- a/build/tools/templates/SharedFxSymbols/SharedFrameworkSymbols.nuspec +++ /dev/null @@ -1,18 +0,0 @@ - - - - $ID$ - $VERSION$ - $DESCRIPTION$ - Microsoft - Microsoft - Copyright © Microsoft Corporation - https://raw.githubusercontent.com/aspnet/Home/2.0.0/LICENSE.txt - https://go.microsoft.com/fwlink/?LinkID=288859 - https://asp.net - true - true - aspnetcore - - - diff --git a/eng/targets/SharedFx.Common.props b/eng/targets/SharedFx.Common.props new file mode 100644 index 000000000000..7f562c98f98c --- /dev/null +++ b/eng/targets/SharedFx.Common.props @@ -0,0 +1,36 @@ + + + + + true + + $(SharedFxRID) + $(HostRid) + $(RuntimeIdentifier) + + + true + + + true + + + true + + false + + + false + false + + + none + false + false + false + + + diff --git a/eng/targets/SharedFx.Common.targets b/eng/targets/SharedFx.Common.targets new file mode 100644 index 000000000000..c0dc68296377 --- /dev/null +++ b/eng/targets/SharedFx.Common.targets @@ -0,0 +1,328 @@ + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + BuildOnlySettings; + PrepareForBuild; + PreBuildEvent; + ResolveReferences; + GenerateSharedFxVersionsFile; + PrepareForPublish; + ComputeAndCopyFilesToPublishDirectory; + GeneratePublishDependencyFile; + GenerateSharedFxDependencyFile; + GeneratePublishRuntimeConfigurationFile; + OptimizeOutput; + PostBuildEvent; + GetTargetPath; + + + + PrepareForCrossGen; + CrossGenAssemblies; + + + + $(OptimizeOutputDependsOn); + CrossGenSymbols; + + + + PrepareOutputPaths; + + + + BeforeResolveReferences; + AssignProjectConfiguration; + ResolveProjectReferences; + FindInvalidProjectReferences; + AfterResolveReferences + + + + $(MSBuildProjectName) + + + win + osx + linux + linux-musl + unix + + lib + .so + .dll + .dylib + .exe + + : + %3B + + $(IntermediateOutputPath)$(SharedFxRid)\ + + + $(OutputPath) + $(IntermediateOutputPath)u\ + + $(OutputPath)files\ + $(OutputPath)symbols\ + $(OutputPath)native\ + $(OutputPath)lib\$(TargetFramework)\ + + $(IntermediateOutputPath)crossgen\ + + + $(BaseSharedFrameworkName) + + $(IntermediateOutputPath)$(SharedFxName).runtimeconfig.dev.json + + $(IntermediateOutputPath)$(SharedFxName).project.deps.json + $(IntermediateOutputPath)$(SharedFxName).publish.deps.json + + + $(MetadataOutputPath)$(SharedFxName).runtimeconfig.json + $(MetadataOutputPath)$(SharedFxName).deps.json + $(MetadataOutputPath).version + + + + + + _ResolvedFrameworkProjectReferencePaths + + + + _ResolvedPackageProjectReferencePaths + + + + + + $(MetadataOutputPath); + $(RuntimeAssetsOutputPath); + $(NativeAssetsOutputPath); + + $(MetadataOutputPath) + $(RuntimeAssetsOutputPath) + $(NativeAssetsOutputPath) + $(SharedFxName) + $(PackageId) + + + + + + true + true + All + Native + true + + + + Runtime;Native + + + + + + + + + + + + + + <_UnknownRid Remove="@(_UnknownRid)" /> + <_UnknownRid Include="$(SharedFxRid)" Exclude="$(SupportedRuntimeIdentifiers)" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Microsoft.NETCore.App + crossgen + $(CrossGenTool).exe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(FullPath) + $(IntermediateOutputPath)%(RecursiveDir)%(Filename).rsp + $(IntermediateOutputPath)%(RecursiveDir)%(Filename).symbols.rsp + $(SymbolsOutputPath)%(RecursiveDir)%(Filename).ni.pdb + $(RuntimeAssetsOutputPath)%(RecursiveDir)%(Filename)%(Extension) + $(SymbolsOutputPath)%(RecursiveDir) + + + + + + + + + + + + + <_PlatformAssemblyPaths Remove="@(_PlatformAssemblyPaths)" /> + <_PlatformAssemblyPaths Include="$(CrossGenToolDir)" /> + <_PlatformAssemblyPaths Include="$(PublishDir)" /> + <_PlatformAssemblyPaths Include="%(_ResolvedFrameworkProjectReferencePaths.RuntimeAssetsOutputPath)" Condition="'%(_ResolvedFrameworkProjectReferencePaths.RuntimeAssetsOutputPath)' != ''" /> + + + + @(_PlatformAssemblyPaths->Distinct(), '$(PathSeparator)') + + + + + + + + + + + + + + + + + + + + + + CreatePerfMap + CreatePDB + + + + + + + + + + + + + + + + + + + diff --git a/src/Framework/Directory.Build.props b/src/Framework/Directory.Build.props new file mode 100644 index 000000000000..e914efbc027b --- /dev/null +++ b/src/Framework/Directory.Build.props @@ -0,0 +1,29 @@ + + + + + true + + $(RepositoryRoot)obj\pkg\$(MSBuildProjectName)\ + + + + + + + $(ArtifactsConfigurationDir)$(SharedFxRid)\$(MSBuildProjectName)\ + $(RepositoryRoot)obj\fx\$(MSBuildProjectName)\ + + false + false + + true + $(MSBuildThisFileDirectory)runtime.fx.nuspec + aspnetcore;shared-framework + + + diff --git a/src/Framework/Directory.Build.targets b/src/Framework/Directory.Build.targets new file mode 100644 index 000000000000..e8f4992a1a25 --- /dev/null +++ b/src/Framework/Directory.Build.targets @@ -0,0 +1,28 @@ + + + + + + + + + id=$(PackageId); + version=$(PackageVersion); + authors=$(Authors); + rid=$(SharedFxRid); + description=$(PackageDescription); + tags=$(PackageTags.Replace(';', ' ')); + licenseUrl=$(PackageLicenseUrl); + projectUrl=$(PackageProjectUrl); + iconUrl=$(PackageIconUrl); + repositoryUrl=$(RepositoryUrl); + repositoryCommit=$(RepositoryCommit); + copyright=$(Copyright); + targetFramework=$(TargetFramework); + symbolsAssets=$(SymbolsOutputPath); + nativeAssets=$(NativeAssetsOutputPath); + runtimeAssets=$(RuntimeAssetsOutputPath); + + + + diff --git a/test/SharedFx.UnitTests/AssertEx.cs b/src/Framework/Framework.UnitTests/AssertEx.cs similarity index 100% rename from test/SharedFx.UnitTests/AssertEx.cs rename to src/Framework/Framework.UnitTests/AssertEx.cs diff --git a/test/SharedFx.UnitTests/SharedFx.UnitTests.csproj b/src/Framework/Framework.UnitTests/Framework.UnitTests.csproj similarity index 62% rename from test/SharedFx.UnitTests/SharedFx.UnitTests.csproj rename to src/Framework/Framework.UnitTests/Framework.UnitTests.csproj index 77d020f3dc19..5b3faf326a8d 100644 --- a/test/SharedFx.UnitTests/SharedFx.UnitTests.csproj +++ b/src/Framework/Framework.UnitTests/Framework.UnitTests.csproj @@ -3,6 +3,7 @@ netcoreapp2.2 Microsoft.AspNetCore + false @@ -11,12 +12,8 @@ <_Parameter2>$(PackageVersion) - <_Parameter1>DotNetRoot - <_Parameter2>$(SharedFxOutputPath) - - - <_Parameter1>SharedFxRuntimeIdentifier - <_Parameter2>$(SharedFxRuntimeIdentifier) + <_Parameter1>SharedFxRid + <_Parameter2>$(SharedFxRid) <_Parameter1>RepositoryCommit @@ -36,4 +33,20 @@ + + + false + _ResolvedFrameworkReference + + + + + + + <_Parameter1>SharedFxMetadataOutput:%(_ResolvedFrameworkReference.SharedFxName) + <_Parameter2>%(_ResolvedFrameworkReference.MetadataOutputPath) + + + + diff --git a/test/SharedFx.UnitTests/SharedFxTests.cs b/src/Framework/Framework.UnitTests/SharedFxTests.cs similarity index 77% rename from test/SharedFx.UnitTests/SharedFxTests.cs rename to src/Framework/Framework.UnitTests/SharedFxTests.cs index d18fa17ef805..2d255fe35e3f 100644 --- a/test/SharedFx.UnitTests/SharedFxTests.cs +++ b/src/Framework/Framework.UnitTests/SharedFxTests.cs @@ -13,12 +13,10 @@ public class SharedFxTests [MemberData(nameof(GetSharedFxConfig))] public void ItContainsValidRuntimeConfigFile(SharedFxConfig config) { - var root = TestData.GetDotNetRoot(); - var dir = Path.Combine(root, "shared", config.Name, config.Version); - var runtimeConfigFilePath = Path.Combine(dir, config.Name + ".runtimeconfig.json"); + var runtimeConfigFilePath = Path.Combine(config.MetadataOutput, config.Name + ".runtimeconfig.json"); AssertEx.FileExists(runtimeConfigFilePath); - AssertEx.FileDoesNotExists(Path.Combine(dir, config.Name + ".runtimeconfig.dev.json")); + AssertEx.FileDoesNotExists(Path.Combine(config.MetadataOutput, config.Name + ".runtimeconfig.dev.json")); var runtimeConfig = JObject.Parse(File.ReadAllText(runtimeConfigFilePath)); @@ -32,9 +30,7 @@ public void ItContainsValidRuntimeConfigFile(SharedFxConfig config) [MemberData(nameof(GetSharedFxConfig))] public void ItContainsValidDepsJson(SharedFxConfig config) { - var root = TestData.GetDotNetRoot(); - var dir = Path.Combine(root, "shared", config.Name, config.Version); - var depsFilePath = Path.Combine(dir, config.Name + ".deps.json"); + var depsFilePath = Path.Combine(config.MetadataOutput, config.Name + ".deps.json"); var target = $".NETCoreApp,Version=v{config.Version.Substring(0, 3)}/{config.RuntimeIdentifier}"; @@ -47,14 +43,20 @@ public void ItContainsValidDepsJson(SharedFxConfig config) Assert.NotNull(depsFile["compilationOptions"]); Assert.Empty(depsFile["compilationOptions"]); Assert.NotEmpty(depsFile["runtimes"][config.RuntimeIdentifier]); + Assert.All(depsFile["libraries"], item => + { + var prop = Assert.IsType(item); + var lib = Assert.IsType(prop.Value); + Assert.Equal("package", lib["type"].Value()); + Assert.StartsWith("sha512-", lib["sha512"].Value()); + }); } [Theory] [MemberData(nameof(GetSharedFxConfig))] public void ItContainsVersionFile(SharedFxConfig config) { - var root = TestData.GetDotNetRoot(); - var versionFile = Path.Combine(root, "shared", config.Name, config.Version, ".version"); + var versionFile = Path.Combine(config.MetadataOutput, ".version"); AssertEx.FileExists(versionFile); var lines = File.ReadAllLines(versionFile); Assert.Equal(2, lines.Length); @@ -62,7 +64,6 @@ public void ItContainsVersionFile(SharedFxConfig config) Assert.Equal(config.Version, lines[1]); } - public static TheoryData GetSharedFxConfig() => new TheoryData { @@ -74,6 +75,7 @@ public static TheoryData GetSharedFxConfig() BaseSharedFxVersion = TestData.GetPackageVersion(), BaseSharedFxName = "Microsoft.AspNetCore.App", RuntimeIdentifier = TestData.GetSharedFxRuntimeIdentifier(), + MetadataOutput = TestData.GetTestDataValue("SharedFxMetadataOutput:Microsoft.AspNetCore.All") }, new SharedFxConfig { @@ -82,6 +84,7 @@ public static TheoryData GetSharedFxConfig() BaseSharedFxName = "Microsoft.NETCore.App", BaseSharedFxVersion = TestData.GetMicrosoftNETCoreAppPackageVersion(), RuntimeIdentifier = TestData.GetSharedFxRuntimeIdentifier(), + MetadataOutput = TestData.GetTestDataValue("SharedFxMetadataOutput:Microsoft.AspNetCore.App") }, }; @@ -92,6 +95,7 @@ public class SharedFxConfig public string BaseSharedFxName { get; set; } public string BaseSharedFxVersion { get; set; } public string RuntimeIdentifier { get; set; } + public string MetadataOutput { get; set; } } } } diff --git a/test/SharedFx.UnitTests/TestData.cs b/src/Framework/Framework.UnitTests/TestData.cs similarity index 80% rename from test/SharedFx.UnitTests/TestData.cs rename to src/Framework/Framework.UnitTests/TestData.cs index eb01f60e8b2d..a33613aff80e 100644 --- a/test/SharedFx.UnitTests/TestData.cs +++ b/src/Framework/Framework.UnitTests/TestData.cs @@ -12,13 +12,11 @@ public class TestData public static string GetMicrosoftNETCoreAppPackageVersion() => GetTestDataValue("MicrosoftNETCoreAppPackageVersion"); - public static string GetDotNetRoot() => GetTestDataValue("DotNetRoot"); - public static string GetRepositoryCommit() => GetTestDataValue("RepositoryCommit"); - public static string GetSharedFxRuntimeIdentifier() => GetTestDataValue("SharedFxRuntimeIdentifier"); + public static string GetSharedFxRuntimeIdentifier() => GetTestDataValue("SharedFxRid"); - private static string GetTestDataValue(string key) + public static string GetTestDataValue(string key) => typeof(TestData).Assembly.GetCustomAttributes().Single(d => d.Key == key).Value; } } diff --git a/test/SharedFx.UnitTests/TestDataAttribute.cs b/src/Framework/Framework.UnitTests/TestDataAttribute.cs similarity index 100% rename from test/SharedFx.UnitTests/TestDataAttribute.cs rename to src/Framework/Framework.UnitTests/TestDataAttribute.cs diff --git a/src/Framework/Metapackage.targets b/src/Framework/Metapackage.targets new file mode 100644 index 000000000000..127854f4ca76 --- /dev/null +++ b/src/Framework/Metapackage.targets @@ -0,0 +1,59 @@ + + + + false + + false + + false + + true + + true + + $(MSBuildProjectName) + $(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg + + + + + + + + + $(PackageId) + + + + + + + + + + + + + + None + + + + + + + + NuGetPackage + $(PackageId) + $(PackageVersion) + + + + + + + + diff --git a/src/Framework/Microsoft.AspNetCore.All/pkg/Microsoft.AspNetCore.All.pkgproj b/src/Framework/Microsoft.AspNetCore.All/pkg/Microsoft.AspNetCore.All.pkgproj new file mode 100644 index 000000000000..7f4153e2b689 --- /dev/null +++ b/src/Framework/Microsoft.AspNetCore.All/pkg/Microsoft.AspNetCore.All.pkgproj @@ -0,0 +1,44 @@ + + + + netcoreapp2.2 + aspnetcore + Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. + +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. + + + + + + + + + + + + Minimum + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.props b/src/Framework/Microsoft.AspNetCore.All/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.All.props similarity index 100% rename from src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.props rename to src/Framework/Microsoft.AspNetCore.All/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.All.props diff --git a/src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets b/src/Framework/Microsoft.AspNetCore.All/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets similarity index 100% rename from src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets rename to src/Framework/Microsoft.AspNetCore.All/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets diff --git a/src/Packages/Microsoft.AspNetCore.All/lib/netcoreapp2.2/_._ b/src/Framework/Microsoft.AspNetCore.All/pkg/lib/netcoreapp2.2/_._ similarity index 100% rename from src/Packages/Microsoft.AspNetCore.All/lib/netcoreapp2.2/_._ rename to src/Framework/Microsoft.AspNetCore.All/pkg/lib/netcoreapp2.2/_._ diff --git a/src/Framework/Microsoft.AspNetCore.All/src/Microsoft.AspNetCore.All.shfxproj b/src/Framework/Microsoft.AspNetCore.All/src/Microsoft.AspNetCore.All.shfxproj new file mode 100644 index 000000000000..63dfa9f68a08 --- /dev/null +++ b/src/Framework/Microsoft.AspNetCore.All/src/Microsoft.AspNetCore.All.shfxproj @@ -0,0 +1,21 @@ + + + + netcoreapp2.2 + Microsoft.AspNetCore.App + $(MicrosoftNETCoreAppPackageVersion) + + + runtime.$(SharedFxRid).$(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, and also includes API for third-party integrations with ASP.NET Core. + + + + + + + + + diff --git a/src/Framework/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.props b/src/Framework/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.props new file mode 100644 index 000000000000..d0dd45255792 --- /dev/null +++ b/src/Framework/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.props @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Packages/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj b/src/Framework/Microsoft.AspNetCore.App/pkg/Microsoft.AspNetCore.App.pkgproj similarity index 79% rename from src/Packages/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj rename to src/Framework/Microsoft.AspNetCore.App/pkg/Microsoft.AspNetCore.App.pkgproj index b1de4b7fe890..38fc9b7543d0 100644 --- a/src/Packages/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj +++ b/src/Framework/Microsoft.AspNetCore.App/pkg/Microsoft.AspNetCore.App.pkgproj @@ -1,11 +1,8 @@ - false - false netcoreapp2.2 aspnetcore - false 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. @@ -18,4 +15,12 @@ This package requires the ASP.NET Core runtime. This runtime is installed by the + + + MajorMinor + + + + + diff --git a/src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.props b/src/Framework/Microsoft.AspNetCore.App/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.App.props similarity index 100% rename from src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.props rename to src/Framework/Microsoft.AspNetCore.App/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.App.props diff --git a/src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets b/src/Framework/Microsoft.AspNetCore.App/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets similarity index 100% rename from src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets rename to src/Framework/Microsoft.AspNetCore.App/pkg/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets diff --git a/src/Packages/Microsoft.AspNetCore.App/lib/netcoreapp2.2/_._ b/src/Framework/Microsoft.AspNetCore.App/pkg/lib/netcoreapp2.2/_._ similarity index 100% rename from src/Packages/Microsoft.AspNetCore.App/lib/netcoreapp2.2/_._ rename to src/Framework/Microsoft.AspNetCore.App/pkg/lib/netcoreapp2.2/_._ diff --git a/src/Framework/Microsoft.AspNetCore.App/src/Microsoft.AspNetCore.App.shfxproj b/src/Framework/Microsoft.AspNetCore.App/src/Microsoft.AspNetCore.App.shfxproj new file mode 100644 index 000000000000..f0e2af18d92e --- /dev/null +++ b/src/Framework/Microsoft.AspNetCore.App/src/Microsoft.AspNetCore.App.shfxproj @@ -0,0 +1,20 @@ + + + + netcoreapp2.2 + Microsoft.NETCore.App + $(MicrosoftNETCoreAppPackageVersion) + + + runtime.$(SharedFxRid).$(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. + + + + + + + + diff --git a/src/Framework/_._ b/src/Framework/_._ new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/src/Framework/runtime.fx.nuspec b/src/Framework/runtime.fx.nuspec new file mode 100644 index 000000000000..bbfbe70ec335 --- /dev/null +++ b/src/Framework/runtime.fx.nuspec @@ -0,0 +1,24 @@ + + + + $id$ + $version$ + $authors$ + $licenseUrl$ + $projectUrl$ + $iconUrl$ + $description$ + $copyright$ + $tags$ + + true + true + + + + + + + + + diff --git a/src/Installers/Archive.Internal/Archive.Internal.zipproj b/src/Installers/Archive.Internal/Archive.Internal.zipproj new file mode 100644 index 000000000000..2501b67be85e --- /dev/null +++ b/src/Installers/Archive.Internal/Archive.Internal.zipproj @@ -0,0 +1,49 @@ + + + + + + + + $(RepositoryRoot)obj\ai\$(SharedFxRid)\ + $(InternalInstallerBaseName)-$(PackageVersion)-$(SharedFxRid)$(ArchiveExtension) + $(InstallersOutputPath) + $(InstallersOutputPath)$(OutputFileName) + + + + + true + _ResolvedFxProjects + + + + + + + + + + + + + + $(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\ + + + + + + + + + + diff --git a/src/Installers/Archive.Redist/Archive.Redist.zipproj b/src/Installers/Archive.Redist/Archive.Redist.zipproj new file mode 100644 index 000000000000..b667e2634c73 --- /dev/null +++ b/src/Installers/Archive.Redist/Archive.Redist.zipproj @@ -0,0 +1,68 @@ + + + + + + + + $(RepositoryRoot)obj\ar\ + $(BaseIntermediateOutputPath)$(SharedFxRid)\ + $(RuntimeInstallerBaseName)-$(PackageVersion)-$(SharedFxRid)$(ArchiveExtension) + $(InstallersOutputPath) + $(InstallersOutputPath)$(OutputFileName) + dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(SharedFxRid)$(ArchiveExtension) + $(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppPackageVersion)/$(DotNetRuntimeArchiveFileName) + $(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName) + + + + + true + _ResolvedFxProjects + + + + + + + + + + + + + + + + $(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\ + + + + + + + + + + + + + + + + + diff --git a/src/Installers/Directory.Build.props b/src/Installers/Directory.Build.props new file mode 100644 index 000000000000..489a37b2c871 --- /dev/null +++ b/src/Installers/Directory.Build.props @@ -0,0 +1,14 @@ + + + + + + aspnetcore-runtime + + $(RuntimeInstallerBaseName)-internal + + .tar.gz + .zip + + + diff --git a/src/Installers/Windows/Directory.Build.props b/src/Installers/Windows/Directory.Build.props index 096863e2450a..af15a651bd21 100644 --- a/src/Installers/Windows/Directory.Build.props +++ b/src/Installers/Windows/Directory.Build.props @@ -8,10 +8,6 @@ $(RootOutputPath)obj/$(MSBuildProjectName)/ $(BaseIntermediateOutputPath)$(Configuration)/ $(IntermediateOutputPath)$(Platform)/ - - aspnetcore-runtime - - $(RuntimeInstallerBaseName)-internal diff --git a/src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj b/src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj index 672ca7de6600..40fd51c943ce 100644 --- a/src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj +++ b/src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj @@ -4,7 +4,8 @@ AspNetCoreSharedFrameworkLib$(Platform) - $(WixlibBaseFileName)-$(PackageVersion)-win-$(Platform) + + $(InternalInstallerBaseName)-$(PackageVersion)-win-$(Platform) Library true $(SharedFrameworkNamespaceGuid) diff --git a/src/Packages/Directory.Build.props b/src/Packages/Directory.Build.props deleted file mode 100644 index 02d2ee4d231a..000000000000 --- a/src/Packages/Directory.Build.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/Packages/Directory.Build.targets b/src/Packages/Directory.Build.targets deleted file mode 100644 index db9b73869a71..000000000000 --- a/src/Packages/Directory.Build.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - NuGetPackage - $(PackageId) - $(PackageVersion) - - - - diff --git a/src/Packages/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj b/src/Packages/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj deleted file mode 100644 index c5bb332ad845..000000000000 --- a/src/Packages/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - false - false - netcoreapp2.2 - aspnetcore - false - Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. - -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. - - - - - - - - - - diff --git a/src/Packages/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj b/src/Packages/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj deleted file mode 100644 index a9f907171997..000000000000 --- a/src/Packages/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - false - false - netstandard2.0 - aspnetcore - Microsoft.AspNetCore.Analyzers - - $(ExperimentalVersionPrefix) - $(ExperimentalVersionSuffix) - $(ExperimentalPackageVersion) - false - - false - - - diff --git a/version.props b/version.props index b43ef1365b3c..8719aca8f2e0 100644 --- a/version.props +++ b/version.props @@ -5,7 +5,7 @@ 0 rtm - t000 + $([System.DateTime]::Now.ToString('yyMMdd'))-99 $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion) 0.2.$(AspNetCorePatchVersion) $(PreReleaseLabel)-$(BuildNumber)