Search code examples
xamarin.mac

xamarin.mac add netstandard lib but build error


develop mac application use vs mac. i can ref a .NET Standard2.0 lib to my xamarin.mac project. but i can not build success.. the err is :

/Users/yuzd/Projects/AntDeploy/AntDeploy/ViewController.cs(25,25): Error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. (CS0012) (AntDeploy)

how to solve this err?

image

image


Solution

  • See GitHub Issue Here.

    Add the following to your MacOS .csproj

    <Reference Include="netstandard" />