Select to view content in your preferred language

Issue Deploying Application

1087
2
Jump to solution
10-18-2012 03:39 PM
Labels (1)
JustinHunter
Regular Contributor
Hey all,

I'm not sure if this is the right place for this, as I'm not using the Runtime SDK for WPF, but the WPF SDK 2.4 that gives me about 5 libraries to do my work.  With that said, let me explain my problem.  We have an in-house built CMS system based on an extremely old programming language, and a colleague and myself have been tasked with upgrading our GIS system from 9.2 to 10.1. We have our server up and running, and now in order to provide the nice dynamic map we have to write it in .NET. Our CMS cannot communicate directly with .NET so we had to enable our class library for COM interop, and attach it that way. This is all fine and dandy, this isn't the first time we've done this to take advantage of .NET's ability to multithread and whatnot.

The project we made is a class library that has a WPF form in it that is the Esri map. The symbols we decide to use are PictureMarkerSymbol's. Our little test harness which is a console application that references this project can instantiate this form and display it no problem. However, when we call the class library from our CMS through COM, we get the following exception:
The tag 'VisualStateManager.VisualStateGroups' does not exist in the XML namespace 'clr-namespace:System.Windows;assembly=WPFToolkit'. Line '24' Position '5'.

This is only when it hits the line: PictureMarkerSymbol blueDotSymbol = (LayoutRoot.Resources["BlueDot"] as PictureMarkerSymbol);

It's odd- the second time we display the map we do not get the exception but none of our symbols work. The map works fine, we can scroll around it and zoom in and out, etc.

I believe this issue is our lack of understanding of how WPF works, since we primarily use winforms instead, but I do not believe we can use winforms to display the dynamic map. We have tried making the map form into a WPF control and embedding it on a winform but we get the same issue.

Hopefully someone can help. Without this functionality this will cancel our ability to upgrade to 10.1.

Thanks 🙂

We have the WPFToolkit installed
0 Kudos
1 Solution

Accepted Solutions
AnttiKajanus1
Deactivated User
Hi,

What version of .Net framework you are using with the application? One possible issue here is that, the reference between the WPFToolkits VisualStateManager (3.5 .Net framework) and 4.0 .NET frameworks VisualStateManager. When I last time used WPFToolkit in 4.0 project, I had to be sure that WPFTookit (and other assemblies it needed) were references in the main assembly. Actually I was not sure what exactly fixed the issue, but that move was my guess.

With fast googling I found this: http://forums.esri.com/Thread.asp?c=213&f=2456&t=286607 (check the last message atleast)

Hope it helps.

View solution in original post

0 Kudos
2 Replies
AnttiKajanus1
Deactivated User
Hi,

What version of .Net framework you are using with the application? One possible issue here is that, the reference between the WPFToolkits VisualStateManager (3.5 .Net framework) and 4.0 .NET frameworks VisualStateManager. When I last time used WPFToolkit in 4.0 project, I had to be sure that WPFTookit (and other assemblies it needed) were references in the main assembly. Actually I was not sure what exactly fixed the issue, but that move was my guess.

With fast googling I found this: http://forums.esri.com/Thread.asp?c=213&f=2456&t=286607 (check the last message atleast)

Hope it helps.
0 Kudos
JustinHunter
Regular Contributor
This is quite embarrassing... The department that set up my computer installed our CMS in two different directories with half of the application pointing to Program Files\ and the other half pointing to Program Files (x86)\ ... I put the WPFToolkit.dll in the wrong directory. 😐

Thanks for the help.
0 Kudos