Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Error: The process dotnet.exe failed with exit code 1 #20424

Open
4 of 7 tasks
verback2308 opened this issue Sep 16, 2024 · 3 comments
Open
4 of 7 tasks

[BUG]: Error: The process dotnet.exe failed with exit code 1 #20424

verback2308 opened this issue Sep 16, 2024 · 3 comments
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug External Task: DotNetCoreCLI

Comments

@verback2308
Copy link

verback2308 commented Sep 16, 2024

New issue checklist

Task name

DotNetCoreCLI@2

Task version

2.245.1

Issue Description

All our pipelines started crashing with an error on dotnet publish since last Saturday (September 14):

image

There are no details in the logs except that the command returned error 1:

image

Version of the last successful pipeline the same as other - 2.245.1

Old pipelines for previous branches were checked - they also started crashing with an error, however - code is the same:

image

Setting the "clean build" option does not give any changes in any variation:

image

Temporarily switched to a self-hosted agent, everything works there.
Solution compiles on a dev machine (osx, win) with a success.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows Server 2022

Relevant log output

2024-09-16T10:08:10.0082372Z ##[debug]Exit code 1 received from tool 'C:\Program Files\dotnet\dotnet.exe'
2024-09-16T10:08:10.0114980Z ##[debug]STDIO streams have closed for tool 'C:\Program Files\dotnet\dotnet.exe'
2024-09-16T10:08:10.0129751Z ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
2024-09-16T10:08:10.0130534Z ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=3cb2ce63-3f35-4305-b2c1-5f837ed9a98b;]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
2024-09-16T10:08:10.0150681Z ##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
2024-09-16T10:08:10.0151903Z ##[debug]Processed: ##vso[task.issue type=warning;source=TaskInternal;correlationId=3cb2ce63-3f35-4305-b2c1-5f837ed9a98b;].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
2024-09-16T10:08:10.0160379Z Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
2024-09-16T10:08:10.0167984Z ##[debug]task result: Failed
2024-09-16T10:08:10.0195334Z ##[error]Dotnet command failed with non-zero exit code on the following projects : [
  'D:\\a\\1\\s\\PVS\\PVS.Clients.WebClient.Core\\PVS.Clients.WebClient.Core.csproj'
]
2024-09-16T10:08:10.0196110Z ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=3cb2ce63-3f35-4305-b2c1-5f837ed9a98b;]Dotnet command failed with non-zero exit code on the following projects : [
  'D:\\a\\1\\s\\PVS\\PVS.Clients.WebClient.Core\\PVS.Clients.WebClient.Core.csproj'
]
2024-09-16T10:08:10.0200809Z ##[debug]Processed: ##vso[task.complete result=Failed;]Dotnet command failed with non-zero exit code on the following projects : [
  'D:\\a\\1\\s\\PVS\\PVS.Clients.WebClient.Core\\PVS.Clients.WebClient.Core.csproj'
]
2024-09-16T10:08:10.0219672Z ##[section]Finishing: Publish PVS.Clients.WebClient.Core

Full task logs with system.debug enabled

 2024-09-16T10:06:42.5232988Z ##[debug]Evaluating condition for step: 'Publish PVS.Clients.WebClient.Core'
2024-09-16T10:06:42.5234055Z ##[debug]Evaluating: SucceededNode()
2024-09-16T10:06:42.5234337Z ##[debug]Evaluating SucceededNode:
2024-09-16T10:06:42.5234783Z ##[debug]=> True
2024-09-16T10:06:42.5235071Z ##[debug]Result: True
2024-09-16T10:06:42.5235382Z ##[section]Starting: Publish PVS.Clients.WebClient.Core
2024-09-16T10:06:42.5257907Z ==============================================================================
2024-09-16T10:06:42.5258098Z Task         : .NET Core
2024-09-16T10:06:42.5258202Z Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command
2024-09-16T10:06:42.5258364Z Version      : 2.245.1
2024-09-16T10:06:42.5258606Z Author       : Microsoft Corporation
2024-09-16T10:06:42.5258723Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
2024-09-16T10:06:42.5258873Z ==============================================================================
2024-09-16T10:06:42.5617406Z ##[debug]Using node path: C:\agents\3.243.1\externals\node20_1\bin\node.exe
2024-09-16T10:06:42.7415331Z ##[debug]system.debug=True
2024-09-16T10:06:42.7416343Z ##[debug]DistributedTask.Tasks.Node.SkipDebugLogsWhenDebugModeOff=True
2024-09-16T10:06:42.7514208Z ##[debug]agent.TempDirectory=D:\a\_temp
2024-09-16T10:06:42.7514884Z ##[debug]loading inputs and endpoints
2024-09-16T10:06:42.7519095Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2024-09-16T10:06:42.7541171Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2024-09-16T10:06:42.7544627Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2024-09-16T10:06:42.7549607Z ##[debug]loading INPUT_ARGUMENTS
2024-09-16T10:06:42.7552781Z ##[debug]loading INPUT_COMMAND
2024-09-16T10:06:42.7556057Z ##[debug]loading INPUT_CONFIGURATIONTOPACK
2024-09-16T10:06:42.7568136Z ##[debug]loading INPUT_INCLUDENUGETORG
2024-09-16T10:06:42.7568755Z ##[debug]loading INPUT_INCLUDESOURCE
2024-09-16T10:06:42.7569242Z ##[debug]loading INPUT_INCLUDESYMBOLS
2024-09-16T10:06:42.7573976Z ##[debug]loading INPUT_MODIFYOUTPUTPATH
2024-09-16T10:06:42.7577404Z ##[debug]loading INPUT_NOBUILD
2024-09-16T10:06:42.7582105Z ##[debug]loading INPUT_NOCACHE
2024-09-16T10:06:42.7586499Z ##[debug]loading INPUT_NUGETCONFIGPATH
2024-09-16T10:06:42.7590367Z ##[debug]loading INPUT_NUGETFEEDTYPE
2024-09-16T10:06:42.7593483Z ##[debug]loading INPUT_OUTPUTDIR
2024-09-16T10:06:42.7596395Z ##[debug]loading INPUT_PROJECTS
2024-09-16T10:06:42.7600018Z ##[debug]loading INPUT_PUBLISHPACKAGEMETADATA
2024-09-16T10:06:42.7603602Z ##[debug]loading INPUT_PUBLISHTESTRESULTS
2024-09-16T10:06:42.7607362Z ##[debug]loading INPUT_PUBLISHWEBPROJECTS
2024-09-16T10:06:42.7610106Z ##[debug]loading INPUT_REQUESTEDMAJORVERSION
2024-09-16T10:06:42.7612787Z ##[debug]loading INPUT_REQUESTEDMINORVERSION
2024-09-16T10:06:42.7616170Z ##[debug]loading INPUT_REQUESTEDPATCHVERSION
2024-09-16T10:06:42.7618908Z ##[debug]loading INPUT_SEARCHPATTERNPACK
2024-09-16T10:06:42.7621348Z ##[debug]loading INPUT_SEARCHPATTERNPUSH
2024-09-16T10:06:42.7623706Z ##[debug]loading INPUT_SELECTORCONFIG
2024-09-16T10:06:42.7626202Z ##[debug]loading INPUT_VERBOSITYPACK
2024-09-16T10:06:42.7628620Z ##[debug]loading INPUT_VERBOSITYRESTORE
2024-09-16T10:06:42.7631215Z ##[debug]loading INPUT_VERSIONINGSCHEME
2024-09-16T10:06:42.7633629Z ##[debug]loading INPUT_WORKINGDIRECTORY
2024-09-16T10:06:42.7636008Z ##[debug]loading INPUT_ZIPAFTERPUBLISH
2024-09-16T10:06:42.7645022Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2024-09-16T10:06:42.7663492Z ##[debug]loaded 31
2024-09-16T10:06:42.7673263Z ##[debug]Agent.ProxyUrl=undefined
2024-09-16T10:06:42.7673895Z ##[debug]Agent.CAInfo=undefined
2024-09-16T10:06:42.7674381Z ##[debug]Agent.ClientCert=undefined
2024-09-16T10:06:42.7674817Z ##[debug]Agent.SkipCertValidation=undefined
2024-09-16T10:06:43.1792942Z ##[debug]check path : D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.245.1\node_modules\azure-pipelines-tasks-packaging-common\module.json
2024-09-16T10:06:43.1797024Z ##[debug]adding resource file: D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.245.1\node_modules\azure-pipelines-tasks-packaging-common\module.json
2024-09-16T10:06:43.1797680Z ##[debug]system.culture=en-US
2024-09-16T10:06:43.2071029Z ##[debug]agent.proxyurl=undefined
2024-09-16T10:06:43.2071898Z ##[debug]VSTS_ARM_REST_IGNORE_SSL_ERRORS=undefined
2024-09-16T10:06:43.2072430Z ##[debug]AZURE_HTTP_USER_AGENT=VSTS_b9341b5c-68fe-4cc4-aad6-a3b525672053_build_110_0
2024-09-16T10:06:43.2108843Z ##[debug]command=publish
2024-09-16T10:06:43.2109997Z ##[debug]projects=PVS/PVS.Clients.WebClient.Core/PVS.Clients.WebClient.Core.csproj
2024-09-16T10:06:43.2112567Z ##[debug]arguments=-c Release --no-self-contained -f net7.0 /p:ExcludeApp_Data=False -o "D:\a\1\b/PVS.Clients.WebClient.Core"
2024-09-16T10:06:43.2115841Z ##[debug]publishWebProjects=false
2024-09-16T10:06:43.2117510Z ##[debug]zipAfterPublish=false
2024-09-16T10:06:43.2119528Z ##[debug]workingDirectory=D:\a\1\s
2024-09-16T10:06:43.2173303Z ##[warning]Resource file has already set to: D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.245.1\node_modules\azure-pipelines-tasks-packaging-common\module.json
2024-09-16T10:06:43.2180825Z ##[debug]Processed: ##vso[task.issue type=warning;source=TaskInternal;correlationId=3cb2ce63-3f35-4305-b2c1-5f837ed9a98b;]Resource file has already set to: D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.245.1\node_modules\azure-pipelines-tasks-packaging-common\module.json
2024-09-16T10:06:43.2181725Z ##[debug]check path : D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.245.1\task.json
2024-09-16T10:06:43.2182377Z ##[debug]adding resource file: D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.245.1\task.json
2024-09-16T10:06:43.2182838Z ##[debug]system.culture=en-US
2024-09-16T10:06:43.2183213Z ##[debug]which 'C:\Windows\system32\chcp.com'
2024-09-16T10:06:43.2183630Z ##[debug]found: 'C:\Windows\system32\chcp.com'
2024-09-16T10:06:43.2184012Z ##[debug]C:\Windows\system32\chcp.com arg: ["65001"]
2024-09-16T10:06:43.2184416Z ##[debug]C:\Windows\system32\chcp.com arg: ["65001"]
2024-09-16T10:06:43.2184808Z ##[debug]exec tool: C:\Windows\system32\chcp.com
2024-09-16T10:06:43.2185190Z ##[debug]exec tool: C:\Windows\system32\chcp.com
2024-09-16T10:06:43.2185555Z ##[debug]arguments:
2024-09-16T10:06:43.2185879Z ##[debug]arguments:
2024-09-16T10:06:43.2186216Z ##[debug]   65001
2024-09-16T10:06:43.2186549Z ##[debug]   65001
2024-09-16T10:06:43.2186853Z [command]C:\Windows\system32\chcp.com 65001
2024-09-16T10:06:43.2294961Z Active code page: 65001
2024-09-16T10:06:43.2297798Z ##[debug]which 'dotnet'
2024-09-16T10:06:43.2353999Z ##[debug]found: 'C:\Program Files\dotnet\dotnet.exe'
2024-09-16T10:06:43.2359597Z Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
2024-09-16T10:06:43.2366827Z ##[debug]System.DefaultWorkingDirectory=D:\a\1\s
2024-09-16T10:06:43.2370177Z ##[debug]defaultRoot: 'D:\a\1\s'
2024-09-16T10:06:43.2370878Z ##[debug]findOptions.allowBrokenSymbolicLinks: 'false'
2024-09-16T10:06:43.2371439Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2024-09-16T10:06:43.2372067Z ##[debug]findOptions.followSymbolicLinks: 'true'
2024-09-16T10:06:43.2372583Z ##[debug]findOptions.skipMissingFiles: 'false'
2024-09-16T10:06:43.2373162Z ##[debug]matchOptions.debug: 'false'
2024-09-16T10:06:43.2373650Z ##[debug]matchOptions.nobrace: 'true'
2024-09-16T10:06:43.2374125Z ##[debug]matchOptions.noglobstar: 'false'
2024-09-16T10:06:43.2374617Z ##[debug]matchOptions.dot: 'true'
2024-09-16T10:06:43.2375083Z ##[debug]matchOptions.noext: 'false'
2024-09-16T10:06:43.2375569Z ##[debug]matchOptions.nocase: 'true'
2024-09-16T10:06:43.2376051Z ##[debug]matchOptions.nonull: 'false'
2024-09-16T10:06:43.2378233Z ##[debug]matchOptions.matchBase: 'false'
2024-09-16T10:06:43.2378725Z ##[debug]matchOptions.nocomment: 'false'
2024-09-16T10:06:43.2379219Z ##[debug]matchOptions.nonegate: 'false'
2024-09-16T10:06:43.2379695Z ##[debug]matchOptions.flipNegate: 'false'
2024-09-16T10:06:43.2380262Z ##[debug]pattern: 'PVS/PVS.Clients.WebClient.Core/PVS.Clients.WebClient.Core.csproj'
2024-09-16T10:06:43.2388678Z ##[debug]findPath: 'D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj'
2024-09-16T10:06:43.2389265Z ##[debug]statOnly: 'true'
2024-09-16T10:06:43.2389809Z ##[debug]found 1 paths
2024-09-16T10:06:43.2390287Z ##[debug]applying include pattern
2024-09-16T10:06:43.2390837Z ##[debug]adjustedPattern: 'D:\a\1\s\PVS/PVS.Clients.WebClient.Core/PVS.Clients.WebClient.Core.csproj'
2024-09-16T10:06:43.2396384Z ##[debug]1 matches
2024-09-16T10:06:43.2396847Z ##[debug]1 final results
2024-09-16T10:06:43.2397372Z ##[debug]which 'C:\Program Files\dotnet\dotnet.exe'
2024-09-16T10:06:43.2399460Z ##[debug]found: 'C:\Program Files\dotnet\dotnet.exe'
2024-09-16T10:06:43.2400026Z ##[debug]C:\Program Files\dotnet\dotnet.exe arg: publish
2024-09-16T10:06:43.2400625Z ##[debug]C:\Program Files\dotnet\dotnet.exe arg: D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj
2024-09-16T10:06:43.2402778Z ##[debug]modifyOutputPath=false
2024-09-16T10:06:43.2403397Z ##[debug]C:\Program Files\dotnet\dotnet.exe arg: -c Release --no-self-contained -f net7.0 /p:ExcludeApp_Data=False -o "D:\a\1\b/PVS.Clients.WebClient.Core"
2024-09-16T10:06:43.2407554Z ##[debug]exec tool: C:\Program Files\dotnet\dotnet.exe
2024-09-16T10:06:43.2408052Z ##[debug]arguments:
2024-09-16T10:06:43.2408505Z ##[debug]   publish
2024-09-16T10:06:43.2409053Z ##[debug]   D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj
2024-09-16T10:06:43.2409605Z ##[debug]   -c
2024-09-16T10:06:43.2410032Z ##[debug]   Release
2024-09-16T10:06:43.2410495Z ##[debug]   --no-self-contained
2024-09-16T10:06:43.2410948Z ##[debug]   -f
2024-09-16T10:06:43.2411373Z ##[debug]   net7.0
2024-09-16T10:06:43.2411837Z ##[debug]   /p:ExcludeApp_Data=False
2024-09-16T10:06:43.2412287Z ##[debug]   -o
2024-09-16T10:06:43.2412742Z ##[debug]   D:\a\1\b/PVS.Clients.WebClient.Core
2024-09-16T10:06:43.2413715Z [command]"C:\Program Files\dotnet\dotnet.exe" publish D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj -c Release --no-self-contained -f net7.0 /p:ExcludeApp_Data=False -o D:\a\1\b/PVS.Clients.WebClient.Core
2024-09-16T10:06:46.9822706Z ##[debug]Agent environment resources - Disk: D:\ Available 8723.62 MB out of 14334.00 MB, Memory: Used 2441.00 MB out of 7167.00 MB, CPU: Usage 50.00%
2024-09-16T10:06:51.9906106Z ##[debug]Agent environment resources - Disk: D:\ Available 8723.62 MB out of 14334.00 MB, Memory: Used 2368.00 MB out of 7167.00 MB, CPU: Usage 35.00%
2024-09-16T10:06:57.0205809Z ##[debug]Agent environment resources - Disk: D:\ Available 8723.62 MB out of 14334.00 MB, Memory: Used 2425.00 MB out of 7167.00 MB, CPU: Usage 19.00%
2024-09-16T10:07:00.8720868Z   Determining projects to restore...
2024-09-16T10:07:02.0397126Z ##[debug]Agent environment resources - Disk: D:\ Available 8723.62 MB out of 14334.00 MB, Memory: Used 2342.00 MB out of 7167.00 MB, CPU: Usage 100.00%
-- Build warnings --
2024-09-16T10:07:56.8903131Z ##[debug]Agent environment resources - Disk: D:\ Available 8377.29 MB out of 14334.00 MB, Memory: Used 3341.00 MB out of 7167.00 MB, CPU: Usage 79.00%
2024-09-16T10:07:56.9639940Z   
2024-09-16T10:07:56.9655727Z   Bundler: Begin processing bundleconfig.json
2024-09-16T10:07:57.9295695Z   	Minified wwwroot/bundle/css/style-core.min.css
2024-09-16T10:07:57.9638465Z   	Minified wwwroot/bundle/css/style-plugins.min.css
2024-09-16T10:07:58.6477394Z   	Minified wwwroot/bundle/js/app-core.min.js
2024-09-16T10:07:59.2249105Z   	Minified wwwroot/bundle/js/app-plugins.min.js
2024-09-16T10:07:59.2937214Z   	Minified wwwroot/bundle/js/unobtrusive.min.js
2024-09-16T10:07:59.2961914Z   Bundler: Done processing bundleconfig.json
2024-09-16T10:08:02.2609256Z ##[debug]Agent environment resources - Disk: D:\ Available 8249.34 MB out of 14334.00 MB, Memory: Used 3484.00 MB out of 7167.00 MB, CPU: Usage 95.00%
2024-09-16T10:08:07.5758964Z ##[debug]Agent environment resources - Disk: D:\ Available 8249.34 MB out of 14334.00 MB, Memory: Used 3438.00 MB out of 7167.00 MB, CPU: Usage 100.00%
2024-09-16T10:08:08.6393668Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\Components\FacilityListViewComponent.cs(10,7): warning CS0105: The using directive for 'PVS.Clients.Facade.Contracts.Security' appeared previously in this namespace [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6571333Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(740,13): error CS1520: Method must have a return type [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6575293Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(740,13): error CS0501: '.(__tagHelperExecutionContext.Output)' must declare a body because it is not marked abstract, extern, or partial [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6576423Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(742,13): error CS1520: Method must have a return type [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6578662Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(742,13): error CS0501: '.()' must declare a body because it is not marked abstract, extern, or partial [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6580565Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(740,19): error CS0246: The type or namespace name '__tagHelperExecutionContext' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6582395Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(719,82): error CS0246: The type or namespace name '__tagHelperAttribute_11' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6584464Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(721,86): error CS0246: The type or namespace name '__tagHelperAttribute_12' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6586365Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(735,19): error CS0246: The type or namespace name '__tagHelperRunner' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6589801Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(738,23): error CS0246: The type or namespace name '__tagHelperExecutionContext' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6593637Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(719,82): error CS0538: '__tagHelperAttribute_11' in explicit interface declaration is not an interface [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6623126Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(719,106): error CS0501: 'Areas_System_Views_ScheduleOverride__ScheduleOverridingModal.Value()' must declare a body because it is not marked abstract, extern, or partial [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6706849Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(721,86): error CS0538: '__tagHelperAttribute_12' in explicit interface declaration is not an interface [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6789959Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(721,110): error CS0501: 'Areas_System_Views_ScheduleOverride__ScheduleOverridingModal.Value()' must declare a body because it is not marked abstract, extern, or partial [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6813494Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(735,46): error CS0246: The type or namespace name '__tagHelperExecutionContext' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6818449Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(735,13): error CS0246: The type or namespace name 'await' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6867439Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(735,19): error CS0538: '__tagHelperRunner' in explicit interface declaration is not an interface [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6877216Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(735,37): error CS0501: 'Areas_System_Views_ScheduleOverride__ScheduleOverridingModal.RunAsync(__tagHelperExecutionContext)' must declare a body because it is not marked abstract, extern, or partial [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6879670Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(738,17): error CS0246: The type or namespace name 'await' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6881601Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(738,23): error CS0538: '__tagHelperExecutionContext' in explicit interface declaration is not an interface [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6883375Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(738,51): error CS0501: 'Areas_System_Views_ScheduleOverride__ScheduleOverridingModal.SetOutputContentAsync()' must declare a body because it is not marked abstract, extern, or partial [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6884761Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(755,87): error CS0116: A namespace cannot directly contain members such as fields, methods or statements [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6886063Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(759,60): error CS0116: A namespace cannot directly contain members such as fields, methods or statements [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6887380Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(763,70): error CS0116: A namespace cannot directly contain members such as fields, methods or statements [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6888837Z D:\a\1\s\PVS\PVS.Clients.WebClient.Core\obj\Release\net7.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Areas_System_Views_ScheduleOverride__ScheduleOverridingModal_cshtml.g.cs(767,71): error CS0116: A namespace cannot directly contain members such as fields, methods or statements [D:\a\1\s\PVS\PVS.Clients.WebClient.Core\PVS.Clients.WebClient.Core.csproj]
2024-09-16T10:08:08.6889721Z 
2024-09-16T10:08:08.6890330Z Workload updates are available. Run `dotnet workload list` for more information.
2024-09-16T10:08:09.9555923Z 
2024-09-16T10:08:10.0082372Z ##[debug]Exit code 1 received from tool 'C:\Program Files\dotnet\dotnet.exe'
2024-09-16T10:08:10.0114980Z ##[debug]STDIO streams have closed for tool 'C:\Program Files\dotnet\dotnet.exe'
2024-09-16T10:08:10.0129751Z ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
2024-09-16T10:08:10.0130534Z ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=3cb2ce63-3f35-4305-b2c1-5f837ed9a98b;]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
2024-09-16T10:08:10.0150681Z ##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
2024-09-16T10:08:10.0151903Z ##[debug]Processed: ##vso[task.issue type=warning;source=TaskInternal;correlationId=3cb2ce63-3f35-4305-b2c1-5f837ed9a98b;].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
2024-09-16T10:08:10.0160379Z Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
2024-09-16T10:08:10.0167984Z ##[debug]task result: Failed
2024-09-16T10:08:10.0195334Z ##[error]Dotnet command failed with non-zero exit code on the following projects : [
  'D:\\a\\1\\s\\PVS\\PVS.Clients.WebClient.Core\\PVS.Clients.WebClient.Core.csproj'
]
2024-09-16T10:08:10.0196110Z ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=3cb2ce63-3f35-4305-b2c1-5f837ed9a98b;]Dotnet command failed with non-zero exit code on the following projects : [
  'D:\\a\\1\\s\\PVS\\PVS.Clients.WebClient.Core\\PVS.Clients.WebClient.Core.csproj'
]
2024-09-16T10:08:10.0200809Z ##[debug]Processed: ##vso[task.complete result=Failed;]Dotnet command failed with non-zero exit code on the following projects : [
  'D:\\a\\1\\s\\PVS\\PVS.Clients.WebClient.Core\\PVS.Clients.WebClient.Core.csproj'
]
2024-09-16T10:08:10.0219672Z ##[section]Finishing: Publish PVS.Clients.WebClient.Core

Repro steps

pool:
  vmImage: 'windows-latest'

variables:
  NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
  pvs-solution: 'PVS/PVS.sln'
  client: 'PVS.Clients.WebClient.Core'

steps:

  - task: NuGetToolInstaller@1
    displayName: 'Install NuGet'

  - task: Cache@2
    displayName: 'NuGet Cache'
    inputs:
      key: 'nuget | "$(Agent.OS)" | **/packages.lock.json,!**/bin/**,!**/obj/**'
      restoreKeys: |
        nuget | "$(Agent.OS)"
        nuget
      path: '$(NUGET_PACKAGES)'
      cacheHitVar: 'CACHE_RESTORED'

  - task: NuGetCommand@2
    displayName: 'Restore NuGet packages for PVS'
    condition: ne(variables.CACHE_RESTORED, true)
    inputs:
      command: 'restore'
      restoreSolution: '$(pvs-solution)'
      feedsToUse: 'config'
      nugetConfigPath: 'PVS/NuGet.Config'

  - task: DotNetCoreCLI@2
    displayName: 'Publish $(Client)'
    inputs:
      command: 'publish'
      publishWebProjects: false
      projects: 'PVS/$(Client)/$(Client).csproj'
      arguments: '-c Release --no-self-contained -f net7.0 /p:ExcludeApp_Data=False -o "$(Build.BinariesDirectory)/$(Client)"'
      zipAfterPublish: false
      modifyOutputPath: false
@verback2308
Copy link
Author

verback2308 commented Sep 16, 2024

Hi everyone, just found a workaround - added step with SDK installation:

- task: UseDotNet@2
  displayName: 'Install .NET Core SDK'
  inputs:
    version: 7.x
    performMultiLevelLookup: true
    includePreviewVersions: true # Required for preview versions
image

Maybe it's not a task related issue, but agent issue?

@max-zaytsev
Copy link
Contributor

Hi @verback2308 , Could you check "Initialize job"? Has the image version changed between the successful and unsuccessful runs?

@verback2308
Copy link
Author

Hi @verback2308 , Could you check "Initialize job"? Has the image version changed between the successful and unsuccessful runs?

Sure. Seem it really the image issue:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug External Task: DotNetCoreCLI
Projects
None yet
Development

No branches or pull requests

2 participants