-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Unable to build a project with net7 RC 1 #10234
Comments
+1 for this - I also have the same issue. I also tried completely removing Visual Studio 2022 Preview and doing a fresh install. It appears that the required workloads are not installed when you download visual studio. Steps to reproduce would be:
For me, the output of dotnet workload list is:
dotnet workload search is:
Notably, there is no maui workload like there is in previous versions. |
+1 |
1 similar comment
+1 |
Same issue |
Can build with net7-android only.. Cant run net6 builds. Microsoft.Maui.Dependencies (6.0.540) wont load. |
This workaround helps getting the workloads
|
@virzak It doesn't seem to help me... |
@virzak Didnt help me either |
Same here actually. It helped download ios stuff but then started throwing.
|
I see the same thing. I have a 2nd PC that I updated VS 2022 today, and I am not seeing the same problems. I am trying to determine the differences. |
We are actively investigating this issue and have an idea of the problem - basically the version generated for the .msi installer created for the packages was creating an older version than the dotnet CLI tools expect to see. We are working on this and will be publishing updated packages to make a workaround available as quickly as we can. |
Great! can't wait to try it |
What is worse, VS Preview 2.1 with installed RC1 does not allow to build 6.0 MAUI applications. Error NETSDK1147 To build this project, the following workloads must be installed: maccatalyst Error NU1012 Platform version is not present for one or more target frameworks, even though they have specified a platform: net6.0-ios, net6.0-maccatalyst Have you ever tried VS 2022 and VS 2022 Preview installed together with both 6.0/7.0 RC1? |
Tested on latest VS Preview 2.1, it works ok on Windows. |
Hi @Redth, |
Can report the same, Vs 2022 is now broken too on my machine with maui 6. |
I can reproduce the same issue in macOS with the following versions installed in case it helps
|
Not overly helpful but can confirm I ran into this issue myself yesterday. I had to revert back to Preview 7 which after some fiddling around resolved the issue. |
I too ran into this problem after upgrading Visual Studio to 17.4.0 Preview 2.1. However, I then tried restoring the workloads as suggested above with this command:
The command sucessfully installed everything:
|
ow. Well didn't work out that way. Now, Visual Studio does not recognize my .NET MAUI project anymore and suggests installing extra components for a full development experience instead. However, when trying to do so, it also explains that everything is already in place. Result: My .NET MAUI setup is completely broken... :( |
We have some newer packages we will publish soon after a bit more validation. If anyone is willing to try and install them from the staging feed, you can try the following commands:
Make sure you are running dotnet commands within the context of
Run the following command exactly:
If you try this, please report your results! |
Tried that, didn't work. There's some signature missing: Added --skip-sign-check as suggested by @jamesmontemagno |
This worked for me!
but now I can build without errors! |
That version it's looking for was never published to nuget, so presumably at some point you did an install/update with additional package sources in the context of that update that aren't included now. I'd rather not confuse this thread with this side issue, please follow up with James, I have some ideas. |
@Redth Thanks! This worked for me. I was able to successfully build on .NET 7 rc1 + MAUI rc1 + Xcode 14 + Jetbrains Rider. I'm running into a problem with running the app. But that issue is tracked on dotnet/macios#15954 |
I've been struggling this for the past few days, but I persevered after reading some of the comments here. I got it fixed in the end, but there are clearly some bugs to be ironed out with the overall process. Here is what I experienced:
In the scenario above, it seems to be necesary to manually uninstall ios, maccatalyst and macos workloads like so:
Once done, you can install using the command posted by @Redth earlier (with the skip signature flag enabled:
After doing this I was able to build. Additionally - in case it helps anyone else - I did find strange behaviour when attempting to install Visual Studio 17.4.0 Preview 2.1 without having .Net 7 RC1 installed beforehand. In this scenario, I found that "maui" would not appear in my workload list during As a result, atempting to use the suggeted fix above would not work and would display "Workload id maui is not recognized". Using the "Repair" tool in the Visual Studio Installer was necessary to make the "maui" workload appear. |
We've published the packages after validating they install and correct the specific issue where you installed a standalone .NET 7 RC1 SDK before installing VS 17.4 P2.1. Until we're able to ship an update with the next VS 17.4 preview, you can work around it with the following:
Make sure you are running dotnet commands within the context of
Run the following command exactly:
Thanks for your patience! |
Hello - with reference to my earlier comment - based on my experience - I do not think command alone is enough. If you have .NET 7 RC1 pre-installed, then running I had to manually remove the offending workloads before |
worked for me, thanks a lot for your work! |
Thid is still not solved |
I'm still struggeling. I've already tried to uninstall Visual Studio and also Visual Studio Preview from my Windows machine. After installing only Visual Studio again, I encountered the same issue. The only workaround for me is to remove the |
I believe you can use the global.json file. Put it in the project directory (same place as csproj). This will indicate to VS that the project should use Net 6. In this file put the following: |
Description
Upgraded to newest VS Preview with support for maui .net 7 RC 1, but I´m unable to build the project. The output complains that workloads for IOS and MacCatalyst are missing. I repaired both, .net 7 RC1 SDK and VS but it had no effect.
Output of dotnet workload list:
Output VS Error View
Output dotnet workload restore
Steps to Reproduce
Link to public reproduction project repository
why? dotnet new maui
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
doesn´t matter
Did you find any workaround?
no
Relevant log output
No response
The text was updated successfully, but these errors were encountered: