MsBuild issue affects Reqnroll projects that use .NET 9.0.307 or .NET 8.0.416: Error MSB4216: Could not run the "ReplaceTokenInFileTask" task because MSBuild... #928
Closed
gasparnagy
announced in
Announcements
Replies: 2 comments 1 reply
-
|
A new version of .NET SDK with the fix was released: SDK 9.0.308. See: https://github.com/dotnet/core/blob/main/release-notes/9.0/9.0.11/9.0.308.md |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Update: There is still no new version of .NET 8, so the problem might still be observed if you use .NET 8.0.416 (the latest .NET 8 version). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Please note this issue affects all Reqnroll versions that is being used with .NET 9.0.307 or .NET 8.0.416. The issue is in MsBuild and the bug has been found already, but not released yet. (See MsBuild Issue 12751)
The error message is
Error MSB4216: Could not run the "ReplaceTokenInFileTask" task because MSBuild could not create or connect to a task host with runtime "NET" and architecture "x64".Unfortunately since .NET 9.0.307 and .NET 8.0.416 are the "latest" versions, using pipelines that install the latest frameworks are also affected (e.g. a task that installs .NET 9.0 as
version: 9.0.x).As discussed at the MsBuild issue, the workaround is to force the previous version (9.0.306 or 8.0.415). When both frameworks are installed, this can be done with a
global.jsonfile, like (note therollForwardsetting!):Or on a pipeline to install the exact framework version.
We will update this issue here once there is an update.
See related issue ticket: #921
Beta Was this translation helpful? Give feedback.
All reactions