Skip to content

MSB4216 when trying new RC 2 .NET MSBuild Tasks with .NET Framework MSBuild feature #12658

@bording

Description

@bording

I'm trying out the new feature to use .NET MSBuild Tasks with .NET Framework MSBuild that shipped in RC 2, but when trying to have Visual Studio 2026 use the task, it's not working.

The build starts, and at first it looks like it's hanging, but eventually it times out and I get the following error:

error MSB4216: Could not run the "SqlPersistenceScriptBuilderTask" task because MSBuild could not create or connect to a task host with runtime "NET" and architecture "x64".  Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:\Program Files\dotnet\sdk\10.0.100-rc.2.25502.107" exists and can be run

I have a draft PR for the changes I've made to our MSBuild task here, but I'm fairly sure I've made the changes as described in the RC 2 release notes correctly.

I've also included the binlogs and CommTrace files from VS for the failed build. Looking through it, I'm not really seeing anything that stands out, though this does seem a bit odd:

Could not run the "SqlPersistenceScriptBuilderTask" task because MSBuild could not create or connect to a task host with runtime "NET" and architecture "x64".  Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:\Program Files\dotnet\sdk\10.0.100-rc.2.25502.107" exists and can be run.

MSBuildLogs.zip

Building the project from the command line works fine, though it's not trying to use the task host from that build.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions