Home > Enterprise >  Double clicking on a storyboard in VS for Mac doesn't open as a project in xcode
Double clicking on a storyboard in VS for Mac doesn't open as a project in xcode

Time:01-31

We have recently upgrade our Xamarin project to .Net 6.

Before the upgrade, when we opened up the project in Visual Studio for MAC we could double click on the storyboard, and it would open in XCode as a project. Meaning we could see the generated header files (among other) and assign outlets from the scenes to the code which we could then use in our C# code.

After the upgrade, we can still double click the storyboard, but now it only opens the storyboard in XCode and it not longer opens it as a project (similar to what would happen if you double click the storyboard from Finder), this results in us not being able to see the header files and thus no longer assign our outlets.

I am using VS for MAC 17.4.3 and XCode 14.2. We can still compile, build and run the app. This will show us the existing scenes (and they work).

Does anyone have any idea how this can be fixed again?

I have already tried to create a new storyboard but that didn't help. I had also download a version from before the upgrade to .Net 6 and there it still works, so I logic dictates it is probably related to .Net 6 and visual studio not really liking xamarin.

CodePudding user response:

A temporary workaround is to use Rider from Jetbrains. This is not ideal (unless you love Rider of course) but you can open the Storyboard in Xcode from Rider, create the outlets and such as usual, have Rider generate the header and C# files and then continue in Visual Studio.

That said, I have had issues where if I have both Rider and Visual Studio open on the same solution occasionally a lot of files get deleted so it is not perfect.

  • Related