Trying to use 'internalsvisibleto' in an iOS project

I have two projects that use the same code files, one for Android and one for iOS. If the 'main' project I have an AssemblyInfo.cs that has an internalsvisibleto attribute to make this DLL visible to my testing DLL.

On the Android project this works. In the iOS projects I try an use an internal constructor and I get "inaccessible due to it's protection level' error.

Is there anything else I should do in the iOS project to get this to work?



  • adamkempadamkemp USInsider, Developer Group Leader mod

    When in doubt try a clean build. I've had trouble with changes to that attribute not taking effect (in both Visual Studio and Xamarin Studio) until I do a rebuild.

    Also make sure that your iOS project has the right assembly name.

  • You were right, it was me being an idiot. The names of the final assemblies are different for iOS and Android I needed two internalsvisibleto. Thanks for pointing me in the right direction

Sign In or Register to comment.