diff --git a/eng/SourceBuild.Version.Details.xml b/eng/SourceBuild.Version.Details.xml index 52faed3afd7a..db9bdda4fe12 100644 --- a/eng/SourceBuild.Version.Details.xml +++ b/eng/SourceBuild.Version.Details.xml @@ -1,6 +1,11 @@ + + https://github.com/dotnet/aspnetcore + 71dd6b0c87d7619668a40876d084d93db57eab41 + + https://github.com/dotnet/clicommandlineparser 3198bf5660cad3dab85f5475bf1fda9688146e3f diff --git a/src/SourceBuild/tarball/content/TemporaryBootstrapPackageVersions.props b/src/SourceBuild/tarball/content/TemporaryBootstrapPackageVersions.props index 235106b6b3c5..c2b56598ae7d 100755 --- a/src/SourceBuild/tarball/content/TemporaryBootstrapPackageVersions.props +++ b/src/SourceBuild/tarball/content/TemporaryBootstrapPackageVersions.props @@ -9,6 +9,7 @@ file can be removed. --> + 6.0.0-preview.6.21352.12 3.1.0 3.1.0 6.0.0-preview.6.21352.12 diff --git a/src/SourceBuild/tarball/content/patches/aspnetcore/0001-Run-GenerateFiles-during-source-build.patch b/src/SourceBuild/tarball/content/patches/aspnetcore/0001-Run-GenerateFiles-during-source-build.patch new file mode 100644 index 000000000000..e5d4b255191d --- /dev/null +++ b/src/SourceBuild/tarball/content/patches/aspnetcore/0001-Run-GenerateFiles-during-source-build.patch @@ -0,0 +1,61 @@ +From db187e95f62d9bff268e68f39b441b6da8be9111 Mon Sep 17 00:00:00 2001 +From: Michael Simons +Date: Mon, 2 Aug 2021 19:02:27 +0000 +Subject: [PATCH] Run GenerateFiles during source build + +GenerateFiles is not running in source build yet the outputs are required. +These changes get GenerateFiles to run as part of source build. +These changes also turn on the binaryLog option while building the RepoTasks during source build. +--- + eng/SourceBuild.props | 3 +-- + eng/Tools.props | 2 +- + eng/tools/GenerateFiles/GenerateFiles.csproj | 1 + + 4 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props +index 27cbe92036..3dbfe2ce7e 100644 +--- a/eng/SourceBuild.props ++++ b/eng/SourceBuild.props +@@ -1,5 +1,4 @@ + +- + + aspnetcore + true +@@ -47,7 +46,7 @@ + BeforeTargets="Execute"> + + + +diff --git a/eng/Tools.props b/eng/Tools.props +index a285c2406a..a38257f770 100644 +--- a/eng/Tools.props ++++ b/eng/Tools.props +@@ -13,7 +13,7 @@ + + ++ Condition=" '$(MSBuildRuntimeType)' == 'core' "> + + + + net5.0 ++ false + + + +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/content/patches/aspnetcore/0002-Use-Versions.props-MicrosoftExtensionsDependencyMode.patch b/src/SourceBuild/tarball/content/patches/aspnetcore/0002-Use-Versions.props-MicrosoftExtensionsDependencyMode.patch new file mode 100644 index 000000000000..2a52ae6568a9 --- /dev/null +++ b/src/SourceBuild/tarball/content/patches/aspnetcore/0002-Use-Versions.props-MicrosoftExtensionsDependencyMode.patch @@ -0,0 +1,28 @@ +From 14992fbe4d8f433025cc45be81ef0035ed77221b Mon Sep 17 00:00:00 2001 +From: Michael Simons +Date: Mon, 2 Aug 2021 13:40:03 +0000 +Subject: [PATCH] Use Versions.props MicrosoftExtensionsDependencyModelVersion + in RepoTasks + +Source build is loading a reference assembly which fails when the RepoTasks are invoked. +This change gets source build to use the version which is source built. +--- + eng/tools/RepoTasks/RepoTasks.csproj | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/eng/tools/RepoTasks/RepoTasks.csproj b/eng/tools/RepoTasks/RepoTasks.csproj +index e723beb353..67e01850f8 100644 +--- a/eng/tools/RepoTasks/RepoTasks.csproj ++++ b/eng/tools/RepoTasks/RepoTasks.csproj +@@ -16,7 +16,7 @@ + + + +- ++ + + + +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/content/patches/aspnetcore/0003-Exclude-warnings-as-errors-from-source-build.patch b/src/SourceBuild/tarball/content/patches/aspnetcore/0003-Exclude-warnings-as-errors-from-source-build.patch new file mode 100644 index 000000000000..cd82ffb9f02d --- /dev/null +++ b/src/SourceBuild/tarball/content/patches/aspnetcore/0003-Exclude-warnings-as-errors-from-source-build.patch @@ -0,0 +1,34 @@ +From 6fce3b3afda68cd041cb3b38c8c21fa0513ab5e3 Mon Sep 17 00:00:00 2001 +From: Michael Simons +Date: Mon, 2 Aug 2021 19:56:17 +0000 +Subject: [PATCH] Exclude warnings as errors from source build + + +NU1604: These hopefully go away once runtime-portable is added to the tarball. + Microsoft.AspNetCore.App.Runtime.csproj : error NU1604: Project dependency Microsoft.NETCore.App.Crossgen2.linux-x64 does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. + Microsoft.AspNetCore.App.Runtime.csproj : error NU1604: Project dependency Microsoft.NETCore.App.Runtime.linux-x64 does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. + +CS8601: + CascadingAuthenticationState.razor(4,108): error CS8601: Possible null reference assignment. +--- + Directory.Build.props | 4 ++++++++++++++ + 1 file changed, 4 insertions(+) + +diff --git a/Directory.Build.props b/Directory.Build.props +index ba1c1675a0..ce6bc50c66 100644 +--- a/Directory.Build.props ++++ b/Directory.Build.props +@@ -225,6 +225,10 @@ + .zip + + ++ ++ $(NoWarn);NU1604;CS8601 ++ ++ + + + +-- +2.29.2 + diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.targets b/src/SourceBuild/tarball/content/repos/Directory.Build.targets index 4e9c52ca9a9e..b78dfc8d7358 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.targets +++ b/src/SourceBuild/tarball/content/repos/Directory.Build.targets @@ -121,7 +121,7 @@ ]]> - $(NoWarn);NU5104 + %24(NoWarn);NU5104 ]]> diff --git a/src/SourceBuild/tarball/content/repos/aspnetcore.proj b/src/SourceBuild/tarball/content/repos/aspnetcore.proj index e8b821652d81..99ebb98bd2f1 100644 --- a/src/SourceBuild/tarball/content/repos/aspnetcore.proj +++ b/src/SourceBuild/tarball/content/repos/aspnetcore.proj @@ -1,66 +1,43 @@ - - aspnetcore - - - $(TargetRid) - freebsd-x64 - osx-x64 - - $(BuildCommandArgs) --restore --build --pack - $(BuildCommandArgs) --configuration $(Configuration) - $(BuildCommandArgs) --ci - $(BuildCommandArgs) -bl - $(BuildCommandArgs) /v:$(LogVerbosity) + + $(StandardSourceBuildArgs.Replace('--publish', '')) $(BuildCommandArgs) --arch $(Platform) + $(BuildCommandArgs) --no-build-repo-tasks $(BuildCommandArgs) /p:BuildNodeJs=false - $(BuildCommandArgs) /p:SourceBuildRuntimeIdentifier=$(OverrideTargetRid) - $(BuildCommandArgs) /p:UseAppHost=false $(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime) - $(BuildCommandArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0 + $(ProjectDirectory)\eng\build$(ShellExtension) $(BuildCommandArgs) true - $(ProjectDirectory)build$(ShellExtension) $(BuildCommandArgs) - - $(ProjectDirectory)artifacts/packages/$(Configuration)/Shipping/ - $(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/ false true $(ProjectDirectory)global.json $(ProjectDirectory)NuGet.config - - $(SourceBuiltPackagesPath) - $(EnvironmentRestoreSources)%3B$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath) - $(EnvironmentRestoreSources)%3Bhttps://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public%40Local/nuget/v3/index.json - - + + - + - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/known-good.proj b/src/SourceBuild/tarball/content/repos/known-good.proj index 3e0144a0eb99..8b4d30c3b1ea 100644 --- a/src/SourceBuild/tarball/content/repos/known-good.proj +++ b/src/SourceBuild/tarball/content/repos/known-good.proj @@ -47,6 +47,9 @@ + + + diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs index 0365a7272d70..c249f5435f12 100644 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs +++ b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs @@ -58,6 +58,12 @@ public static string NormalizeNewLineChars(string source, string newLineChars) throw new ArgumentException("Unsupported new line characters", nameof(newLineChars)); } + // Ensure trailing new line on linux. + if (newLineChars == LF && !source.EndsWith(newLineChars)) + { + source += newLineChars; + } + return source; } }