Oops, of course.
Having done that, Iām now back to those same errors:
1096) CS0518: System/SubscribeSafeExtensions.cs(14,54): Predefined type 'System.Int32' is not defined or imported
1097) CS0518: System/SubscribeSafeExtensions.cs(33,14): Predefined type 'System.Object' is not defined or imported
By the way, the FAKE build is triggered by a script step in my workflow (which just runs build.sh
). Executing that same script on my Mac works fine.
Did you try to build the project on another Mac?
Not sure what this might be, but we prepare the VS4Mac stack the same way we do the Xamarin one: we pick a base Xcode stack, which doesnāt have Xamarin nor VS4Mac installed, and then we install Xamarin Studio or VS4Mac on top of it, using the official installer, and then we preinstall a couple of Android packages (https://github.com/bitrise-io/osx-box-bootstrap/blob/master/xamarin-playbook.yml) and thatās all.
No customization, we install XS or VS4Mac using the same installer you can download from their website.
From this Iād say you have something custom on your Mac installed/configured, something thatās not installed by the XS/VS4Mac installer.
Iāll ask a couple of colleagues to build that branch on their Macs tomorrow.
OK, colleague gets the same errors when building on his Mac. Any ideas where to start looking for answers here? Iām kinda baffled.
Most likely some tool version diff
these looks similar:
Or just google for Predefined type 'System.Int32' is not defined or imported
, quite a few things what might cause this.
Been trying to figure out which tool, exactly, would be different. Not having much luck.
I tried getting my colleague to install the same .NET Core SDK that I have (on the theory that perhaps only the runtime was being installed by the Bitrise step). That didnāt work. As further proof it has nothing to do with .NET Core, I uninstalled .NET Core from my Mac and it continues to build fine.
OK, I know what the frigging problem is.
VS4M does an automatic package restore when you open a solution whereas msbuild
does not. I had been testing msbuild
after opening the solution in VS4M, so all packages were restored.
So I need a manual package restore step ahead of the build. I thought this might be just a dotnet restore
call, but I already have that in my build script, so there must be something else I need to do. Looking into itā¦
I had to dotnet restore
per solution, since I had multiple solutions in place.
And now, after all that, IT WORKS!
Thanks so much for the assistance along the way @viktorbenei.
1 Like
Wow, kudos @ch_kent! 
If you have the time, can you share your script(s) / config (parts) you needed for this to work? Might help others as well as if thereās anything we could integrate in a clever way weād definitely be open 