Closed kimbirkelund closed 6 months ago
Thanks for the issue report @kimbirkelund! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.
If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.
Pair To Mac is a Visual Studio feature and not maintained in this repo by this team, could you please file this to VSFeedback?
I get the same error trying to restore the workload from command line, so it doesn't really appear to be Visual Studio related. It seems more to be fallout from the recent 8.0.200/201 kafuffle.
This might be related to https://github.com/dotnet/maui/issues/20600
It appears I spoke to soon. Downgrading Visual Studio to 17.8.6 allowed me to connect and build. I'll move the issue to VS feedback.
same on VS Version 17.10.0 Preview 1.0 🙄
I have a new computer with a fresh install of 17.9.0. I haven't found a way to downgrade to 17.8.6. It's a mystery how this could pass the test by Microsoft? Any solution?
I have a new computer with a fresh install of 17.9.0. I haven't found a way to downgrade to 17.8.6. It's a mystery how this could pass the test by Microsoft? Any solution?
in that regard MAUI as a whole is a complete mystery
Painful
I created an issue on VS Feedback for this: https://developercommunity.visualstudio.com/t/Unable-to-install-MAUI-workload-on-Mac-u/10595252
This is still a problem in 17.9.1.
Uninstalling and reinstalling .net maui workloads and .net 8.0 runtime via vs installer helps me deal with this problem.
This issue is specifically related to pair-to-mac which handles installing all these components for you (on the mac that is).
The experience of developing maui using mac's VS was particularly poor, so I chosed pair to mac.
Uninstalling and reinstalling .net maui workloads and .net 8.0 runtime via vs installer helps me deal with this problem.
I will try it after get off work,thanks.
I also have the same problem with the latest VS 17.9.1. Please any workaround or solution without downgrading?
I've switched to using Live Share and VNC for now :-(
The same issue
This is embarrassing. I tell everyone to use Maui and then I cannot continue in Windows. You are expiring VS for Mac very soon. You must inspire some confidence in Maui.
@kimbirkelund Could you please reply to the VS Feedback and provide the details, I think no one is aware of the actual issue that is going on.
just for reference - a workaround was posted in the VS Ticket discussion
1 - Go to this folder on Windows: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios 2 - Copy the 17.2.8022 sub-folder to the following location on the Mac: ~/Library/Caches/Xamarin/XMA/SDKs/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.ios 3 - Try connecting to the Mac again from VS with Pair To Mac
Got the same problem on 17.9.0
I have the same issue on 17.9.3
17.9.3
Could not install workload 'ios'. Details: Unhandled exception: Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestCompositionException: Could not find workload 'ios' extended by workload 'maui-ios' in manifest 'microsoft.net.sdk.maui' [/Users/rnd/Library/Caches/Xamarin/XMA/SDKs/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.3/WorkloadManifest.json]
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.<>cDisplayClass26_0.<1.LoadFromEnumerator() at System.Linq.Enumerable.AppendPrepend1Iterator
1.MoveNext()
at System.Linq.Enumerable.All[TSource](IEnumerable1 source, Func
2 predicate)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.GetAvailableWorkloadDefinitions()+MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.Contains[TSource](IEnumerable
1 source, TSource value, IEqualityComparer1 comparer) at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.ValidateWorkloadIdsInput() at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand..ctor(ParseResult parseResult, IReporter reporter, IWorkloadResolverFactory workloadResolverFactory, IInstaller workloadInstaller, INuGetPackageDownloader nugetPackageDownloader, IWorkloadManifestUpdater workloadManifestUpdater, String tempDirPath, IReadOnlyCollection
1 workloadIds)
at Microsoft.DotNet.Cli.WorkloadInstallCommandParser.<>c.
Updated to VS 2022 version 17.9.3 and I am still unable to connect to mac:
Could not install workload 'ios'. Details: Unhandled exception: Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadManifestCompositionException: Could not find workload 'ios' extended by workload 'maui-ios' in manifest 'microsoft.net.sdk.maui' [/Users/developer/Library/Caches/Xamarin/XMA/SDKs/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.3/WorkloadManifest.json]
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.<>cDisplayClass26_0.<1.LoadFromEnumerator() at System.Linq.Enumerable.AppendPrepend1Iterator
1.MoveNext()
at System.Linq.Enumerable.All[TSource](IEnumerable1 source, Func
2 predicate)
at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.GetAvailableWorkloadDefinitions()+MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.Contains[TSource](IEnumerable
1 source, TSource value, IEqualityComparer1 comparer) at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.ValidateWorkloadIdsInput() at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand..ctor(ParseResult parseResult, IReporter reporter, IWorkloadResolverFactory workloadResolverFactory, IInstaller workloadInstaller, INuGetPackageDownloader nugetPackageDownloader, IWorkloadManifestUpdater workloadManifestUpdater, String tempDirPath, IReadOnlyCollection
1 workloadIds)
at Microsoft.DotNet.Cli.WorkloadInstallCommandParser.<>c.
Same issue as MohammedBen reported above.
This solution helped fixed my issue:
1 - Go to this folder on Windows: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios 2 - Copy the 17.2.8022 sub-folder to the following location on the Mac: ~/Library/Caches/Xamarin/XMA/SDKs/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.ios 3 - Try connecting to the Mac again from VS with Pair To Mac
I can confirm that @MohammedBen workaround worked on my side too
@MohammedBen 's solution worked for me as well. Microsoft, please test the entire user workflow.
Thanks
Nope, does not work
Copy 17.2.8043 subfolder (do not have 17.2.8022) and try to pair - it fails.
Pack Microsoft.iOS.Sdk version 17.2.8043 is already installed.
Initializing IDB environment...
SDK relative directory: packs\Microsoft.iOS.Sdk\17.2.8004\
Server Settings:
- mlaunch path: N/A
- Xcode version: 15.2
- Xcode path: /Applications/Xcode.app
Some mismatch in versions? If I try to copy 17.2.8004 instead, it just removed manifest folder
@MohammedBen can you please attach content of the folder 17.2.8022. Thanks.
How is this stable? I would have never migrated from Xamarin Forms. Pair to Mac is a mess.
It is a mess.
Secure storage still fails in release mode.
I have switched to flutter.
Regards, Ashley
On Mar 14, 2024, at 12:07 AM, Chaitanya Kale @.***> wrote:
How is this stable? I would have never migrated from Xamarin Forms. Pair to Mac is a mess.
— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/maui/issues/20686#issuecomment-1996510786, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQHWNX5J3PEEXWBGROJGGGTYYEWCBAVCNFSM6AAAAABDO5GXEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWGUYTANZYGY. You are receiving this because you commented.Message ID: @.***>
After installing Visual Studio Version 17.10.0 Preview 2.0 I am able to Pair to Mac again.
I wasted a day and half searching for a way to get it going again. I swear I age twice as fast working with MAUI.
Secure storage does work for me in release.
Yes, MAUI is extremely frustrating to work with. Lots of work around/hacks. But I am now at a point were my app is ready for production... until the next version of VS and/or some random Nuget package that will make me loose another day or 2 to figure out what got broken and what the new "hack" is so to get it going again.
Hang in there.
@MohammedBen can you please attach content of the folder 17.2.8022. Thanks.
@EvgenyMuryshkin , I actually don't have the contents of 17.2.8022. I had subfolder 17.2.8004 and that's the folder I copied.
I got passed the pairing to Mac issue, but now I am having another issue deploying to the simulator, anyone else having this issue I am getting warnings saying that the Xcode version installed in your mac (15.3) is not compatible with this version of Visual studio. As of today, I have latest version, 17.9.3 and I also installed VS 2022 17.10 Preview2 and still having the same warnings and errors as displayed below.
@Richard-Dufour, are you able to debug/test your app by deploying to the iOS simulator with VS 17.10 Preview 2 ?
Glad to see I'm not alone, can't get it to work. That's another few hours of my life wasted... Lost countless hours migrating from Xamarin to .NET Maui and then when I get there the pair to Mac feature hardly ever works.
Microsoft have abandoned Mac developers by killing VS Mac, then provide alternatives like VS Code & Pair to Mac that are even worse. I’m now looking into Rider which means added costs, or a rewrite in Swift and jump ship. Quickly losing confidence and patience with Microsoft.
@MohammedBen I used to use the simulator and it was working fine. But I got an iPad and an iPhone for testing directly onto physical devices.
I just tested connecting to the simulator using the preview version of VS, and it worked fine. From VS (Windows), I start the simulator, it deploys and the simulator is then displayed on both the Mac and Windows. Note (if that makes a difference) On the mac, I use XCode 15.2
When using my actual device I just connect my iPad to my mac, start debugging from VS (Windows), Pair to the Mac. If the connection does not work, I sometimes have to go on the Mac > XCode and unpair/re pair the iPad device.
Another thing/work around, almost every day, when I stop for the night, I leave my PC in sleep mode. When I come back in the morning and work again, I cannot pair to mac, it hangs at the "starting the connection" phase. The "trick' is to stop, close VS, restart VS, pair to mac works again.
@Richard-Dufour,
I went ahead and installed Xcode 15.2 and paired VS 17.10 Preview 2 to my mac (worked), and is finally deploying to the iOS simulator !
I initially had both xcode versions and renamed one of them, but it was confused, so removing 15.3 from the applications folder to another folder did it !
Thank you @Richard-Dufour
After wasting lots of time! and downloading all the VS and Xcode versions, I think the biggest culprit is Xcode 15.3. Don't upgrade to 15.3 until VS is stable or has its compatibilities right!
I am sure VS 17.9.3 would work fine with Xcode 15.2, but I haven't tested it and won't touch my current setup as it is working fine for me with VS 17.10 Preview with Xcode 15.2 !
Another thing worth mentioning, from time to time, you'll try to run/deploy to your device and it will fail to "fully" deploy with error:
INFO: Could not open port for debugger. Another process may be using the port.
Do it again, it sometimes takes 2 tries.
I know, it's stupid, but that's the way it is.
Just copying the files...
...wasn't enough for me to get it to build / deploy, I also had to disable "Remote Simulator to Windows" in Visual Studio:
After that, it's building, deploying, and running correctly (albeit with the simulator running on the mac).
Visual Studio 17.9.3 macOS Sonoma 14.4 running Xcode 15.3
I got passed the pairing to Mac issue, but now I am having another issue deploying to the simulator, anyone else having this issue I am getting warnings saying that the Xcode version installed in your mac (15.3) is not compatible with this version of Visual studio. As of today, I have latest version, 17.9.3 and I also installed VS 2022 17.10 Preview2 and still having the same warnings and errors as displayed below.
@Richard-Dufour, are you able to debug/test your app by deploying to the iOS simulator with VS 17.10 Preview 2 ?
Same here, VS deployment fails with atool error 1. At least, produced bundle is valid, so I copy it to Mac and then upload using Transporter app.
@EvgenyMuryshkin
Yes, but using XCode 15.2
See my previous post, XCode 15.3 does not work, revert to XCode 15.2 to get your simulator working
I tried to what they recommend
1 - Go to this folder on Windows: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios
2 - Copy the 17.2.8022 sub-folder to the following location on the Mac: ~/Library/Caches/Xamarin/XMA/SDKs/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.ios
3 - Try connecting to the Mac again from VS with Pair To Mac
but it is not working for me. I rolled back to the previous version of Visual Studio.
I have a rhetorical question: has Microsoft a strategy about MAUI
? Using MAUI
seems increasingly difficult and full of obstacles and issues. Do we have to switch to Java and Swift?
It seems to work with Visual Studio 17.10.0 Preview 2.0 and Xcode 15.2.
Not ideal, but after hours of trying different things like deleting the XMA folders on both Mac and Windows several times, running sudo dotnet workload update
on the Mac and a few restarts, I settled with the Preview version of Visual Studio.
Downgrading to the previous version of Visual Studio worked for me ... or at least it was the last thing I tried! .. had also downgraded to a previous version of Xcode.
I did see Gerald V. mention somewhere that he doesn't recommend upgrading Xcode to 15.3 yet as they're still working on compatibility.
With the latest preview version of VS (17.10.0 Preview 2.0), Pair to Mac is working again. As you've all seen, it is not working in the current VS 17.9.3 for me. I have not tried the workaround as I will just use the VS Preview.
Microsoft have said they're going to ship a Service Release to VS 2022 17.9.x to fix the pairing issue: https://developercommunity.visualstudio.com/t/Unable-to-install-MAUI-workload-on-Mac-u/10595252#T-N10612988-N10617181 - I asked that question because fixing it in a preview release was fine, but since this was a fairly impactful production incident with a workaround, but a non intuitive one (especially for new starters) it seemed to me it needed a more urgent fix and it appears that is what is happening.
To be fair to Microsoft on the Xcode 15.3 compatibility - they have clearly posted (as pinned issues) on both the .NET MAUI and .NET for iOS Repos that Xcode 15.3 is out but that they need to release compatible versions and so to keep using Xcode 15.2 until they state otherwise: https://github.com/dotnet/maui/issues/21057 and https://github.com/xamarin/xamarin-macios/issues/20257
Is it just me or this seems like a regular thing for Microsoft these days, just release even if full of bugs/compatibility issues. Whatever happen to build, TEST, then release.
It is a mess. Secure storage still fails in release mode. I have switched to flutter. Regards, Ashley On Mar 14, 2024, at 12:07 AM, Chaitanya Kale @.> wrote: How is this stable? I would have never migrated from Xamarin Forms. Pair to Mac is a mess. — Reply to this email directly, view it on GitHub<#20686 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQHWNX5J3PEEXWBGROJGGGTYYEWCBAVCNFSM6AAAAABDO5GXEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWGUYTANZYGY. You are receiving this because you commented.Message ID: @.>
I have issues with Azure AD B2C login only on physical device in Release mode. I upgraded Visual Studio only to see if there was some build related issue. Everything works fine in Simulator with Release mode. Pairing issue was resolved by by downgrading to Xcode 15.2 and upgrading to Preview 2 for Visual Studio. I'm still getting messaging and client disconnected exceptions.
Description
When attempting to pair-to-mac I get the following error:
I have the following global.json:
I've tried using 8.0.101 and 8.0.102 as well with no luck. I'm using Visual Studio 17.9.0.
I've tried deleting
~/Library/Caches/Xamarin/XMA/SDKs/
on the Mac several times with no luck.