What is the timeframe for supporting Visual Studio 2015? Will the support go back to previous versions of Infragistics WPF (eg. back to 14.1 or so)?
I'm having frustrating designer errors in VS 2015 that seem to be related to referencing InfragisticsWPF4.v14.1 in my projects. The error message in the XAML designer is very generic "An item with the same key has already been added.". One of several factors seems to contribute to the problem are the references to the assembly InfragisticsWPF4.v14.1.
I must have gotten confused when you explained your conversation with Microsoft earlier. I thought this issue was still being pointed towards Infragistics but it turns out it was a bug with the VS 2015 designer. Thanks for explaining it again (about the *.Design dlls). And thanks for providing all of this information. It should prove useful to other people who are interested in using Infragistics with VS 2015.
I don't think it was an Infragistics issue per se. It has more to do with the fact that IG uses *.Design.dll to assist the WPF designer. Since these references to IG were made within both my projects, the WPF designer tried to add the same ones twice and crashed.
One workaround was to rename your folder that contains the Design dll's so that VS can't find them.
It is possible that Microsoft had already fixed this . I heard back from them within a day that the problem would be fixed in RTM. Maybe I'll look for an updated RC, like yours. Mine is currently as follows:
Microsoft Visual Studio Enterprise 2015 RCVersion 14.0.22823.1 D14RELMicrosoft .NET FrameworkVersion 4.6.00057 Visual C# 2015 RC 00269-30000-00001-AA458Microsoft Visual C# 2015 RC
Hi David,
Honestly this is very weird. I opened your sample solution in the VS 2015 Community RC version and then opened the OrderManagementSelection.xaml file to see the designer and it actually loaded up your view just fine. I don't see any errors. And looking at the code I'm not really sure how Infragistics plays into this because while you reference the Assemblies in the project references, I don't see anything of Infragistics actually being used so I don't see how Infragistics stuff is being loaded at design time. Unless I'm missing something minor.
I did install VS 2015 just a few days ago so maybe I have a more recent version compared to yours? I attached a screenshot of my About window. I'm not sure how to explain why the designer works on my machine. I don't have anything exotic installed on it. A few weeks ago I was upgraded to Windows 8.1 with a new hard drive and all it came with was VS 2013 pre-installed so I should have the latest .NET 4/4.5 stuff.
Hi Rob.
I already sent this to Microsoft for you and they supposedly fixed it for RTM. I was working with someone named Jeff Kelly. The problem was with your WPF designer functionality in VS ("*.Design.dll"). The XAML designer tries to load them twice and the second time gets "same key has already been added".
I suspect your WPF guys know all about many of the gotchas. It would be awesome if they could create a blog that tells us how to make use of VS 2015 RC in conjunction with IG controls. In my experience there was tons of reconfiguration that I had to do right off the bat just to get up and running. The RC seems a bit buggy and sluggish. I'm not sure if it was just the RC's fault or if it had to do with using the RC in conjunction with your real-world IG/WPF controls. I went thru painful trial-and error to determine I needed to disable tons of stuff: Live Visual Tree, IntelliTrace, autocomplete on first character, much of the newer codelens stuff, etc.... As I said, the next person who tries to get up and running with IG on the VS 2015 RC might like to hear some tips and tricks from experts and early adopters on your side.
-----------
TO MICROSOFT (not from IG???)
Attached is a solution that demonstrates the problem.
There seem to be a couple factors involved.
Reference an assembly having designer functionality (Infragistics\2015.1\WPF\CLR4.0\Bin\Design\InfragisticsWPF4.v15.1.Design.dll) You will see in my case that PresentationDependencies and PresentationTesting both reference the same third-party assembly “InfragisticsWPF.v15.1”
Open Test.OrderManagementSelection.xaml in PresentationTesting. Notice that the designer will crash when I load resources from a URI ("/PresentationDependencies;component/MillSchedulerStyle.xaml") that can be found in the other project.
An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.VisualStudio.DesignTools.Designer.Assemblies.AssemblyService.CreateClassicShadowCopy(String assemblyPath, String projectPath, ReferenceAssemblyContext context) at Microsoft.VisualStudio.DesignTools.Designer.Assemblies.AssemblyService.ResolveShadowCopyAssembly(String assemblyPath, String projectPath, ReferenceAssemblyContext context) at Microsoft.VisualStudio.DesignTools.Designer.Assemblies.AssemblyService.ResolveAssembly(String assemblyPath, String assemblyFullName, String projectPath, ReferenceAssemblyContext context)
A couple things will make the error go away. I can either stop loading resources into one project from the other (as I do with my ResourceDictionary declaration).
Or I can remove the assembly references to the third-party assembly (“InfragisticsWPF.v15.1”) and that also makes the error go away.
Neither of these are workable solutions. I suspect the problem is in the XAML designer (MSFT side) since the Infragistics assemblies worked fine in VS 2013. Moreover, the callstack that generates the fatal exception contains only Microsoft methods. I don’t think the Infragistics code is running by the time the “ShadowCache” is being built.
Please let me know if I’m doing something non-standard. I only have a little over a year’s experience in WPF/XAML. I think it is only a designer problem since the code builds fine and runs fine.
I just installed VS 2015 RC on my machine and then installed the Infragistics 14.1 WPF product. When I opened up VS 2015, the Toolbox shows all the 14.1 controls and when I drag one of the controls, like the XamDataGrid, to the designer window it adds the control to the view without issue and I don't see any errors during the build process or while running the application. When I dragged the XamDataGrid from the toolbox and added it to the window it added the InfragisticsWPF4.v14.1 DLL. So from what I can tell it appears to be working.
Is there something specific that you are doing that I can test?