Command failed with unhandled exception, it looks like MSBuild cannot be registered
- Dominant language
- C#
- Stars
- 25
- Forks
- 10
- Avg merge
- 12h 50m
- Merged PRs (30d)
- 10
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Apple platform
Mac Catalyst, iOS
### Framework version
net9.0-*
### Describe the bug
Command failed with unhandled exception: System.InvalidOperationException: Sequence.contains no elements.
### Expected Behavior
Generate and open an Xcode project for the .NET MAUI project.
### Steps To Reproduce
1. Install .NET9 SDK and MAUI workload
2. Install the latest pre-release channel C#, C# Devkit, and .NET MAUI extensions in VSCode
3. Install xcsync tool using the below command: `dotnet tool install dotnet-xcsync -g --prerelease --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json`
5. Create a .NET MAUI project in VSCode and set the debug target farmwork to iOS or Maccatalyst
6. Wait for the project restore to complete and then select `.NET MAUI: xcsync-Generate an Xcode Project` from View->Command Palette
### Exceptions (if any)
I get an error that it looks like MSBuild cannot be registered, but I already have MSBuild installed.
Error message: `Command failed. Error: Command failed: xcsync generate --project 
"/Users/vstester/Documents/MauiApp1/MauiApp1/Mauiapp1.csproj" -tfm net9.0-maccatalyst -f -o Unhandled exception. System.InvalidOperationException: Sequence.contains no elements at System.Linq.Enumerable.First[TSource] (IEnumerable '1 source) at xcsync.xcSync.RegisterMSBuild() in /_/src/xcsync/xcSync.cs:line 54 at xcsync.xcSync.Main(String[] args) in /_/src/xcsync/xcSync.cs:line 37 at xcsync.xcSync. (String[] args)`
### .NET Version info
9.0.100
### Anything else?
xcsync tool verison: v1.0.0.0
IDE: VSCode
Contributor guide
Assessment
This issue has not been assessed yet.