I can't understand why the windows machine profile is available for some projects but no others, even if they are all Maui projects created recently with the latest version of Maui and Vs 2022 preview. Also run the latest maui-check and the msix packaging tools extensions aswell. What is the main cause of this profile to be unavailable?
Asked
Active
Viewed 381 times
1 Answers
0
Did you update VS from an earlier preview?
Do:
- Quit VS. In
VS Installer
,"Repair"
that VS. - In project solution, delete all
bin
andobj
folders. - Run VS. In toolbar find box that says "Windows Machine". That box is a drop down, make sure
Framework (net6.0-windows10.0...)
is selected. - Build project or solution.
- If there is no dropdown option mentioning
windows10
, Close Solution, Edit.csproj
file in a text editor.
The first <PropertyGroup>
should start with these lines:
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
<OutputType>Exe</OutputType>
The following should no longer be needed (especially after "Repair" in Step 1),
but see also older answers.

ToolmakerSteve
- 18,547
- 14
- 94
- 196
-
thank you for the answer, unfortunately it didnt solve the issue. It's very strange, these projects have the same csproj files, running on the same vs, with the latest preview, repaired and also unistall reinstalled. – ScottexBoy Jan 22 '22 at 17:27
-
@ScottexBoy - This is a project you created in an earlier preview version? **Might be easier to create it again, in a new folder, then copy over source files.** OR: Delete `.vs` folder - maybe something old. Check the nugets. Older versions? Update. Restore nugets. Maybe google `where is nuget cache`, and delete the cache. (Though if one project works, that shouldn't be needed.) – ToolmakerSteve Jan 26 '22 at 03:45