VS/Xamarin/Mac build error CS0012

Bitrise Build Issue Report template

Description of the issue

Both iOS and Android builds are seeing the following error:
error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Environment:

Where did the issue happen?

Visual Studio for Mac - Stable

Which build Step causes the issue and which version of the step?

xamarin archive

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : UNKNOWN
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : YES
  • If it’s an issue which happens sporadically, what’s the frequency? (e.g. Once a day ; about x% of the builds) : 100%
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : November 7, 2017

Build log

Please attach the build log (you can download the build log from the build’s page, once the build is finished, using the “Download log” button - floating at the bottom right corner of the log viewer), or if you can’t attach the whole log then send the full log through a private channel (e.g. email - https://www.bitrise.io/contact ), with a link to the related Discuss issue.
Unable to attach files with .log extension.

Hi @gitizenme,

Thanks for creating the report! :slight_smile:

Q:

  1. Did you try it on the Visual Studio for Mac - Beta stack? If not yet, can you please try?
  2. “Unable to attach files with .log extension.” - can you simply link the build’s URL?
  1. Beta channel gives the same error.
  2. Logs
    iOS: https://www.bitrise.io/build/f5f0de707ebdd093
    Android: https://www.bitrise.io/build/f5f0de707ebdd093

Is the .NET Standard 2.0 Framework installed as part of the stack?
Xamarin blog post: https://blog.xamarin.com/share-code-net-standard-2-0/
.NET Core 2.0 for Mac: https://www.microsoft.com/net/download/macos

Might be related or same issue:

1 Like

@gitizenme .Net Standard 2.0 will be preinstalled after this weekend’s updates, see my comment at Struggling with getting a Xamarin project with .NET Standard project to build

In the meantime you can use the workaround shared by @fredrikhaglund at Struggling with getting a Xamarin project with .NET Standard project to build

Complete re-install of Visual Studio for Mac on the Xcode 9.1 stack went live this weekend (Weekly Virtual Machine / Stack updates - 2017.11.11 - Xcode 9.2 beta 2, VS for Mac reinstall on Xcode 9.1 stack).

Can you please try it again @gitizenme and let us know if you’d still have this issue?
Thanks! :slight_smile:

It is working.

1 Like

Thanks for reporting @gitizenme and Happy Building! :slight_smile: