From 968df9578b967512110a5fc9897544690f2b60db Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 24 Oct 2018 15:42:06 -0700 Subject: [PATCH 01/32] Refactor shared framework projects targets and project layout (#3703) This refactors the targets used to build the shared framework and its .zip files. There are lots of reasons motivating this: Arcade convergence, migration to VSTS, making it easier to build this locally, etc. Changes: * Moves move content of build/Sharedfx.{props/targets} into eng/targets/SharedFx.Common.{props/targets} * Update the build to produce a `runtime.$rid.Microsoft.AspNetCore.App` package (not just the one with symbols in it) * Refactor the targets which produce .tar.gz/.zip files into separate projects in `src/Installers/` * Refactor installers, unit tests, and the framework projects to use ProjectReference to flow dependencies between different parts of the build. * Makes it easier to build the shared framework locally (for the inner dev loop, you can run `dotnet build -p src/Framework/Microsoft.AspNetCore.App/src/ -r win-x64`) --- .azure/pipelines/ci-official.yml | 2 + .editorconfig | 2 +- Directory.Build.props | 40 +- Directory.Build.targets | 3 +- Microsoft.AspNetCore.sln | 39 -- build/SharedFx.props | 9 +- build/SharedFx.targets | 567 ++---------------- build/SharedFxInstaller.targets | 63 +- build/artifacts.props | 358 ++++++----- build/external-dependencies.props | 67 +-- build/repo.beforecommon.props | 10 - build/repo.targets | 24 +- build/sources.props | 5 + build/tasks/AddMetapackageReferences.cs | 134 ----- build/tasks/ProcessSharedFrameworkDeps.cs | 68 ++- build/tasks/RepoTasks.tasks | 4 +- build/tasks/ResolveSymbolsRecursivePath.cs | 29 - build/tasks/ResolveVersionRange.cs | 68 +++ build/tasks/TrimDeps.cs | 60 -- build/tasks/Utilities/RuntimeReference.cs | 27 +- .../tools/templates/SharedFx/SharedFx.csproj | 35 -- .../SharedFrameworkSymbols.nuspec | 18 - eng/targets/SharedFx.Common.props | 36 ++ eng/targets/SharedFx.Common.targets | 328 ++++++++++ src/Framework/Directory.Build.props | 29 + src/Framework/Directory.Build.targets | 28 + .../Framework.UnitTests}/AssertEx.cs | 0 .../Framework.UnitTests.csproj | 25 +- .../Framework.UnitTests}/SharedFxTests.cs | 24 +- .../Framework.UnitTests}/TestData.cs | 6 +- .../Framework.UnitTests}/TestDataAttribute.cs | 0 src/Framework/Metapackage.targets | 59 ++ .../pkg/Microsoft.AspNetCore.All.pkgproj | 44 ++ .../Microsoft.AspNetCore.All.props | 0 .../Microsoft.AspNetCore.All.targets | 0 .../pkg}/lib/netcoreapp2.2/_._ | 0 .../src/Microsoft.AspNetCore.All.shfxproj | 21 + .../Microsoft.AspNetCore.App.props | 159 +++++ .../pkg/Microsoft.AspNetCore.App.pkgproj} | 11 +- .../Microsoft.AspNetCore.App.props | 0 .../Microsoft.AspNetCore.App.targets | 0 .../pkg}/lib/netcoreapp2.2/_._ | 0 .../src/Microsoft.AspNetCore.App.shfxproj | 20 + src/Framework/_._ | 0 src/Framework/runtime.fx.nuspec | 24 + .../Archive.Internal/Archive.Internal.zipproj | 49 ++ .../Archive.Redist/Archive.Redist.zipproj | 68 +++ src/Installers/Directory.Build.props | 14 + src/Installers/Windows/Directory.Build.props | 4 - .../SharedFrameworkLib.wixproj | 3 +- src/Packages/Directory.Build.props | 7 - src/Packages/Directory.Build.targets | 11 - .../Microsoft.AspNetCore.All.csproj | 21 - .../Microsoft.AspNetCore.Analyzers.csproj | 18 - version.props | 2 +- 55 files changed, 1375 insertions(+), 1268 deletions(-) delete mode 100644 Microsoft.AspNetCore.sln delete mode 100644 build/repo.beforecommon.props delete mode 100644 build/tasks/AddMetapackageReferences.cs delete mode 100644 build/tasks/ResolveSymbolsRecursivePath.cs create mode 100644 build/tasks/ResolveVersionRange.cs delete mode 100644 build/tasks/TrimDeps.cs delete mode 100644 build/tools/templates/SharedFx/SharedFx.csproj delete mode 100644 build/tools/templates/SharedFxSymbols/SharedFrameworkSymbols.nuspec create mode 100644 eng/targets/SharedFx.Common.props create mode 100644 eng/targets/SharedFx.Common.targets create mode 100644 src/Framework/Directory.Build.props create mode 100644 src/Framework/Directory.Build.targets rename {test/SharedFx.UnitTests => src/Framework/Framework.UnitTests}/AssertEx.cs (100%) rename test/SharedFx.UnitTests/SharedFx.UnitTests.csproj => src/Framework/Framework.UnitTests/Framework.UnitTests.csproj (62%) rename {test/SharedFx.UnitTests => src/Framework/Framework.UnitTests}/SharedFxTests.cs (77%) rename {test/SharedFx.UnitTests => src/Framework/Framework.UnitTests}/TestData.cs (80%) rename {test/SharedFx.UnitTests => src/Framework/Framework.UnitTests}/TestDataAttribute.cs (100%) create mode 100644 src/Framework/Metapackage.targets create mode 100644 src/Framework/Microsoft.AspNetCore.All/pkg/Microsoft.AspNetCore.All.pkgproj rename src/{Packages/Microsoft.AspNetCore.All => Framework/Microsoft.AspNetCore.All/pkg}/build/netcoreapp2.2/Microsoft.AspNetCore.All.props (100%) rename src/{Packages/Microsoft.AspNetCore.All => Framework/Microsoft.AspNetCore.All/pkg}/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets (100%) rename src/{Packages/Microsoft.AspNetCore.All => Framework/Microsoft.AspNetCore.All/pkg}/lib/netcoreapp2.2/_._ (100%) create mode 100644 src/Framework/Microsoft.AspNetCore.All/src/Microsoft.AspNetCore.All.shfxproj create mode 100644 src/Framework/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.props rename src/{Packages/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj => Framework/Microsoft.AspNetCore.App/pkg/Microsoft.AspNetCore.App.pkgproj} (79%) rename src/{Packages/Microsoft.AspNetCore.App => Framework/Microsoft.AspNetCore.App/pkg}/build/netcoreapp2.2/Microsoft.AspNetCore.App.props (100%) rename src/{Packages/Microsoft.AspNetCore.App => Framework/Microsoft.AspNetCore.App/pkg}/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets (100%) rename src/{Packages/Microsoft.AspNetCore.App => Framework/Microsoft.AspNetCore.App/pkg}/lib/netcoreapp2.2/_._ (100%) create mode 100644 src/Framework/Microsoft.AspNetCore.App/src/Microsoft.AspNetCore.App.shfxproj create mode 100644 src/Framework/_._ create mode 100644 src/Framework/runtime.fx.nuspec create mode 100644 src/Installers/Archive.Internal/Archive.Internal.zipproj create mode 100644 src/Installers/Archive.Redist/Archive.Redist.zipproj create mode 100644 src/Installers/Directory.Build.props delete mode 100644 src/Packages/Directory.Build.props delete mode 100644 src/Packages/Directory.Build.targets delete mode 100644 src/Packages/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj delete mode 100644 src/Packages/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj diff --git a/.azure/pipelines/ci-official.yml b/.azure/pipelines/ci-official.yml index 6647260d89..bf6f9e35a8 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 4eb7559fce..35147d7db8 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 813f3db1f2..a75b389917 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 ebda4d3771..8ad5f96127 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 809b017e25..0000000000 --- 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 a32a5f1851..14595bab89 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 b612e5cb2e..c2afa70945 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 50cfb4d5a5..bebfb54451 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 db430f5c9c..b4c17f7d61 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 532e2c37a0..9ed3c8aebd 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 f470e9b2a6..0000000000 --- a/build/repo.beforecommon.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - true - - diff --git a/build/repo.targets b/build/repo.targets index d6c00978c3..764d74f46f 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 5b458ddf09..a08e49dfdb 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 3cb11666ab..0000000000 --- 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 87250780a8..49189544f3 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 @@ using RepoTasks.Utilities; namespace RepoTasks { - public partial class ProcessSharedFrameworkDeps : Task + public class ProcessSharedFrameworkDeps : Task { [Required] public string AssetsFilePath { get; set; } @@ -22,6 +24,15 @@ namespace RepoTasks [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 @@ namespace RepoTasks 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 @@ namespace RepoTasks 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 5339c01d01..5df75df385 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 21dd795fcd..0000000000 --- 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 0000000000..cedc94b404 --- /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 b63bdb35cc..0000000000 --- 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 4907a73723..8f682eaa52 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 @@ namespace RepoTasks.Utilities return result; } } -} \ No newline at end of file +} diff --git a/build/tools/templates/SharedFx/SharedFx.csproj b/build/tools/templates/SharedFx/SharedFx.csproj deleted file mode 100644 index 60d28275ec..0000000000 --- a/build/tools/templates/SharedFx/SharedFx.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - 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 1ba4b6c85d..0000000000 --- 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 0000000000..7f562c98f9 --- /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 0000000000..c0dc682963 --- /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 0000000000..e914efbc02 --- /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 0000000000..e8f4992a1a --- /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 77d020f3dc..5b3faf326a 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 d18fa17ef8..2d255fe35e 100644 --- a/test/SharedFx.UnitTests/SharedFxTests.cs +++ b/src/Framework/Framework.UnitTests/SharedFxTests.cs @@ -13,12 +13,10 @@ namespace Microsoft.AspNetCore [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 @@ namespace Microsoft.AspNetCore [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 @@ namespace Microsoft.AspNetCore 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 @@ namespace Microsoft.AspNetCore Assert.Equal(config.Version, lines[1]); } - public static TheoryData GetSharedFxConfig() => new TheoryData { @@ -74,6 +75,7 @@ namespace Microsoft.AspNetCore BaseSharedFxVersion = TestData.GetPackageVersion(), BaseSharedFxName = "Microsoft.AspNetCore.App", RuntimeIdentifier = TestData.GetSharedFxRuntimeIdentifier(), + MetadataOutput = TestData.GetTestDataValue("SharedFxMetadataOutput:Microsoft.AspNetCore.All") }, new SharedFxConfig { @@ -82,6 +84,7 @@ namespace Microsoft.AspNetCore BaseSharedFxName = "Microsoft.NETCore.App", BaseSharedFxVersion = TestData.GetMicrosoftNETCoreAppPackageVersion(), RuntimeIdentifier = TestData.GetSharedFxRuntimeIdentifier(), + MetadataOutput = TestData.GetTestDataValue("SharedFxMetadataOutput:Microsoft.AspNetCore.App") }, }; @@ -92,6 +95,7 @@ namespace Microsoft.AspNetCore 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 eb01f60e8b..a33613aff8 100644 --- a/test/SharedFx.UnitTests/TestData.cs +++ b/src/Framework/Framework.UnitTests/TestData.cs @@ -12,13 +12,11 @@ namespace Microsoft.AspNetCore 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 0000000000..127854f4ca --- /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 0000000000..7f4153e2b6 --- /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 0000000000..63dfa9f68a --- /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 0000000000..d0dd452557 --- /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 b1de4b7fe8..38fc9b7543 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 0000000000..f0e2af18d9 --- /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 0000000000..e69de29bb2 diff --git a/src/Framework/runtime.fx.nuspec b/src/Framework/runtime.fx.nuspec new file mode 100644 index 0000000000..bbfbe70ec3 --- /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 0000000000..2501b67be8 --- /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 0000000000..b667e2634c --- /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 0000000000..489a37b2c8 --- /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 096863e245..af15a651bd 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 672ca7de66..40fd51c943 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 02d2ee4d23..0000000000 --- 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 db9b73869a..0000000000 --- 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 c5bb332ad8..0000000000 --- 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 a9f9071719..0000000000 --- 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 b43ef1365b..8719aca8f2 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) From fd48670abee9a7a4ab16c4dd9ce8d5de37642a00 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 24 Oct 2018 17:11:28 -0700 Subject: [PATCH 02/32] Add a restore source to the artifacts/build folder and ensure build number is consistent when running local builds --- build/sources.props | 4 ++++ version.props | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/sources.props b/build/sources.props index a08e49dfdb..7f3d24608f 100644 --- a/build/sources.props +++ b/build/sources.props @@ -7,6 +7,10 @@ $(DotNetAdditionalRestoreSources); $(DotNetRestoreSources); + + $(RepositoryRoot)artifacts/build/; + $(DotNetRestoreSources); + $(RestoreSources); https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; diff --git a/version.props b/version.props index 8719aca8f2..96f9bff706 100644 --- a/version.props +++ b/version.props @@ -5,7 +5,7 @@ 0 rtm - $([System.DateTime]::Now.ToString('yyMMdd'))-99 + $([System.DateTime]::Now.ToString('yyMMdd'))-99 $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion) 0.2.$(AspNetCorePatchVersion) $(PreReleaseLabel)-$(BuildNumber) From 11d0b328ba1845103160baf864144dfd07bcbf42 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 24 Oct 2018 21:05:44 -0700 Subject: [PATCH 03/32] Remove VS.Web.CodeGeneration packages from the fallback folder cache (#3717) --- docs/PackageArchives.md | 4 ---- src/PackageArchive/Scenario.WebApp/Scenario.WebApp.csproj | 8 -------- 2 files changed, 12 deletions(-) diff --git a/docs/PackageArchives.md b/docs/PackageArchives.md index 99ebe79cc3..04890a3aaf 100644 --- a/docs/PackageArchives.md +++ b/docs/PackageArchives.md @@ -46,10 +46,6 @@ The result of this typically means including the transitive graph of the followi - Packages that Microsoft.NET.Sdk adds implicitly - Microsoft.NETCore.App - NETStandard.Library - - Packages that are a PackageReference/DotNetCliToolReference in basic ASP.NET Core templates. In addition to packages above, this typically includes: - - Microsoft.EntityFrameworkCore.Tools{.DotNet} - - Microsoft.VisualStudio.Web.CodeGeneration.Design - - Microsoft.VisualStudio.Web.BrowserLink ### Example diff --git a/src/PackageArchive/Scenario.WebApp/Scenario.WebApp.csproj b/src/PackageArchive/Scenario.WebApp/Scenario.WebApp.csproj index 5cccdc8fe6..fde4541dbe 100644 --- a/src/PackageArchive/Scenario.WebApp/Scenario.WebApp.csproj +++ b/src/PackageArchive/Scenario.WebApp/Scenario.WebApp.csproj @@ -16,14 +16,6 @@ - - - - - - - - From a8a3f99f1a9c3e530222af8f35007a55d7c8623b Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 25 Oct 2018 10:36:18 -0700 Subject: [PATCH 04/32] Skip restore on .zipproj files Attempting to workaround a race condition in /t:Restore when building the shared framework projects --- build/SharedFx.targets | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index c2afa70945..3fe37c3d10 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -1,6 +1,12 @@ + + + true + + + $(RepositoryRoot)\src\Framework\Framework.UnitTests\Framework.UnitTests.csproj @@ -9,8 +15,8 @@ - - + + @@ -18,7 +24,9 @@ + BuildInParallel="true" + SkipNonexistentTargets="true" + Condition=" '%(Restore)' != 'false' " /> Date: Thu, 25 Oct 2018 11:09:41 -0700 Subject: [PATCH 05/32] Update CLI functional tests to account for the addition of Microsoft.IdentityModel.JsonWebTokens.dll --- test/Cli.FunctionalTests/Templates/WebTemplate.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Cli.FunctionalTests/Templates/WebTemplate.cs b/test/Cli.FunctionalTests/Templates/WebTemplate.cs index ea584efb3c..783b02eddb 100644 --- a/test/Cli.FunctionalTests/Templates/WebTemplate.cs +++ b/test/Cli.FunctionalTests/Templates/WebTemplate.cs @@ -190,6 +190,7 @@ namespace Cli.FunctionalTests.Templates "Microsoft.Extensions.Options.dll", "Microsoft.Extensions.Primitives.dll", "Microsoft.Extensions.WebEncoders.dll", + "Microsoft.IdentityModel.JsonWebTokens.dll", "Microsoft.IdentityModel.Logging.dll", "Microsoft.IdentityModel.Protocols.dll", "Microsoft.IdentityModel.Protocols.OpenIdConnect.dll", From 9ef45e0c887eeb61789181d15fdeb3f06ad4b6f4 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 25 Oct 2018 11:29:08 -0700 Subject: [PATCH 06/32] Remove reference to non-existent target "BuildMetapackages" --- build/repo.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/repo.targets b/build/repo.targets index 764d74f46f..cfb9044bab 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -16,7 +16,7 @@ $(CleanDependsOn);CleanArtifacts;CleanRepoArtifacts $(RestoreDependsOn);InstallDotNet $(CompileDependsOn);BuildRepositories;BuildSharedFx - $(PackageDependsOn);BuildMetapackages;CheckExpectedPackagesExist + $(PackageDependsOn);CheckExpectedPackagesExist $(TestDependsOn);_TestRepositories $(GetArtifactInfoDependsOn);ResolveRepoInfo From ab40e6872732848fc4c8290754014aa9cbcdf279 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 25 Oct 2018 12:02:37 -0700 Subject: [PATCH 07/32] Update PackageOutputPath to match KoreBuild's package output path --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index a75b389917..2ab01c9e29 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -41,7 +41,7 @@ $(ArtifactsDir)$(Configuration)\ $(ArtifactsConfigurationDir)bin\ $(ArtifactsConfigurationDir)installers\ - $(ArtifactsConfigurationDir)packages\ + $(ArtifactsDir)build\ win-x64 From dbc28c523e6a25a557775320a8e7acb683fbf697 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 25 Oct 2018 13:28:19 -0700 Subject: [PATCH 08/32] Avoid double restores by invoking NuGet.targets directly --- build/SharedFx.targets | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index 3fe37c3d10..3111c1de28 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -1,12 +1,6 @@ - - - true - - - $(RepositoryRoot)\src\Framework\Framework.UnitTests\Framework.UnitTests.csproj @@ -15,18 +9,19 @@ - - + + - + <_RestoreGraphProjectInput>@(ProjectToBuild) + + + + Properties="$(SolutionProperties);RestoreGraphProjectInput=$(_RestoreGraphProjectInput);_DummyTarget=Restore" /> Date: Thu, 25 Oct 2018 14:27:46 -0700 Subject: [PATCH 09/32] Workaround quirks in NuGet * Disable package analysis because it incorrectly issues NU5109 on macOS, but not windows * Normalize file paths because if you mix slashes, NuGet will just skip the entire folder * Normalize the project path given to restore. If it not normalized, restore skips the project and issues a warning --- build/SharedFx.targets | 3 ++- eng/targets/SharedFx.Common.targets | 3 +++ src/Framework/Directory.Build.props | 4 +++- src/Framework/Directory.Build.targets | 6 +++--- src/Framework/runtime.fx.nuspec | 8 ++++---- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index 3111c1de28..c2d5d7ed5a 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -2,7 +2,8 @@ - $(RepositoryRoot)\src\Framework\Framework.UnitTests\Framework.UnitTests.csproj + $(RepositoryRoot)src\Framework\Framework.UnitTests\Framework.UnitTests.csproj + $([MSBuild]::NormalizePath($(UnitTestFxProject))) diff --git a/eng/targets/SharedFx.Common.targets b/eng/targets/SharedFx.Common.targets index c0dc682963..6102fa6279 100644 --- a/eng/targets/SharedFx.Common.targets +++ b/eng/targets/SharedFx.Common.targets @@ -75,6 +75,9 @@ This targets file should only be imported by .shfxproj files. $(OutputPath) $(IntermediateOutputPath)u\ + + false + $(OutputPath)files\ $(OutputPath)symbols\ $(OutputPath)native\ diff --git a/src/Framework/Directory.Build.props b/src/Framework/Directory.Build.props index e914efbc02..5e777f75d6 100644 --- a/src/Framework/Directory.Build.props +++ b/src/Framework/Directory.Build.props @@ -19,11 +19,13 @@ $(RepositoryRoot)obj\fx\$(MSBuildProjectName)\ false - false + false true $(MSBuildThisFileDirectory)runtime.fx.nuspec aspnetcore;shared-framework + + true diff --git a/src/Framework/Directory.Build.targets b/src/Framework/Directory.Build.targets index e8f4992a1a..2997962ff6 100644 --- a/src/Framework/Directory.Build.targets +++ b/src/Framework/Directory.Build.targets @@ -19,9 +19,9 @@ repositoryCommit=$(RepositoryCommit); copyright=$(Copyright); targetFramework=$(TargetFramework); - symbolsAssets=$(SymbolsOutputPath); - nativeAssets=$(NativeAssetsOutputPath); - runtimeAssets=$(RuntimeAssetsOutputPath); + symbolsAssets=$([MSBuild]::NormalizeDirectory($(SymbolsOutputPath))); + nativeAssets=$([MSBuild]::NormalizeDirectory($(NativeAssetsOutputPath))); + runtimeAssets=$([MSBuild]::NormalizeDirectory($(RuntimeAssetsOutputPath))); diff --git a/src/Framework/runtime.fx.nuspec b/src/Framework/runtime.fx.nuspec index bbfbe70ec3..292d128d1b 100644 --- a/src/Framework/runtime.fx.nuspec +++ b/src/Framework/runtime.fx.nuspec @@ -15,10 +15,10 @@ true - - - + + + - + From ae122d9bc064f00fba1e3dd52ae7e3ecd1259577 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 25 Oct 2018 14:42:00 -0700 Subject: [PATCH 10/32] Include rid-specific runtime packages in the list of artifacts --- build/SharedFx.props | 4 ++++ build/artifacts.props | 2 ++ src/Framework/Directory.Build.targets | 11 +++++++++++ src/Framework/Metapackage.targets | 10 ---------- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/build/SharedFx.props b/build/SharedFx.props index 14595bab89..87d90c2d8b 100644 --- a/build/SharedFx.props +++ b/build/SharedFx.props @@ -1,5 +1,9 @@ + win-x64 + osx-x64 + linux-x64 + <_WorkRoot>$(RepositoryRoot).w\$(SharedFxRID)\ <_WorkLayoutDir>$(_WorkRoot).l\ diff --git a/build/artifacts.props b/build/artifacts.props index b4c17f7d61..28e83cf726 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -24,6 +24,8 @@ + + diff --git a/src/Framework/Directory.Build.targets b/src/Framework/Directory.Build.targets index 2997962ff6..1ff9f7da4b 100644 --- a/src/Framework/Directory.Build.targets +++ b/src/Framework/Directory.Build.targets @@ -25,4 +25,15 @@ + + + + + NuGetPackage + $(PackageId) + $(PackageVersion) + + + + diff --git a/src/Framework/Metapackage.targets b/src/Framework/Metapackage.targets index 127854f4ca..4fc5124a33 100644 --- a/src/Framework/Metapackage.targets +++ b/src/Framework/Metapackage.targets @@ -43,16 +43,6 @@ - - - - NuGetPackage - $(PackageId) - $(PackageVersion) - - - - From 588f91f0e6ee344966945fe442e540d496dd5d23 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 25 Oct 2018 14:47:11 -0700 Subject: [PATCH 11/32] Updating submodule(s) AzureIntegration => c6f978367199763fef1a642a1e31fb6e2959d5b3 CORS => aa88f16b08d239b93075f56b587dc4e650e05572 EntityFrameworkCore => 6d92061d2831ab953d080bb87eec68c851d40182 HttpAbstractions => 91db78cf926939821bc96e8e60616cf5dde0b489 IISIntegration => a9c5eb28d7f374af941f39a485573856ab3f0c18 KestrelHttpServer => 616aeba156d617c98955e437f3283ae66206c2ba Options => a6d348bccbfd5a6b657383202da32e3f5f92f3ce Razor => 2d6643bc854fe7c2d9c87c8bc4348c02406efa57 Routing => 3d828221a19d91907c52c2f40928b019bee1ef92 SignalR => 0aab8e5dd058a449636d8cc74c1814073a709f1f Templating => b05185f1f16a1841dd92986a33eadb595ab84db7 [auto-updated: submodules] --- modules/AzureIntegration | 2 +- modules/CORS | 2 +- modules/EntityFrameworkCore | 2 +- modules/HttpAbstractions | 2 +- modules/IISIntegration | 2 +- modules/KestrelHttpServer | 2 +- modules/Options | 2 +- modules/Razor | 2 +- modules/Routing | 2 +- modules/SignalR | 2 +- modules/Templating | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/AzureIntegration b/modules/AzureIntegration index 8c58d65b24..c6f9783671 160000 --- a/modules/AzureIntegration +++ b/modules/AzureIntegration @@ -1 +1 @@ -Subproject commit 8c58d65b242e04394a263a1e8cbe3b83b3b0bd82 +Subproject commit c6f978367199763fef1a642a1e31fb6e2959d5b3 diff --git a/modules/CORS b/modules/CORS index 50dff844b2..aa88f16b08 160000 --- a/modules/CORS +++ b/modules/CORS @@ -1 +1 @@ -Subproject commit 50dff844b2ce7ff8a0f810cfd96b70d13fff970a +Subproject commit aa88f16b08d239b93075f56b587dc4e650e05572 diff --git a/modules/EntityFrameworkCore b/modules/EntityFrameworkCore index ec2d9b9992..6d92061d28 160000 --- a/modules/EntityFrameworkCore +++ b/modules/EntityFrameworkCore @@ -1 +1 @@ -Subproject commit ec2d9b9992df41da8731cd4cb5f8e46189be1409 +Subproject commit 6d92061d2831ab953d080bb87eec68c851d40182 diff --git a/modules/HttpAbstractions b/modules/HttpAbstractions index 19908d91c7..91db78cf92 160000 --- a/modules/HttpAbstractions +++ b/modules/HttpAbstractions @@ -1 +1 @@ -Subproject commit 19908d91c7e5b1d22aaf0ad4d920e7c73998002d +Subproject commit 91db78cf926939821bc96e8e60616cf5dde0b489 diff --git a/modules/IISIntegration b/modules/IISIntegration index 5c3017524f..a9c5eb28d7 160000 --- a/modules/IISIntegration +++ b/modules/IISIntegration @@ -1 +1 @@ -Subproject commit 5c3017524f8f59d0b205d20104ead3cdb2723436 +Subproject commit a9c5eb28d7f374af941f39a485573856ab3f0c18 diff --git a/modules/KestrelHttpServer b/modules/KestrelHttpServer index a8073167e7..616aeba156 160000 --- a/modules/KestrelHttpServer +++ b/modules/KestrelHttpServer @@ -1 +1 @@ -Subproject commit a8073167e7adcca0d6708d4da56e43066535e3a5 +Subproject commit 616aeba156d617c98955e437f3283ae66206c2ba diff --git a/modules/Options b/modules/Options index b4b50bfedc..a6d348bccb 160000 --- a/modules/Options +++ b/modules/Options @@ -1 +1 @@ -Subproject commit b4b50bfedc2027797b89f42293581497cae7eb03 +Subproject commit a6d348bccbfd5a6b657383202da32e3f5f92f3ce diff --git a/modules/Razor b/modules/Razor index 1eb86af726..2d6643bc85 160000 --- a/modules/Razor +++ b/modules/Razor @@ -1 +1 @@ -Subproject commit 1eb86af72675226617c4a8b08a57b4c5cb5f77ac +Subproject commit 2d6643bc854fe7c2d9c87c8bc4348c02406efa57 diff --git a/modules/Routing b/modules/Routing index 577be72faa..3d828221a1 160000 --- a/modules/Routing +++ b/modules/Routing @@ -1 +1 @@ -Subproject commit 577be72faa07367669842d09147f3f14bb528d31 +Subproject commit 3d828221a19d91907c52c2f40928b019bee1ef92 diff --git a/modules/SignalR b/modules/SignalR index 29c06e2636..0aab8e5dd0 160000 --- a/modules/SignalR +++ b/modules/SignalR @@ -1 +1 @@ -Subproject commit 29c06e26369766f92a40f3f8bbe6e876ad20563e +Subproject commit 0aab8e5dd058a449636d8cc74c1814073a709f1f diff --git a/modules/Templating b/modules/Templating index 70a786adcd..b05185f1f1 160000 --- a/modules/Templating +++ b/modules/Templating @@ -1 +1 @@ -Subproject commit 70a786adcdca3d7880e81b3e6a2aafcab0db072c +Subproject commit b05185f1f16a1841dd92986a33eadb595ab84db7 From 7ec22086ce1df444e62c378d5e8319841dcc8045 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 25 Oct 2018 14:47:19 -0700 Subject: [PATCH 12/32] Updating BuildTools from 2.2.0-preview2-20181019.5 to 2.2.0-preview2-20181024.5 [auto-updated: buildtools] --- global.json | 2 +- korebuild-lock.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index 6a30267e95..61155ef665 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "version": "2.2.100-preview3-009430" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181019.5" + "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181024.5" } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index e4dc6c0867..c253cd046f 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview2-20181019.5 -commithash:84a1c04b13bd7127728fee91989db8f2f58c8781 +version:2.2.0-preview2-20181024.5 +commithash:fb8b4d8feddb9f69c095f30b481efbe43fe85edd From 75cc3fc5b2eccab8c4f96511eeb9ae1c5a01a32a Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Fri, 26 Oct 2018 07:06:38 +0000 Subject: [PATCH 13/32] Updating submodule(s) EntityFrameworkCore => f14134387abbacbb4cb76ef18ffee4df08e800d5 Identity => 168be7b561f1f069144554bb774673cc6f30f726 KestrelHttpServer => d9aba751ae64b1e1a2f57caada1fa9f5af97b071 SignalR => fc3a1fee61ae1746e98edd4ba30da98f64e03a5c Templating => 958e0b1d9f5d636671c1e2bc7ef6ed94a5027a97 [auto-updated: submodules] --- modules/EntityFrameworkCore | 2 +- modules/Identity | 2 +- modules/KestrelHttpServer | 2 +- modules/SignalR | 2 +- modules/Templating | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/EntityFrameworkCore b/modules/EntityFrameworkCore index 6d92061d28..f14134387a 160000 --- a/modules/EntityFrameworkCore +++ b/modules/EntityFrameworkCore @@ -1 +1 @@ -Subproject commit 6d92061d2831ab953d080bb87eec68c851d40182 +Subproject commit f14134387abbacbb4cb76ef18ffee4df08e800d5 diff --git a/modules/Identity b/modules/Identity index daff2f3037..168be7b561 160000 --- a/modules/Identity +++ b/modules/Identity @@ -1 +1 @@ -Subproject commit daff2f303783d5b96fca2149fd41bd8ae0a3668a +Subproject commit 168be7b561f1f069144554bb774673cc6f30f726 diff --git a/modules/KestrelHttpServer b/modules/KestrelHttpServer index 616aeba156..d9aba751ae 160000 --- a/modules/KestrelHttpServer +++ b/modules/KestrelHttpServer @@ -1 +1 @@ -Subproject commit 616aeba156d617c98955e437f3283ae66206c2ba +Subproject commit d9aba751ae64b1e1a2f57caada1fa9f5af97b071 diff --git a/modules/SignalR b/modules/SignalR index 0aab8e5dd0..fc3a1fee61 160000 --- a/modules/SignalR +++ b/modules/SignalR @@ -1 +1 @@ -Subproject commit 0aab8e5dd058a449636d8cc74c1814073a709f1f +Subproject commit fc3a1fee61ae1746e98edd4ba30da98f64e03a5c diff --git a/modules/Templating b/modules/Templating index b05185f1f1..958e0b1d9f 160000 --- a/modules/Templating +++ b/modules/Templating @@ -1 +1 @@ -Subproject commit b05185f1f16a1841dd92986a33eadb595ab84db7 +Subproject commit 958e0b1d9f5d636671c1e2bc7ef6ed94a5027a97 From 99f2ecd02f008c5628c1e027320673962e40a8d9 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Fri, 26 Oct 2018 09:49:19 -0700 Subject: [PATCH 14/32] Move transformation tests from AzureIntegration (#3726) --- src/SiteExtensions/SiteExtensions.sln | 30 +++++- src/SiteExtensions/build/dependencies.props | 3 + src/SiteExtensions/global.json | 4 +- src/SiteExtensions/test/Directory.Build.props | 18 ++++ ...zureAppServices.SiteExtension.Tests.csproj | 29 ++++++ .../TransformTest.cs | 93 +++++++++++++++++++ .../config_empty.xml | 3 + .../config_existingemptyvalue.xml | 12 +++ .../config_existingline.xml | 12 +++ .../config_existingvalue.xml | 12 +++ 10 files changed, 209 insertions(+), 7 deletions(-) create mode 100644 src/SiteExtensions/test/Directory.Build.props create mode 100644 src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests.csproj create mode 100644 src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/TransformTest.cs create mode 100644 src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_empty.xml create mode 100644 src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingemptyvalue.xml create mode 100644 src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingline.xml create mode 100644 src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingvalue.xml diff --git a/src/SiteExtensions/SiteExtensions.sln b/src/SiteExtensions/SiteExtensions.sln index 8fe1d6c64c..39b0b63e47 100644 --- a/src/SiteExtensions/SiteExtensions.sln +++ b/src/SiteExtensions/SiteExtensions.sln @@ -5,9 +5,13 @@ VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0ED05384-4F64-44BA-A4AA-47519DA26E8C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.AzureAppServices.SiteExtension", "src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj", "{69E22952-302D-4C56-B2BE-7C086EB05C79}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServices.SiteExtension", "src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj", "{69E22952-302D-4C56-B2BE-7C086EB05C79}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Web.Xdt.Extensions", "src\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj", "{637E1D65-7F1C-476B-AD0A-30B295DF5414}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Web.Xdt.Extensions", "src\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj", "{637E1D65-7F1C-476B-AD0A-30B295DF5414}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6C71D9CD-271C-41CB-ACCD-9EABED6C9E80}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests", "test\Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests\Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests.csproj", "{A0798DB8-7681-4F00-94EC-CC966F4F3CD0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -18,9 +22,6 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {69E22952-302D-4C56-B2BE-7C086EB05C79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {69E22952-302D-4C56-B2BE-7C086EB05C79}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -46,9 +47,28 @@ Global {637E1D65-7F1C-476B-AD0A-30B295DF5414}.Release|x64.Build.0 = Release|Any CPU {637E1D65-7F1C-476B-AD0A-30B295DF5414}.Release|x86.ActiveCfg = Release|Any CPU {637E1D65-7F1C-476B-AD0A-30B295DF5414}.Release|x86.Build.0 = Release|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Debug|x64.ActiveCfg = Debug|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Debug|x64.Build.0 = Debug|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Debug|x86.ActiveCfg = Debug|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Debug|x86.Build.0 = Debug|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Release|Any CPU.Build.0 = Release|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Release|x64.ActiveCfg = Release|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Release|x64.Build.0 = Release|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Release|x86.ActiveCfg = Release|Any CPU + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {69E22952-302D-4C56-B2BE-7C086EB05C79} = {0ED05384-4F64-44BA-A4AA-47519DA26E8C} {637E1D65-7F1C-476B-AD0A-30B295DF5414} = {0ED05384-4F64-44BA-A4AA-47519DA26E8C} + {A0798DB8-7681-4F00-94EC-CC966F4F3CD0} = {6C71D9CD-271C-41CB-ACCD-9EABED6C9E80} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7ACE43EF-2C19-4D80-B7DB-0169D9302623} EndGlobalSection EndGlobal diff --git a/src/SiteExtensions/build/dependencies.props b/src/SiteExtensions/build/dependencies.props index 4a707b5182..e20e907408 100644 --- a/src/SiteExtensions/build/dependencies.props +++ b/src/SiteExtensions/build/dependencies.props @@ -7,7 +7,10 @@ 2.2.0-preview2-20181004.6 2.1.1-rtm-31076 2.2.0-rtm-35515 + 15.6.1 1.4.0 + 2.4.0 + 2.4.0 diff --git a/src/SiteExtensions/global.json b/src/SiteExtensions/global.json index 336b8c5dba..61155ef665 100644 --- a/src/SiteExtensions/global.json +++ b/src/SiteExtensions/global.json @@ -1,8 +1,8 @@ { "sdk": { - "version": "2.2.100-preview2-009404" + "version": "2.2.100-preview3-009430" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181011.10" + "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181024.5" } } diff --git a/src/SiteExtensions/test/Directory.Build.props b/src/SiteExtensions/test/Directory.Build.props new file mode 100644 index 0000000000..4e09287e4d --- /dev/null +++ b/src/SiteExtensions/test/Directory.Build.props @@ -0,0 +1,18 @@ + + + + + netcoreapp2.2 + $(DeveloperBuildTestTfms) + + $(StandardTestTfms);net461 + + + + + + + + + + diff --git a/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests.csproj b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests.csproj new file mode 100644 index 0000000000..9928aadbcc --- /dev/null +++ b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests.csproj @@ -0,0 +1,29 @@ + + + + net461 + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + diff --git a/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/TransformTest.cs b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/TransformTest.cs new file mode 100644 index 0000000000..1480483804 --- /dev/null +++ b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/TransformTest.cs @@ -0,0 +1,93 @@ +// 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 System.Xml; +using Microsoft.Web.XmlTransform; +using Xunit; + +namespace Microsoft.AspNetCore.AzureAppServices.SiteExtension +{ + public class TransformTest + { + private static readonly string XdtExtensionPath = AppDomain.CurrentDomain.BaseDirectory; + + [Theory] + [InlineData("config_empty.xml")] + [InlineData("config_existingline.xml")] + [InlineData("config_existingEmptyValue.xml")] + public void Transform_EmptyConfig_Added(string configFile) + { + var doc = LoadDocAndRunTransform(configFile); + + Assert.Equal(2, doc.ChildNodes.Count); + var envNode = doc["configuration"]?["system.webServer"]?["runtime"]?["environmentVariables"]; + + Assert.NotNull(envNode); + + Assert.Equal(3, envNode.ChildNodes.Count); + + var depsElement = envNode.FirstChild; + Assert.Equal("add", depsElement.Name); + Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value); + Assert.Equal($@"{XdtExtensionPath}\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;" + + @"%ProgramFiles%\dotnet\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\", + depsElement.Attributes["value"].Value); + + var sharedStoreElement = depsElement.NextSibling; + Assert.Equal("add", sharedStoreElement.Name); + Assert.Equal("DOTNET_SHARED_STORE", sharedStoreElement.Attributes["name"].Value); + Assert.Equal($@"{XdtExtensionPath}\store", sharedStoreElement.Attributes["value"].Value); + + var startupAssembliesElement = sharedStoreElement.NextSibling; + Assert.Equal("add", startupAssembliesElement.Name); + Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value); + Assert.Equal("Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value); + } + + [Fact] + public void Transform_ExistingValue_AppendsValue() + { + var doc = LoadDocAndRunTransform("config_existingvalue.xml"); + + Assert.Equal(2, doc.ChildNodes.Count); + var envNode = doc["configuration"]?["system.webServer"]?["runtime"]?["environmentVariables"]; + + Assert.NotNull(envNode); + + Assert.Equal(3, envNode.ChildNodes.Count); + + var depsElement = envNode.FirstChild; + Assert.Equal("add", depsElement.Name); + Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value); + Assert.Equal(@"ExistingValue1;"+ + $@"{XdtExtensionPath}\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;" + + @"%ProgramFiles%\dotnet\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\", + depsElement.Attributes["value"].Value); + + var sharedStoreElement = depsElement.NextSibling; + Assert.Equal("add", sharedStoreElement.Name); + Assert.Equal("DOTNET_SHARED_STORE", sharedStoreElement.Attributes["name"].Value); + Assert.Equal($@"ExistingValue3;{XdtExtensionPath}\store", sharedStoreElement.Attributes["value"].Value); + + var startupAssembliesElement = sharedStoreElement.NextSibling; + Assert.Equal("add", startupAssembliesElement.Name); + Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value); + Assert.Equal("ExistingValue2;Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value); + } + + private static XmlDocument LoadDocAndRunTransform(string docName) + { + // Microsoft.Web.Hosting.Transformers.ApplicationHost.SiteExtensionDefinition.Transform + // (See Microsoft.Web.Hosting, Version=7.1.0.0) replaces variables for you in Azure. + var transformFile = File.ReadAllText("applicationHost.xdt"); + transformFile = transformFile.Replace("%XDT_EXTENSIONPATH%", XdtExtensionPath); + var transform = new XmlTransformation(transformFile, isTransformAFile: false, logger: null); + var doc = new XmlDocument(); + doc.Load(docName); + Assert.True(transform.Apply(doc)); + return doc; + } + } +} diff --git a/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_empty.xml b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_empty.xml new file mode 100644 index 0000000000..1156926c52 --- /dev/null +++ b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_empty.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingemptyvalue.xml b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingemptyvalue.xml new file mode 100644 index 0000000000..b25079c3ce --- /dev/null +++ b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingemptyvalue.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingline.xml b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingline.xml new file mode 100644 index 0000000000..312e525b86 --- /dev/null +++ b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingline.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingvalue.xml b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingvalue.xml new file mode 100644 index 0000000000..4659b9a48b --- /dev/null +++ b/src/SiteExtensions/test/Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests/config_existingvalue.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file From b78ee81a1e6a063a3020498ded9fe23b2094de7c Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 26 Oct 2018 09:57:45 -0700 Subject: [PATCH 15/32] Flow DotNetRestoreSourcePropsPath and DotNetPackageVersionPropsPath into the shared framework build steps --- build/SharedFx.targets | 17 +++++++++++------ build/sources.props | 4 ---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index c2d5d7ed5a..f5db4c1b86 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -14,29 +14,34 @@ - + + + <_RestoreGraphProjectInput>@(ProjectToBuild) + + $(SolutionProperties); + DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); + DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath) + + Properties="$(SharedFxBuildProperties);RestoreGraphProjectInput=$(_RestoreGraphProjectInput);_DummyTarget=Restore" /> - - diff --git a/build/sources.props b/build/sources.props index 7f3d24608f..a08e49dfdb 100644 --- a/build/sources.props +++ b/build/sources.props @@ -7,10 +7,6 @@ $(DotNetAdditionalRestoreSources); $(DotNetRestoreSources); - - $(RepositoryRoot)artifacts/build/; - $(DotNetRestoreSources); - $(RestoreSources); https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; From e0c575000fa7ffdc84a87e1d57beb643bcb2fed7 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 26 Oct 2018 12:21:52 -0700 Subject: [PATCH 16/32] Ensure MicrosoftNETCoreAppPackageVersion is always defined --- build/dependencies.props | 2 ++ build/external-dependencies.props | 2 ++ 2 files changed, 4 insertions(+) diff --git a/build/dependencies.props b/build/dependencies.props index 8bd8ba4adb..6a74f270ab 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -35,6 +35,8 @@ $(MicrosoftNETCoreAppPackageVersion) + + $(MicrosoftNETCoreApp22PackageVersion) $(KoreBuildVersion) diff --git a/build/external-dependencies.props b/build/external-dependencies.props index 9ed3c8aebd..a0e9fdad8e 100644 --- a/build/external-dependencies.props +++ b/build/external-dependencies.props @@ -99,6 +99,8 @@ + + From 1353fdb5f8c5d4d979119a5318e442a734acac59 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Fri, 26 Oct 2018 13:35:01 -0700 Subject: [PATCH 17/32] Updating submodule(s) AzureIntegration => f58d3d4e9424f9d33d8f8de2bc9a09f9a11d7079 CORS => a74235c7ec22c8801619550f7d6a223a08890a9a EntityFrameworkCore => f161d001032c11f4a71af64ba87fc7c233b92093 Identity => 95bc2518486554be18191211e70a2ac8e8765ed3 KestrelHttpServer => 395b6813487e4c799a6fb6affd13717acb8dd8b6 Mvc => 6bb292cfccbcebb2fe29d3ece848dd76d2e6ed1f Scaffolding => 629bb9963377eb9e915013bd8b2f5c724833d82a SignalR => 2ad19962201dfa8484fa29ef9f6a0fd501d35bd8 Templating => a504c40165b1289d24ffa8daab6c1c3780263c85 [auto-updated: submodules] --- modules/AzureIntegration | 2 +- modules/CORS | 2 +- modules/EntityFrameworkCore | 2 +- modules/Identity | 2 +- modules/KestrelHttpServer | 2 +- modules/Mvc | 2 +- modules/Scaffolding | 2 +- modules/SignalR | 2 +- modules/Templating | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/AzureIntegration b/modules/AzureIntegration index c6f9783671..f58d3d4e94 160000 --- a/modules/AzureIntegration +++ b/modules/AzureIntegration @@ -1 +1 @@ -Subproject commit c6f978367199763fef1a642a1e31fb6e2959d5b3 +Subproject commit f58d3d4e9424f9d33d8f8de2bc9a09f9a11d7079 diff --git a/modules/CORS b/modules/CORS index aa88f16b08..a74235c7ec 160000 --- a/modules/CORS +++ b/modules/CORS @@ -1 +1 @@ -Subproject commit aa88f16b08d239b93075f56b587dc4e650e05572 +Subproject commit a74235c7ec22c8801619550f7d6a223a08890a9a diff --git a/modules/EntityFrameworkCore b/modules/EntityFrameworkCore index f14134387a..f161d00103 160000 --- a/modules/EntityFrameworkCore +++ b/modules/EntityFrameworkCore @@ -1 +1 @@ -Subproject commit f14134387abbacbb4cb76ef18ffee4df08e800d5 +Subproject commit f161d001032c11f4a71af64ba87fc7c233b92093 diff --git a/modules/Identity b/modules/Identity index 168be7b561..95bc251848 160000 --- a/modules/Identity +++ b/modules/Identity @@ -1 +1 @@ -Subproject commit 168be7b561f1f069144554bb774673cc6f30f726 +Subproject commit 95bc2518486554be18191211e70a2ac8e8765ed3 diff --git a/modules/KestrelHttpServer b/modules/KestrelHttpServer index d9aba751ae..395b681348 160000 --- a/modules/KestrelHttpServer +++ b/modules/KestrelHttpServer @@ -1 +1 @@ -Subproject commit d9aba751ae64b1e1a2f57caada1fa9f5af97b071 +Subproject commit 395b6813487e4c799a6fb6affd13717acb8dd8b6 diff --git a/modules/Mvc b/modules/Mvc index 2544926b2f..6bb292cfcc 160000 --- a/modules/Mvc +++ b/modules/Mvc @@ -1 +1 @@ -Subproject commit 2544926b2fc9231fa508070291eb9dc5bf2d58df +Subproject commit 6bb292cfccbcebb2fe29d3ece848dd76d2e6ed1f diff --git a/modules/Scaffolding b/modules/Scaffolding index b20c6e2d82..629bb99633 160000 --- a/modules/Scaffolding +++ b/modules/Scaffolding @@ -1 +1 @@ -Subproject commit b20c6e2d82c0be2ad2824f788ac57c66b0258599 +Subproject commit 629bb9963377eb9e915013bd8b2f5c724833d82a diff --git a/modules/SignalR b/modules/SignalR index fc3a1fee61..2ad1996220 160000 --- a/modules/SignalR +++ b/modules/SignalR @@ -1 +1 @@ -Subproject commit fc3a1fee61ae1746e98edd4ba30da98f64e03a5c +Subproject commit 2ad19962201dfa8484fa29ef9f6a0fd501d35bd8 diff --git a/modules/Templating b/modules/Templating index 958e0b1d9f..a504c40165 160000 --- a/modules/Templating +++ b/modules/Templating @@ -1 +1 @@ -Subproject commit 958e0b1d9f5d636671c1e2bc7ef6ed94a5027a97 +Subproject commit a504c40165b1289d24ffa8daab6c1c3780263c85 From a5d88b0ca2234ec34bed4baa593291411ad05ba5 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Fri, 26 Oct 2018 13:35:09 -0700 Subject: [PATCH 18/32] Updating BuildTools from 2.2.0-preview2-20181024.5 to 2.2.0-preview2-20181026.1 [auto-updated: buildtools] --- global.json | 2 +- korebuild-lock.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index 61155ef665..babab865d5 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "version": "2.2.100-preview3-009430" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181024.5" + "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181026.1" } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index c253cd046f..a63e822d14 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview2-20181024.5 -commithash:fb8b4d8feddb9f69c095f30b481efbe43fe85edd +version:2.2.0-preview2-20181026.1 +commithash:c8ee7ab236fbd210f43bc223c34c3dfe8c04cdc2 From 0ba800841b351e2646a5ccee53f46d4a6380463f Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 26 Oct 2018 16:00:48 -0700 Subject: [PATCH 19/32] Ensure build output is still present when crossgen is disabled * Split targets for copying outputs and preparing the crossgen tool * Fix version override check by only looking at the 'pinned' section --- build/SharedFx.targets | 1 + build/tasks/CheckVersionOverrides.cs | 2 +- eng/targets/SharedFx.Common.targets | 52 +++++++++++++++------------- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index f5db4c1b86..f70618067c 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -22,6 +22,7 @@ <_RestoreGraphProjectInput>@(ProjectToBuild) $(SolutionProperties); + SharedFxRid=$(SharedFxRid); DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath) diff --git a/build/tasks/CheckVersionOverrides.cs b/build/tasks/CheckVersionOverrides.cs index ad75aa8b2b..a510a8b800 100644 --- a/build/tasks/CheckVersionOverrides.cs +++ b/build/tasks/CheckVersionOverrides.cs @@ -24,7 +24,7 @@ namespace RepoTasks var versionOverrides = ProjectRootElement.Open(DotNetPackageVersionPropsPath); var dependencies = ProjectRootElement.Open(DependenciesFile); var pinnedVersions = dependencies.PropertyGroups - .Where(p => !string.Equals("Package Versions: Auto", p.Label)) + .Where(p => string.Equals("Package Versions: Pinned", p.Label)) .SelectMany(p => p.Properties) .ToDictionary(p => p.Name, p => p.Value, StringComparer.OrdinalIgnoreCase); diff --git a/eng/targets/SharedFx.Common.targets b/eng/targets/SharedFx.Common.targets index 6102fa6279..4f83af1176 100644 --- a/eng/targets/SharedFx.Common.targets +++ b/eng/targets/SharedFx.Common.targets @@ -20,20 +20,21 @@ This targets file should only be imported by .shfxproj files. GeneratePublishDependencyFile; GenerateSharedFxDependencyFile; GeneratePublishRuntimeConfigurationFile; - OptimizeOutput; + CopySharedFxToOutput; + CollectSharedFxOutput; PostBuildEvent; GetTargetPath; - + PrepareForCrossGen; CrossGenAssemblies; - + - - $(OptimizeOutputDependsOn); + + $(CollectOutputSharedFxDependsOn); CrossGenSymbols; - + PrepareOutputPaths; @@ -71,9 +72,8 @@ This targets file should only be imported by .shfxproj files. $(IntermediateOutputPath)$(SharedFxRid)\ - - $(OutputPath) - $(IntermediateOutputPath)u\ + + $(IntermediateOutputPath)u\ false @@ -195,14 +195,30 @@ This targets file should only be imported by .shfxproj files. - + - + + + + + + + + + + + + + + + + Microsoft.NETCore.App crossgen @@ -231,15 +247,6 @@ This targets file should only be imported by .shfxproj files. - - - - - - - - - @@ -251,9 +258,6 @@ This targets file should only be imported by .shfxproj files. $(SymbolsOutputPath)%(RecursiveDir) - - - From 908653d4d39bcb29c0cd5cd60876b285aef10b4b Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sat, 27 Oct 2018 00:04:22 -0700 Subject: [PATCH 20/32] Updating submodule(s) Identity => 6c45bfc0dc1c5fd9786971ce4b60bb7c94df4a9a Razor => 6ecf5374c62b1a04d089ecd5f186548498897cf7 SignalR => e1b602a7c5331e0c20efe4a087d73eb63441fd9c [auto-updated: submodules] --- modules/Identity | 2 +- modules/Razor | 2 +- modules/SignalR | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Identity b/modules/Identity index 95bc251848..6c45bfc0dc 160000 --- a/modules/Identity +++ b/modules/Identity @@ -1 +1 @@ -Subproject commit 95bc2518486554be18191211e70a2ac8e8765ed3 +Subproject commit 6c45bfc0dc1c5fd9786971ce4b60bb7c94df4a9a diff --git a/modules/Razor b/modules/Razor index 2d6643bc85..6ecf5374c6 160000 --- a/modules/Razor +++ b/modules/Razor @@ -1 +1 @@ -Subproject commit 2d6643bc854fe7c2d9c87c8bc4348c02406efa57 +Subproject commit 6ecf5374c62b1a04d089ecd5f186548498897cf7 diff --git a/modules/SignalR b/modules/SignalR index 2ad1996220..e1b602a7c5 160000 --- a/modules/SignalR +++ b/modules/SignalR @@ -1 +1 @@ -Subproject commit 2ad19962201dfa8484fa29ef9f6a0fd501d35bd8 +Subproject commit e1b602a7c5331e0c20efe4a087d73eb63441fd9c From d9f66a68b7911d60e2c1864fd7c7b483cb992f56 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sat, 27 Oct 2018 00:04:30 -0700 Subject: [PATCH 21/32] Updating BuildTools from 2.2.0-preview2-20181026.1 to 2.2.0-preview2-20181026.4 [auto-updated: buildtools] --- global.json | 2 +- korebuild-lock.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index babab865d5..4b22131e72 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "version": "2.2.100-preview3-009430" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181026.1" + "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181026.4" } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index a63e822d14..1883618cd7 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview2-20181026.1 -commithash:c8ee7ab236fbd210f43bc223c34c3dfe8c04cdc2 +version:2.2.0-preview2-20181026.4 +commithash:f05a283e6c1eb66ef29a32526f75f8b567a986c9 From 3a0cd0593dc3c54ca43b373e592fddc64dc76868 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Sat, 27 Oct 2018 01:38:52 -0700 Subject: [PATCH 22/32] Remove unnecessary check for all shared framework archives when generating .deb and .rpm installers --- build/SharedFxInstaller.targets | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/build/SharedFxInstaller.targets b/build/SharedFxInstaller.targets index bebfb54451..9500ef1e39 100644 --- a/build/SharedFxInstaller.targets +++ b/build/SharedFxInstaller.targets @@ -13,11 +13,8 @@ Text="Docker host must be using Linux containers." Condition="'$(DockerHostOS)' != 'linux'"/> - + Text="Expected archive missing at $(SharedFxIntermediateArchiveFilePrefix)-linux-x64.tar.gz." + Condition="!Exists('$(SharedFxIntermediateArchiveFilePrefix)-linux-x64.tar.gz')" /> From 09f8473d296a48ad2d872979a46c023b06985b6c Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sat, 27 Oct 2018 02:36:10 -0700 Subject: [PATCH 23/32] Updating submodule(s) DotNetTools => bda375e4113250043f93912b0b961407155bd793 Razor => 25a895123e849dfeab803392a05e8ed6dbc659f6 [auto-updated: submodules] --- modules/DotNetTools | 2 +- modules/Razor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/DotNetTools b/modules/DotNetTools index 01f9af21c5..bda375e411 160000 --- a/modules/DotNetTools +++ b/modules/DotNetTools @@ -1 +1 @@ -Subproject commit 01f9af21c533df2b3961b7900ca0b656ee38a588 +Subproject commit bda375e4113250043f93912b0b961407155bd793 diff --git a/modules/Razor b/modules/Razor index 6ecf5374c6..25a895123e 160000 --- a/modules/Razor +++ b/modules/Razor @@ -1 +1 @@ -Subproject commit 6ecf5374c62b1a04d089ecd5f186548498897cf7 +Subproject commit 25a895123e849dfeab803392a05e8ed6dbc659f6 From 373e67896ab5ef157234971a0008011a257e17a1 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Sat, 27 Oct 2018 03:02:22 -0700 Subject: [PATCH 24/32] Fix the path to RPM template and config files --- build/SharedFxInstaller.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/SharedFxInstaller.targets b/build/SharedFxInstaller.targets index 9500ef1e39..84de47a045 100644 --- a/build/SharedFxInstaller.targets +++ b/build/SharedFxInstaller.targets @@ -49,7 +49,7 @@ From 728ad474a98ce617422e7e14bb10e0b3123389d7 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sat, 27 Oct 2018 12:04:25 -0700 Subject: [PATCH 25/32] Updating BuildTools from 2.2.0-preview2-20181026.4 to 2.2.0-preview2-20181027.2 [auto-updated: buildtools] --- global.json | 2 +- korebuild-lock.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index 4b22131e72..5334b7bfdb 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "version": "2.2.100-preview3-009430" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181026.4" + "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181027.2" } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 1883618cd7..99d77733b0 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview2-20181026.4 -commithash:f05a283e6c1eb66ef29a32526f75f8b567a986c9 +version:2.2.0-preview2-20181027.2 +commithash:2d68303e2f75eeea251e0d1e03989fb07ae76630 From b773918d764bad32d81cc769d2b3dfebe965d69e Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 28 Oct 2018 07:05:19 +0000 Subject: [PATCH 26/32] Updating submodule(s) Diagnostics => 1afd5b259454f13803f8b536194aff59c8a261ba Mvc => 37e562902f2a88c22c3aeaf4bc288ed266a92499 [auto-updated: submodules] --- modules/Diagnostics | 2 +- modules/Mvc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Diagnostics b/modules/Diagnostics index b3db95eb2d..1afd5b2594 160000 --- a/modules/Diagnostics +++ b/modules/Diagnostics @@ -1 +1 @@ -Subproject commit b3db95eb2d099371a9d2fc1e4f8ee77b2a660eaf +Subproject commit 1afd5b259454f13803f8b536194aff59c8a261ba diff --git a/modules/Mvc b/modules/Mvc index 6bb292cfcc..37e562902f 160000 --- a/modules/Mvc +++ b/modules/Mvc @@ -1 +1 @@ -Subproject commit 6bb292cfccbcebb2fe29d3ece848dd76d2e6ed1f +Subproject commit 37e562902f2a88c22c3aeaf4bc288ed266a92499 From f2bf295cdf93634d0c313726aa7b1f7949566fa6 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 29 Oct 2018 07:09:09 +0000 Subject: [PATCH 27/32] Updating submodule(s) Mvc => 0b6932dc15742afced7a4b5e25be7eebe57d33d7 [auto-updated: submodules] --- modules/Mvc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Mvc b/modules/Mvc index 37e562902f..0b6932dc15 160000 --- a/modules/Mvc +++ b/modules/Mvc @@ -1 +1 @@ -Subproject commit 37e562902f2a88c22c3aeaf4bc288ed266a92499 +Subproject commit 0b6932dc15742afced7a4b5e25be7eebe57d33d7 From 134bd908883a76d78dd55dff29b9f7c8dea1b71b Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Mon, 29 Oct 2018 10:59:37 -0700 Subject: [PATCH 28/32] Filter paths in SiteExtension trigger (#3747) --- .azure/pipelines/site-extensions.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.azure/pipelines/site-extensions.yml b/.azure/pipelines/site-extensions.yml index 84a4b2f0d8..c909102670 100644 --- a/.azure/pipelines/site-extensions.yml +++ b/.azure/pipelines/site-extensions.yml @@ -2,6 +2,9 @@ trigger: branches: include: - release/2.2 + paths: + include: + - src/SiteExtensions name: $(Date:yyMMdd)-$(Rev:rr) From 0855b08f34004a1a0ccb9cdee6af2a109b9ec416 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 29 Oct 2018 12:04:14 -0700 Subject: [PATCH 29/32] Updating submodule(s) EntityFrameworkCore => f2b5430c3cb589e5bd515b44be9cdd0ad07748e0 Mvc => 35d2ab37f733228af54e20d2cb2a056392e1adb4 Razor => 8674dd923636ea5667b3c4b3554b41ee4e442ec1 SignalR => 9407fe12f6d6f7bd1c57f2fc067a1675cd2388e1 [auto-updated: submodules] --- modules/EntityFrameworkCore | 2 +- modules/Mvc | 2 +- modules/Razor | 2 +- modules/SignalR | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/EntityFrameworkCore b/modules/EntityFrameworkCore index f161d00103..f2b5430c3c 160000 --- a/modules/EntityFrameworkCore +++ b/modules/EntityFrameworkCore @@ -1 +1 @@ -Subproject commit f161d001032c11f4a71af64ba87fc7c233b92093 +Subproject commit f2b5430c3cb589e5bd515b44be9cdd0ad07748e0 diff --git a/modules/Mvc b/modules/Mvc index 0b6932dc15..35d2ab37f7 160000 --- a/modules/Mvc +++ b/modules/Mvc @@ -1 +1 @@ -Subproject commit 0b6932dc15742afced7a4b5e25be7eebe57d33d7 +Subproject commit 35d2ab37f733228af54e20d2cb2a056392e1adb4 diff --git a/modules/Razor b/modules/Razor index 25a895123e..8674dd9236 160000 --- a/modules/Razor +++ b/modules/Razor @@ -1 +1 @@ -Subproject commit 25a895123e849dfeab803392a05e8ed6dbc659f6 +Subproject commit 8674dd923636ea5667b3c4b3554b41ee4e442ec1 diff --git a/modules/SignalR b/modules/SignalR index e1b602a7c5..9407fe12f6 160000 --- a/modules/SignalR +++ b/modules/SignalR @@ -1 +1 @@ -Subproject commit e1b602a7c5331e0c20efe4a087d73eb63441fd9c +Subproject commit 9407fe12f6d6f7bd1c57f2fc067a1675cd2388e1 From f3e4d442ac9bf80a5a879d73ac807a25018b5063 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 29 Oct 2018 12:04:22 -0700 Subject: [PATCH 30/32] Updating BuildTools from 2.2.0-preview2-20181027.2 to 2.2.0-preview2-20181029.2 [auto-updated: buildtools] --- global.json | 4 ++-- korebuild-lock.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/global.json b/global.json index 5334b7bfdb..b94cb5a81e 100644 --- a/global.json +++ b/global.json @@ -1,8 +1,8 @@ { "sdk": { - "version": "2.2.100-preview3-009430" + "version": "2.2.100-rtm-009571" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181027.2" + "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181029.2" } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 99d77733b0..e1429e122e 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview2-20181027.2 -commithash:2d68303e2f75eeea251e0d1e03989fb07ae76630 +version:2.2.0-preview2-20181029.2 +commithash:d3fd31bc75010d3b5ee4cb9b55ebd383b0cd628c From a058bc0c0a4b5a22c629bc6c4c65df1e3fdc6a0a Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 26 Oct 2018 00:22:35 -0700 Subject: [PATCH 31/32] Win-arm shared framework --- .azure/pipelines/ci-official.yml | 3 +++ Directory.Build.props | 1 + build/SharedFx.props | 2 +- build/repo.props | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.azure/pipelines/ci-official.yml b/.azure/pipelines/ci-official.yml index bf6f9e35a8..83d1ec95e4 100644 --- a/.azure/pipelines/ci-official.yml +++ b/.azure/pipelines/ci-official.yml @@ -44,6 +44,8 @@ phases: displayName: Build NuGet packages and win-x64 runtime - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-x86 displayName: Build win-x86 runtime + - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-arm + displayName: Build win-arm runtime - powershell: > src/Installers/Windows/clone_and_build_ancm.ps1 -GitCredential '$(dn-bot-devdiv-build-rw-code-rw)' @@ -56,6 +58,7 @@ phases: src/Installers/Windows/build.ps1 -x64 artifacts/runtime/aspnetcore-runtime-internal-2.2.0-preview3-$(Build.BuildNumber)-win-x64.zip -x86 artifacts/runtime/aspnetcore-runtime-internal-2.2.0-preview3-$(Build.BuildNumber)-win-x86.zip + -x86 artifacts/runtime/aspnetcore-runtime-internal-2.2.0-preview3-$(Build.BuildNumber)-win-arm.zip -Config $(BuildConfiguration) -BuildNumber $(Build.BuildNumber) -SignType $(_SignType) diff --git a/Directory.Build.props b/Directory.Build.props index 2ab01c9e29..fea1bad021 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -52,6 +52,7 @@ win-x64; win-x86; + win-arm; osx-x64; linux-musl-x64; linux-x64; diff --git a/build/SharedFx.props b/build/SharedFx.props index 87d90c2d8b..336628d8db 100644 --- a/build/SharedFx.props +++ b/build/SharedFx.props @@ -65,7 +65,7 @@ - + diff --git a/build/repo.props b/build/repo.props index 3b9e529aba..f96923abea 100644 --- a/build/repo.props +++ b/build/repo.props @@ -18,6 +18,7 @@ + @@ -27,6 +28,7 @@ + From 6db081fff7aed55232969190598faea90f6c2fa3 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 29 Oct 2018 13:37:22 -0700 Subject: [PATCH 32/32] Updating submodule(s) SignalR => 1edf818104956bb95a5d0092d82e930f2941f124 [auto-updated: submodules] --- modules/SignalR | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/SignalR b/modules/SignalR index 9407fe12f6..1edf818104 160000 --- a/modules/SignalR +++ b/modules/SignalR @@ -1 +1 @@ -Subproject commit 9407fe12f6d6f7bd1c57f2fc067a1675cd2388e1 +Subproject commit 1edf818104956bb95a5d0092d82e930f2941f124