Skip to content

Fix invalid Build command#24771

Merged
1 commit merged into
dotnet:masterfrom
softworkz:patch-1
Aug 11, 2020
Merged

Fix invalid Build command#24771
1 commit merged into
dotnet:masterfrom
softworkz:patch-1

Conversation

@softworkz

Copy link
Copy Markdown
Contributor

build.cmd does not directly take MSBuild parameters (only after -MSBuildArguments)
But for configuration, there is already the -Configuration parameter.

build.cmd does not directly take MSBuild parameters (only after `-MSBuildArguments`)
But for configuration, there is already the `-Configuration` parameter.
@Pilchie Pilchie requested a review from dougbu August 11, 2020 16:41
@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Aug 11, 2020

@dougbu dougbu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command documented isn't "invalid" because -MSBuildArguments isn't required. Note the [Parameter(ValueFromRemainingArguments = $true)] on that parameter. But, I agree -Configuration Release works much better than /p:Configuration=Release because -Configuration has a default and unconditionally adds /p:Configuration={default} to the end of the command line.

@dougbu

dougbu commented Aug 11, 2020

Copy link
Copy Markdown
Contributor

@Tratcher a couple of tests failed in first validation run for this doc-only PR. Suggest they be quarantined:

  • Microsoft.AspNetCore.Components.E2ETests.Tests.VirtualizationTest.CancelsOutdatedRefreshes_Async
  • Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http2TimeoutTests.PING_NoKeepAliveTimeout_DoesNotResetKeepAliveTimeout

@ghost

ghost commented Aug 11, 2020

Copy link
Copy Markdown

Hello @dougbu!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@Tratcher

Copy link
Copy Markdown
Member

I'm working on PING_NoKeepAliveTimeout_DoesNotResetKeepAliveTimeout. #24797

@ghost ghost merged commit ef1f48a into dotnet:master Aug 11, 2020
@softworkz

Copy link
Copy Markdown
Contributor Author

The command documented isn't "invalid" because -MSBuildArguments isn't required. Note the [Parameter(ValueFromRemainingArguments = $true)] on that parameter. But, I agree -Configuration Release works much better than /p:Configuration=Release because -Configuration has a default and unconditionally adds /p:Configuration={default} to the end of the command line.

I'm afraid, I don't understand what you are trying to tell.
But I can definitely say that this is not about 'better' or 'worse'. It's just that the original command simply didn't work and builds were still done in debug configuration:

2020-08-10T22:08:53.6572349Z ##[section]Starting: Run script build.cmd
2020-08-10T22:08:53.6685726Z ==============================================================================
2020-08-10T22:08:53.6686296Z Task         : Batch script
2020-08-10T22:08:53.6686780Z Description  : Run a Windows command or batch script and optionally allow it to change the environment
2020-08-10T22:08:53.6687227Z Version      : 1.1.10
2020-08-10T22:08:53.6687552Z Author       : Microsoft Corporation
2020-08-10T22:08:53.6688017Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/batch-script
2020-08-10T22:08:53.6688521Z ==============================================================================
2020-08-10T22:08:53.6800395Z ##[command]d:\a\1\s\build.cmd /p:Configuration=Release
2020-08-10T22:08:53.9699644Z WARNING: No default group of projects was specified, so building the 'managed' and its dependent subsets of projects. 
2020-08-10T22:08:53.9701188Z Run `build.cmd -help` for more details.
2020-08-10T22:08:54.0520205Z Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected in C:\Program Files.
2020-08-10T22:08:54.0802558Z Detected JDK in C:\Program Files\Java\jdk8u265-b01 (via JAVA_HOME)
2020-08-10T22:08:55.9790440Z dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.103/dotnet-sdk-3.1.103-win-x64.zip
2020-08-10T22:08:57.4865205Z dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.103/dotnet-sdk-3.1.103-win-x64.zip
2020-08-10T22:09:10.8495240Z dotnet-install: Adding to current process PATH: "D:\a\1\s\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
2020-08-10T22:09:10.8516948Z dotnet-install: Installation finished
2020-08-10T22:09:10.8800391Z Downloading vswhere
2020-08-10T22:09:28.5529665Z   Determining projects to restore...
2020-08-10T22:09:32.8736436Z   Restored C:\Users\VssAdministrator\.nuget\packages\microsoft.dotnet.arcade.sdk\1.0.0-beta.20213.4\tools\Tools.proj (in 3.83 sec).
2020-08-10T22:09:34.4414241Z   
2020-08-10T22:09:34.4415734Z   Welcome to .NET Core 3.1!
2020-08-10T22:09:34.4416542Z   ---------------------
2020-08-10T22:09:34.4417243Z   SDK Version: 3.1.103
2020-08-10T22:09:34.4417973Z   
2020-08-10T22:09:34.4418598Z   Telemetry
2020-08-10T22:09:34.4419213Z   ---------
2020-08-10T22:09:34.4420561Z   The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
2020-08-10T22:09:34.4421879Z   
2020-08-10T22:09:34.4422678Z   Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
2020-08-10T22:09:34.4423486Z   
2020-08-10T22:09:34.4424101Z   ----------------
2020-08-10T22:09:34.4424861Z   Explore documentation: https://aka.ms/dotnet-docs
2020-08-10T22:09:34.4425753Z   Report issues and find source on GitHub: https://github.com/dotnet/core
2020-08-10T22:09:34.4426636Z   Find out what's new: https://aka.ms/dotnet-whats-new
2020-08-10T22:09:34.4427552Z   Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
2020-08-10T22:09:34.4428559Z   Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
2020-08-10T22:09:34.4429483Z   Write your first app: https://aka.ms/first-net-core-app
2020-08-10T22:09:34.4430386Z   --------------------------------------------------------------------------------------
2020-08-10T22:09:35.8227129Z   Tool 'dotnet-serve' (version '1.7.125') was restored. Available commands: dotnet-serve
2020-08-10T22:09:35.8229563Z   
2020-08-10T22:09:35.8230348Z   Restore was successful.
2020-08-10T22:09:45.1432530Z dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x64.zip
2020-08-10T22:09:45.5500505Z dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x64.zip
2020-08-10T22:09:47.4380156Z dotnet-install: Installation finished
2020-08-10T22:09:48.8844918Z dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x86.zip
2020-08-10T22:09:49.2062524Z dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x86.zip
2020-08-10T22:09:51.0707150Z dotnet-install: Adding to current process PATH: "D:\a\1\s\.dotnet\x86\". Note: This change will not be visible if PowerShell was run as a child process.
2020-08-10T22:09:51.0733455Z dotnet-install: Installation finished
2020-08-10T22:09:51.5724560Z   Determining projects to restore...
2020-08-10T22:10:27.4707363Z   Restored D:\a\1\s\eng\tools\RepoTasks\RepoTasks.csproj (in 34.95 sec).
2020-08-10T22:10:40.0991469Z   RepoTasks -> D:\a\1\s\artifacts\bin\RepoTasks\Release\net472\RepoTasks.dll
2020-08-10T22:10:40.2107212Z   RepoTasks -> D:\a\1\s\artifacts\bin\RepoTasks\Release\netcoreapp3.1\RepoTasks.dll
2020-08-10T22:10:41.5205907Z   Determining projects to restore...
2020-08-10T22:10:42.0510571Z   All projects are up-to-date for restore.
2020-08-10T22:10:42.3562000Z   Tool 'dotnet-serve' (version '1.7.125') was restored. Available commands: dotnet-serve
2020-08-10T22:10:42.3569388Z   
2020-08-10T22:10:42.3570515Z   Restore was successful.
2020-08-10T22:10:44.1154226Z dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x64.zip
2020-08-10T22:10:44.4841248Z dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x64.zip
2020-08-10T22:10:44.6956323Z dotnet-install: Installation finished
2020-08-10T22:10:45.7285998Z dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x86.zip
2020-08-10T22:10:46.0530184Z dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.6-servicing.20316.4/dotnet-runtime-3.1.6-servicing.20316.4-win-x86.zip
2020-08-10T22:10:46.2745324Z dotnet-install: Adding to current process PATH: "D:\a\1\s\.dotnet\x86\". Note: This change will not be visible if PowerShell was run as a child process.
2020-08-10T22:10:46.2764800Z dotnet-install: Installation finished
2020-08-10T22:11:47.9206293Z   Determining projects to restore...
2020-08-10T22:11:53.2705496Z   v12.18.3
2020-08-10T22:12:42.2899995Z   Restored D:\a\1\s\src\Tools\Microsoft.dotnet-openapi\test\dotnet-microsoft.openapi.Tests.csproj (in 26.82 sec).
2020-08-10T22:12:42.9057948Z   Restored D:\a\1\s\src\SiteExtensions\LoggingAggregate\test\Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests\Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests.csproj (in 612 ms).
2020-08-10T22:12:48.9087067Z   Restored D:\a\1\s\src\SignalR\server\StackExchangeRedis\test\Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests.csproj (in 6 sec).
2020-08-10T22:12:49.6002209Z   Restored D:\a\1\s\src\SignalR\server\StackExchangeRedis\src\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj (in 424 ms).
2020-08-10T22:12:49.6929497Z   Restored D:\a\1\s\src\SignalR\server\Specification.Tests\src\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj (in 77 ms).


...


2020-08-10T22:14:27.9366799Z   Restored D:\a\1\s\src\Middleware\Session\test\Microsoft.AspNetCore.Session.Tests.csproj (in 145 ms).
2020-08-10T22:14:27.9639352Z   Restored D:\a\1\s\src\Middleware\Session\ref\Microsoft.AspNetCore.Session.csproj (in 20 ms).
2020-08-10T22:14:28.3826697Z   Restored D:\a\1\s\src\Middleware\Rewrite\test\Microsoft.AspNetCore.Rewrite.Tests.csproj (in 128 ms).
2020-08-10T22:14:28.4008078Z   Restored D:\a\1\s\src\Middleware\Rewrite\src\Microsoft.AspNetCore.Rewrite.csproj (in 12 ms).
2020-08-10T22:14:28.4416031Z   Restored D:\a\1\s\src\Middleware\Rewrite\sample\RewriteSample.csproj (in 23 ms).
2020-08-10T22:14:28.4584362Z   Restored D:\a\1\s\src\Middleware\Rewrite\ref\Microsoft.AspNetCore.Rewrite.csproj (in 18 ms).
2020-08-10T22:14:29.6264895Z   Restored D:\a\1\s\src\Middleware\Session\samples\SessionSample.csproj (in 1.65 sec).
2020-08-10T22:14:37.3349163Z   Microsoft.Net.Http.Headers -> D:\a\1\s\artifacts\bin\Microsoft.Net.Http.Headers-ref\Debug\netcoreapp3.1\Microsoft.Net.Http.Headers.dll
2020-08-10T22:14:38.4601080Z   Microsoft.Net.Http.Headers -> D:\a\1\s\artifacts\bin\Microsoft.Net.Http.Headers\Debug\netcoreapp3.1\Microsoft.Net.Http.Headers.dll
2020-08-10T22:14:38.6392136Z   Microsoft.AspNetCore.Http.Features -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Http.Features-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Http.Features.dll
2020-08-10T22:14:38.9563375Z   Microsoft.AspNetCore.Http.Features -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Http.Features\Debug\netcoreapp3.1\Microsoft.AspNetCore.Http.Features.dll
2020-08-10T22:14:39.1462654Z   Microsoft.AspNetCore.WebUtilities -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.WebUtilities-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.WebUtilities.dll
2020-08-10T22:14:41.4933335Z   Microsoft.AspNetCore.Hosting.Server.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Hosting.Server.Abstractions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll
2020-08-10T22:14:41.4935014Z   Microsoft.AspNetCore.WebUtilities -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.WebUtilities\Debug\netcoreapp3.1\Microsoft.AspNetCore.WebUtilities.dll
2020-08-10T22:14:41.4935971Z   Microsoft.AspNetCore.Http.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Http.Abstractions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Http.Abstractions.dll
2020-08-10T22:14:41.4936931Z   Microsoft.AspNetCore.Http.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Http.Abstractions\Debug\netcoreapp3.1\Microsoft.AspNetCore.Http.Abstractions.dll
2020-08-10T22:14:41.4938005Z   Microsoft.AspNetCore.Hosting.Server.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Hosting.Server.Abstractions\Debug\netcoreapp3.1\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll
2020-08-10T22:14:41.4939031Z   Microsoft.AspNetCore.Hosting.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Hosting.Abstractions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Hosting.Abstractions.dll
2020-08-10T22:14:41.4939950Z   Microsoft.AspNetCore.Http.Extensions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Http.Extensions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Http.Extensions.dll
2020-08-10T22:14:41.5399079Z   Microsoft.AspNetCore.Hosting.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Hosting.Abstractions\Debug\netcoreapp3.1\Microsoft.AspNetCore.Hosting.Abstractions.dll
2020-08-10T22:14:41.5426900Z   Microsoft.AspNetCore.Http.Extensions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Http.Extensions\Debug\netcoreapp3.1\Microsoft.AspNetCore.Http.Extensions.dll
2020-08-10T22:14:41.8803595Z   Microsoft.AspNetCore.Routing.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Routing.Abstractions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Routing.Abstractions.dll
2020-08-10T22:14:41.8806094Z   Microsoft.AspNetCore.HttpOverrides -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.HttpOverrides-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.HttpOverrides.dll
2020-08-10T22:14:42.2645301Z   Microsoft.AspNetCore.HttpOverrides -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.HttpOverrides\Debug\netcoreapp3.1\Microsoft.AspNetCore.HttpOverrides.dll
2020-08-10T22:14:42.5924756Z   Microsoft.AspNetCore.Authentication.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Authentication.Abstractions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Authentication.Abstractions.dll
2020-08-10T22:14:42.6422687Z   Microsoft.AspNetCore.Diagnostics.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Diagnostics.Abstractions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Diagnostics.Abstractions.dll
2020-08-10T22:14:43.4043452Z   Microsoft.AspNetCore.Routing.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Routing.Abstractions\Debug\netcoreapp3.1\Microsoft.AspNetCore.Routing.Abstractions.dll
2020-08-10T22:14:43.4392432Z   Microsoft.AspNetCore.Authentication.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Authentication.Abstractions\Debug\netcoreapp3.1\Microsoft.AspNetCore.Authentication.Abstractions.dll
2020-08-10T22:14:44.1707287Z   Microsoft.AspNetCore.Metadata -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Metadata-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.Metadata.dll
2020-08-10T22:14:44.1739114Z   Microsoft.AspNetCore.DataProtection.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.DataProtection.Abstractions-ref\Debug\netcoreapp3.1\Microsoft.AspNetCore.DataProtection.Abstractions.dll
2020-08-10T22:14:44.3530911Z   Microsoft.AspNetCore.Metadata -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Metadata\Debug\netcoreapp3.1\Microsoft.AspNetCore.Metadata.dll
2020-08-10T22:14:44.4821266Z   Microsoft.AspNetCore.DataProtection.Abstractions -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.DataProtection.Abstractions\Debug\netcoreapp3.1\Microsoft.AspNetCore.DataProtection.Abstractions.dll


@dougbu

dougbu commented Aug 11, 2020

Copy link
Copy Markdown
Contributor

@softworkz I was simultaneously agreeing and disagreeing with you. .\build.cmd /p:{property}={value} are completely valid. But, the specific case of /p:Configuration=Release doesn't work because the -configuration default in non-CI builds is Debug and it's added later in the dotnet msbuild command than the specified option.

@softworkz

Copy link
Copy Markdown
Contributor Author

@softworkz I was simultaneously agreeing and disagreeing with you. .\build.cmd /p:{property}={value} are completely valid. But, the specific case of /p:Configuration=Release doesn't work because the -configuration default in non-CI builds is Debug and it's added later in the dotnet msbuild command than the specified option.

OK, let's agree to that. It's actually hard to find any tag or branch that builds without issues. Not even the release/3.1 branch. Would you mind taking a look at my recent bug report? #24729 (just in case it's of your concern)

Thanks a lot,
softworkz

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants