2

I am developing UWP (Universal Windows Platform Apps) using VS2015. At first time I have created a package bundle (.appxupload) and also upload it on store. Now if I run my App, it runs smooth and fine, but when I create a Package again, the following error occur.

Internal compiler error: An item with the same key has already been added

C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x86\ilc\IlcInternals.targets(886,5): error : Internal compiler error: An item with the same key has already been added. 

You can see the errors in Screen shots.

enter image description here

enter image description here

I have read the following blogs but didn't get the solution. Any one's help will be much appreciated. Thanks.

UWP Social Msdn Internal Error - 1

UWP Social Msdn Internal Error - 2

UWP Social Msdn Internal Error - 3

Stackoverflow post

Community
  • 1
  • 1
Zia Ur Rahman
  • 1,850
  • 1
  • 21
  • 30
  • I work on the .NET Native compiler team. Would you mind shooting me a mail at dotnetnative@microsoft.com? We can figure out what's going on and then post back here when you're back on track. – MattWhilden Dec 04 '15 at 17:48
  • yes, sure, I will mail u soon. – Zia Ur Rahman Dec 04 '15 at 18:33
  • If you're able to move to Update 1 of Visual Studio, this outlines a good way to get a nice repro to us: https://github.com/dotnet/core/blob/master/Documentation/ilcRepro.md – MattWhilden Dec 04 '15 at 19:44

2 Answers2

0

You need to upgrade your Visual Studio 2015 to Update 1. This and many other errors/bugs have been fixed. After the update be sure to check the 'Compile with .NET Native tool chain' and the 'Optimize code' options in Release mode before building your package.

instanceof
  • 1,404
  • 23
  • 30
0

Had the same problem and found leftovers of half installed Store apps that needed to be removed with powershell.

Check this link how to remove them. http://www.digitalcitizen.life/how-remove-default-windows-10-apps-powershell-3-steps

There are simply leftovers from debug and other release versions from the same app which interfere with the build.

Also you can try to start your VS2015 as Administrator. Helped me few times as well. After starting as admin it was often fine to start as normal user again.

SunnySonic
  • 1,318
  • 11
  • 37