-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Maui Project Template and error: Platform version is not present for one or more target frameworks #5778
Comments
While it shouldn't be necessary, you can install the templates manually with |
@jfversluis That fixes the template issue, but I still get the error when opening any MAUI project When building any MAUI project I get the following errors
I already have these workloads
Repairing VS2022 preview and uninstalling & reinstalling does not fix the issue like I said in the original post |
Interestingly enough just |
|
I'm getting another report for something similar like this so there might be something here. Let's reopen for now. |
As per the instructions here. Would you be able to try and run this?
Of course you're welcome to inspect the contents of the script first if you don't just trust us :) |
Here is the full log |
I am having this same issue. I would attach my logs but they are virtually identical to those of @ConnorJBrown Please let me know if there's anything I can do to help! |
After a bit of work and searching, I was able to work around this issue using the following (run from my solution root directory in an admin powershell): dotnet new globaljson --sdk-version 6.0.200
iwr https://aka.ms/dotnet/maui/maui-install.ps1 -OutFile maui-install.ps1; .\maui-install.ps1 -b 'release/6.0.2xx-preview14' -v '6.0.200' This assumes you have dotnet SDK 6.0.200 installed. Hopefully it helps you too @ConnorJBrown |
I'm also expierencing this issue, but it happened after i have uninstalled vs preview an since rienstall i can''t build maui projects anymore. I also tried your scripts, but it fail with the following errors.
These are the SDK i have installed
|
Verified the issue on 17.2.0 Preview 2.1 [32317.152.main], it's not repro. |
Updating to RC1 fixes new projects. To fix existings project i had to:
Without deleting those files, Local Packages folder was not listed inside VS, after cleanup maui is working for existing projects i have running locally. |
Thanks for being on top of this @nukedbit ! More people seeing this is resolved with the latest release? |
Can confirm that adding My {
"sdk": {
"version": "6.0.300-preview.22204.3"
}
} PS: Latest preview didn't fix it, I still need |
Installing 6.0.300 RC1 using instructions from here fixes this issue for me |
I ran into this as well after installing .NET 7 and can confirm that the fixes offered by @evandigby and @maxkoshevoi work. cd SolutionRoot
dotnet new globaljson --sdk-version 6.0.300-preview.22204.3 |
Thanks everyone for letting us know! Seems like not having .NET 7 or adding a |
Description
I seem to have messed up my MAUI installation on Windows VS2022 17.2.0 Preview 2.1.
I cannot see the MAUI template when creating a new project.
When opening an existing MAUI project I see the following error:
Platform version is not present for one or more target frameworks, even though they have specified a platform: net6.0-android, net6.0-ios, net6.0-maccatalyst
Running
dotnet workload list
gives me the following:Repairing my VS2022 installation did not fix this, and uninstalling & reinstalling did not fix this either.
Opening the same projects on a different computer with the same VS2022 version works fine
Steps to Reproduce
This issue happens consistently for me but I cannot reproduce it on a different machine.
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
I was not able test on other platforms
Affected platform versions
net6.0-windows10.0.19041;net6.0-android;net6.0-ios;net6.0-maccatalyst
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: