79514347

Date: 2025-03-17 10:53:16
Score: 1
Natty:
Report link

Most important is to run Visual Studio as Administrator.

This problem appeared for me when I was trying to clean up my application and get rid of any redundant references. @Gerald Verslius above asked a very good question "Do you actually need it?" So I set about deleting all references to "Microsoft.Maui.Controls" Version="9.0.14" using all means I could think of , using nuget manager, deleting lines from every .csproj and I was still getting the error.

This Error appeared in the list:
Cannot modify an evaluated object originating in an imported file "C:\Program Files\dotnet\packs\Microsoft.Maui.Sdk\9.0.14\Sdk\BundledVersions.targets".

So I closed VS2022, renamed the folder "9.0.14" to "9.0.14.xxx" , and restarted VS2022 in ADMINISTRATION mode.

I was then getting errors that I needed the required workloads
"To build this project, the following workloads must be installed: maui-android"

dotnet workload list
but they were already installed. So again in powershell.

dotnet workload repair
this takes a while as you watch the feedback in PS.

This seemed to have worked but it was a painstaking process of trial and error accross the projects.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Gerald
  • Low reputation (0.5):
Posted by: Ray