Error with the last release 0.9.0.0

Feb 21, 2014 at 9:57 AM
Edited Feb 21, 2014 at 10:04 AM
Hello,

I got this error:

Error 2 The type 'Microsoft.Practices.ServiceLocation.ServiceLocator' exists in both 'XXX\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll' and 'YYY\packages\TweetinviAPI.0.9.0.0\lib\Tweetinvi.API.dll' Test.cs

Can you solve this?
Did you merge too much DLLs?

My project is in .NET 4.5.

Thanks.
Coordinator
Feb 21, 2014 at 10:25 AM
Hi,

Thank you for reporting the issue :)

Do you have the DLL version or the Source Code version of Tweetinvi?
Did you use nuget to use unity in your project?

Regards,
Linvi
Feb 21, 2014 at 10:36 AM
Edited Feb 21, 2014 at 10:43 AM
I use the nuget version of Tweetinvi.

I do not use unity but I added Prism and Prism for MEF packages that comes with the common Service Locator package.
Coordinator
Feb 21, 2014 at 11:00 AM
Edited Feb 21, 2014 at 11:19 AM
Hi,

As a temporary fix, would you please get the binaries from the download page.
There are now 3 different download, merged binaries, source code and binaries. Select the last one.

I will think about how to publish that on nuget for issues related with your case.

Linvi
Coordinator
Feb 21, 2014 at 11:42 AM
Edited Feb 21, 2014 at 11:43 AM
Hi,

I have updated the nuget package. It will now download the Tweetinvi API dll and it has Unity and NewtonJson as a dependency which will be automatically downloaded by nuget.

This should solve your issue.

Thank you for reporting this problem.
Linvi
Marked as answer by linvi on 2/21/2014 at 3:42 AM
Feb 21, 2014 at 1:44 PM
It works. Thanks.

But ...
I'm working with MEF and I don't really like the fact to have 2 different DI frameworks in my solution...
Coordinator
Feb 21, 2014 at 4:01 PM
Hi,

I don't see what is the current issue. I understand you do not want to use 2 DI frameworks in your code. But that does not mean you cannot reference another DI framework within your project.

The containers will be separated and will never interact within one another. Even if you decided to use Unity within the project the containers would have been separated.

Do you have any specific idea of issue that it might cause?

Regards,
Linvi
Coordinator
Feb 21, 2014 at 4:15 PM
You should never be needing to construct inject a Tweetinvi interface in your project.
Though I will try and see if using Unity as IoC takes over MEF if used as such.

I will keep you up to date when I've done some tests.
Linvi
Feb 21, 2014 at 8:13 PM
I don't think of any particular issues.

Don't look too far, there is probably nothing to find ... :)