Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install into Xamarin.iOS #18

Closed
StephenCleary opened this issue Apr 23, 2015 · 2 comments
Closed

Cannot install into Xamarin.iOS #18

StephenCleary opened this issue Apr 23, 2015 · 2 comments
Assignees
Milestone

Comments

@StephenCleary
Copy link
Owner

(from email):

I've hit a small issue referencing it in a Xamarin.iOS class library project. By this I mean a platform-specific assembly (in VStudio 2013, New Project/iOS/Class Library). When I build this (empty) assembly, I get the following compilation errors:

1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
1>c:\Users\mpilot\Documents\Visual Studio 2013\Projects\IosTestClassLib\packages\Microsoft.Bcl.1.1.8\lib\portable-net40+win8\System.IO.dll : error CS1703: An assembly with the same identity 'System.IO, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.
1>c:\Users\mpilot\Documents\Visual Studio 2013\Projects\IosTestClassLib\packages\Microsoft.Bcl.1.1.8\lib\portable-net40+win8\System.Runtime.dll : error CS1703: An assembly with the same identity 'System.Runtime, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.
1>c:\Users\mpilot\Documents\Visual Studio 2013\Projects\IosTestClassLib\packages\Microsoft.Bcl.1.1.8\lib\portable-net40+win8\System.Threading.Tasks.dll : error CS1703: An assembly with the same identity 'System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.

I believe the nuget package has no specific match for the Xamarin.iOS platform and default to .Net 4. Since Xamarin supports async natively (AFAIK), the Microsoft.Bcl package types conflict with those in Xamarin.iOS (mono). If I remove the Nito.AsyncEx nuget references and manually add the Nito.AsyncEx assemblies from the Net45 sub-folder of the nuget package, my code compiles and runs as it should.

[Same error with Nito.AsyncEx preview]:

1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
1>c:\Users\mpilot\Documents\Visual Studio 2013\Projects\IosTestClassLib\packages\Microsoft.Bcl.1.1.8\lib\portable-net40+win8\System.IO.dll : error CS1703: An assembly with the same identity 'System.IO, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.
1>c:\Users\mpilot\Documents\Visual Studio 2013\Projects\IosTestClassLib\packages\Microsoft.Bcl.1.1.8\lib\portable-net40+win8\System.Runtime.dll : error CS1703: An assembly with the same identity 'System.Runtime, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.
1>c:\Users\mpilot\Documents\Visual Studio 2013\Projects\IosTestClassLib\packages\Microsoft.Bcl.1.1.8\lib\portable-net40+win8\System.Threading.Tasks.dll : error CS1703: An assembly with the same identity 'System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.
@StephenCleary
Copy link
Owner Author

This was fixed with an update to Microsoft.Bcl.

AsyncEx should require the current versions of all its dependents to ensure no one else runs into this.

@cmisztur
Copy link

cmisztur commented May 9, 2015

3.0.1-pre works fine.

@StephenCleary StephenCleary self-assigned this Jun 30, 2016
@StephenCleary StephenCleary added this to the 3.0.1 milestone Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants