Suddenly encountering issue with "An assembly with the same simple name has already been imported" error for our Xamarin iOS builds

WP (Smokeball) 146 Reputation points
2021-10-13T23:15:36.887+00:00

Having updated all of our VS2019 installs and the Xamarin iOS SDKs. When we build our iOS project we now receive a lot of errors pointing to "An assembly with the same simple name has already been imported" however upon looking at all of our references, which are our own custom NuGet packages, we don't see how this can be the case.

Our setup is pretty straight forward

Xamarin iOS Project
Xamarin Portable

Xamarin iOS references the Portable.

The Portable contains all the NuGet package references of our own.

We have observed that some of these dll's that the errors are complaining are double referenced in this manner:

Package A -> DLL A, DLL B, DLL C

Package B -> DLL D, DLL E, Package A

So in this example it would complain about DLL A, B and C being already imported. because Package B has a reference to Package A.

What we can't seem to get our head around is why this has started occurring recently?

What options do we have to remedy this?

Thanks

Developer technologies .NET Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. WP (Smokeball) 146 Reputation points
    2021-10-14T04:38:47.407+00:00

    Ok so it looks like after a lot of breaking down what happens is.

    If the Xamarin project references Package A version 1.0, and the Package B references Package A version 1.1, this will yield this error.

    However it's very subtle to track down, would be beneficial if visual studio could be able to provide a bit more detail on this so it's easier to track down.


2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.