Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An item with the same key has already been added .Net native tool chain

[UWP][PCL]

Hi all,

When building in release mode (with .NET Native tool chain enabled), I have the following error from compiler :

An item with the same key has already been added

I tried to get diagnostic log, but it does not help. I've already cleaned my Nugget cache, deleted obj&bin folders, tried as administrator, upgrade VS to the last version (15.8.1)

Packages used are :

'GalaSoft.MvvmLight'
'GalaSoft.MvvmLight.Extras'
'Microsoft.Practices.ServiceLocation'
'Newtonsoft.Json'
'PCLStorage'
'PCLStorage.Abastractions'
'System.Net.Http.Formatting'
'Windows.Foundation.UniversalApiContract'

None of my own packages are starting with the samename.

Any ideas ?

like image 921
Stéphane Vidouse Avatar asked Nov 26 '25 11:11

Stéphane Vidouse


1 Answers

Found !

In the constructor of ONE ViewModel, I was using "IsInDesignModeStatic" (from MVVM Light), by changing it to "IsInDesignMode", no more problem.

Thanks all for helping.

like image 86
Stéphane Vidouse Avatar answered Nov 29 '25 16:11

Stéphane Vidouse