Getting started in C# on macOS - 2

https://www.great-white-software.com/blog/2022/09/26/getting-started-with-c/

and please ask questions & let me know how this goes for you !

6 Likes

Following this. Having used VS on windows for many years, I am now trying to get used to it on the mac for developing with blazor, but I’m not at a point where I feel comfortable with the mac version yet.

Norm, just some notes from my experience following your tutorial:

  • I had installed VS for Mac a while back, and it didn’t have the macOS Cocoa option. I let it do all updates, but still didn’t have it. Tried a Google search but couldn’t find anything relevant (knowing what search term(s) to use might have helped). So I uninstalled and installed from the latest download, which fixed it.

  • First time I hit Run it gave some errors, the first of which was that I need to agree to the Xcode terms. I just had an Xcode update yesterday, but didn’t open Xcode after the update. Such a nuisance having to “agree” to updates for an app you’ve already agreed to in the first place! (I know Xojo also does this, but then it’s not an update but an entirely new install each time - a separate nuisance :disappointed:).

  • After fixing that, upon hitting Run it produced the message “App not built”. Couldn’t find anything wrong in the build output messages, which seemed to indicate that the build succeeded. After poking around some, I opended Main.storyboard. This fired off Xcode again, with a security prompt to allow VS to control Xcode. After allowing that and hitting Run again, it finally ran!

This is one reason I dislike “toolchains” - you have to keep up with all the pieces and deal with interaction issues like this, plus keep all the tools in the chain updated (but sometimes not when an update to one tool causes issues for other tools).

• Yeah the latest downloads do fix this where the older ones don’t seem to update correctly

• VS uses Xcode for some tooling - like Xojo does - hence the need to agree

• Interesting that opening the story board made this necessary

We’ll eventually be removing the story hard etc

I do need to figure out an easier way to get a starting project so all this edit & remove stuff isn’t necessary :slight_smile:

I’m going to put another shout out to the RemObjects C# compiler. They have a Mac and Windows IDE and you can write C# code to build applications for Mac and Windows. You can have the executable link to the .NET framework or if you use their ElementsRTL framework (sort of their version of .NET) then their compiler will build a native executable with no external dependencies. It’s very cool.

Yes you have to pay for it. It’s a few hundred bucks a year. Less than Xojo.

That looks interesting. Will try it.