How do I fix CallNative assembly already imported when building AssetBundles?
All of a sudden I'm getting "error Cs1704L An assembly with the same name 'CallNative' has already been imported. Consider removing one of the references or sign the assembly)
Double clicking on it does not show exactly where the error is, and I know I haven't typed anything to import it myself.
The error appears when I build AssetBundles with the Asset Bundle Browser. I was doing this fine earlier on the PC but I pushed them to build them on the Mac for iOS and that's when I started getting the issue (on both computers)
I have tried deleting the project on the mac and pulling it from the cloud to no avail.
Answer by sinjimonkey · Feb 19, 2018 at 12:55 AM
Self-Solved. dlls are stored in the Plugins directory - and there is one in that directory and one in the plugins/iOS directory. The one in the iOS directory should be set to iOS only. In my case the one that was in the plugins directory was set to 'any platform'. Deselecting 'any platform' and deselecting 'iOS' solved the issue. It'll use that one for all platforms except iOS and the other one only when building for iOS.
Hooray! Two years later when co$$anonymous$$g across the exact same problem when rebuilding my project I find I've made a record of how I fixed it last time. Good times!