Question

The error message reads:

The type 'Microsoft.Phone.Controls.LongListSelector' exists in both '...\Microsoft SDKs\Windows Phone\v8.0\Libraries\Microsoft.Phone.Controls.Toolkit.dll' and '...\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\Microsoft.Phone.dll'

I am using the latest version of the toolkit (Oct '12) and it's a Windows Phone 8 project.

I'm not sure why this is happening and so I don't know what additional information might be relevant but if you have any questions just ask.

Était-ce utile?

La solution 2

I still don't know why it happened but uninstalling the toolkit through NuGet and installing it again seems to have fixed the problem.

Autres conseils

  1. Install Nuget Packet Manager from visual Studio Updates

  2. Right-Click References in Solution Explorer and then go to manage nuget packets

  3. On Left-Side Panel go to online=>nuget official package source

  4. On Right-Side Panel Search for "windows phone toolkit"

  5. Install and Enjoy..

The reason being, earlier in wp7 longlistselector was not there so they made in toolkit but in wp8, longlistselector was included -which caused conflict with outdated toolkit for wp7 So updating the toolkit fixes the problem.

That is a naming issue. WP8 SDK contains LongListSelector class, and WP Toolkit also has the class with the same name.

There is similar discussion here.

You need to update NuGet and install last version of the Windows Phone Toolkit.

The oficial FAQ solution:

Q - I have WP8 SDK and I installed the NuGet package, it is still installing the 7.1 version of the toolkit assembly, or I get an error – “You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the package does not contain any assembly references that are compatible with that framework.”

A – You have an older version of NuGet. Install the latest NuGet from www.NuGet.org . Close and restart all the instances of Visual Studio. Now install the package. It will install correctly. WP8 projects are supported from Nuget 2.1 onwards.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top