Reqnroll codebehind generation failes on MSBuild InternalErrorException via dotnet build on .NET 10
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Issue Description
We are migrating a .NET 8 solution to .NET 10 that includes a Reqnroll project. Building with Visual Studio 2026 is no problem and all tests runs correctly.
However building on an (Azure DevOps) build server fails with an "Access is denied" InternalErrorException from MSBuild at the GenerateFeatureFileCodeBehindTask.
Running the same command (from the buildserver) localy reproduces the exception.
### Steps to Reproduce
dotnet.exe build *.sln --configuration Release /nodereuse:false
### Expected Behavior
Generated feature code behind files and successful build
### Actual Behavior
```
E:\.nuget\packages\reqnroll.tools.msbuild.generation\3.3.4\build\Reqnroll.Tools.MsBuild.Generation.targets(163,5): error MSB4018:
The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly.
Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: Cannot acquire required number
of nodes. MSBuildLocation: 'C:\Program Files\dotnet\sdk\10.0.400\MSBuild.exe', CommandLineArgs: '/nologo /nodemode
:2 /nodereuse:False /low:False /parentpacketversion:4 ', NumberOfNodesToCreate: 1, NextNodeId: 1.
=============
System.AggregateException: One or more errors occurred. (Access is denied.)
---> Microsoft.Build.BackEnd.NodeFailedToLaunchException: Access is denied.
at Microsoft.Build.BackEnd.NodeLauncher.StartProcessWindows(NodeLaunchData nodeLaunchData, String exeName, Bool
ean ensureStdOut, Boolean showNodeWindow, Boolean redirectStreams, Boolean isNativeAppHost)
at Microsoft.Build.BackEnd.NodeLauncher.StartInternal(NodeLaunchData nodeLaunchData)
at Microsoft.Build.BackEnd.NodeLauncher.<>c__DisplayClass3_0.b__0()
at Microsoft.Build.BackEnd.NodeLauncher.DisableMSBuildServer(Func`1 func)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.<>c__DisplayClass14_0.g__StartNewNode|2(Int32 no
deId)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.<>c__DisplayClass14_0.b__0(Int32 nodeId)
--- End of inner exception stack trace ---
---> System.AggregateException: One or more errors occurred. (Access is denied.)
---> Microsoft.Build.BackEnd.NodeFailedToLaunchException: Access is denied.
at Microsoft.Build.BackEnd.NodeLauncher.StartProcessWindows(NodeLaunchData nodeLaunchData, String exeName, Bool
ean ensureStdOut, Boolean showNodeWindow, Boolean redirectStreams, Boolean isNativeAppHost)
at Microsoft.Build.BackEnd.NodeLauncher.StartInternal(NodeLaunchData nodeLaunchData)
at Microsoft.Build.BackEnd.NodeLauncher.<>c__DisplayClass3_0.b__0()
at Microsoft.Build.BackEnd.NodeLauncher.DisableMSBuildServer(Func`1 func)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.<>c__DisplayClass14_0.g__StartNewNode|2(Int32 no
deId)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.<>c__DisplayClass14_0.b__0(Int32 nodeId)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.Build.InternalError.Throw(String message, Exception innerException)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.GetNodes(NodeLaunchData nodeLaunchData, Int32 nextNodeId,
INodePacketFactory factory, NodeContextCreatedDelegate createNode, NodeContextTerminateDelegate terminateNode, Int
32 numberOfNodesToCreate)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcTaskHost.CreateNode(TaskHostNodeKey nodeKey, INodePacketFactory
factory, INodePacketHandler handler, TaskHostConfiguration configuration, TaskHostParameters& taskHostParameters)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcTaskHost.AcquireAndSetUpHost(TaskHostNodeKey nodeKey, INodePack
etFactory factory, INodePacketHandler handler, TaskHostConfiguration configuration, TaskHostParameters& taskHostPa
rameters, Int32& hostProcessId, Boolean& wasNewlyCreated)
at Microsoft.Build.BackEnd.TaskHostTask.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLogging
Context taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
```
[msbuild.zip](https://github.com/user-attachments/files/31213282/msbuild.zip)
### Analysis
Possibly related to #14699 (Nested dotnet build...)
### Versions & Configurations
.NET SDK 10.0.400
Reqnroll Version 3.3.4
Test Runner xUnit 3.1.5
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with `dotnet.exe build *.sln --configuration Release /nodereuse:false` and inspect `Reqnroll.Tools.MsBuild.Generation.targets` around line 163, where `GenerateFeatureFileCodeBehindTask` runs. Use the attached `msbuild.zip` and the MSBuild node-launch stack trace to investigate; done means generated feature code-behind files and a successful build on the affected server configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100