Select to view content in your preferred language

Error: Control_TargetTypeMismatch

641
3
Jump to solution
01-30-2012 06:03 AM
ShaningYu
Honored Contributor
After updated one of the SL projects from API 2.0 to 2.4, received such an error

Error 91 [Control_TargetTypeMismatch]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60831.0&File=System.Windows.dll&Key=Contro... ......

The hyperlink provided does not work.  The Designer can't be loaded even though the solution is compiled.  The code related is below:
       <esri:Map x:Name="map" MouseClick="map_MouseClick" Extent="{StaticResource ExtentLower48}"
            ExtentChanged="map_ExtentChanged" SizeChanged="map_SizeChanged">
         <esri:ArcGISTiledMapServiceLayer ID="BaseLayer" Url="{StaticResource StreetsLayerUrl}" />
       <esri:ArcGISDynamicMapServiceLayer ID="ArraLayer" Initialized="ArraLayer_Initialized"
          Url="{StaticResource ArraLayerUrl}"/>
         <esri:GraphicsLayer ID="MapGraphicsLayer" />
        </esri:Map>
       
What measure should I make to solve this problem?  Thanks.
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
I wish ESRI support team can answer my Q. Thanks.


Please note that this is not an ESRI support page.
This is just a forum where users and sometimes ESRI staff help out. If you have any specific need, you are very welcome to contact the ESRI Support Hotline.

That being said, your issue is very likely coming from dll versions mismatch.

Try this:
  - In your project, remove the references to any ESRI dll
  - Clear your solution
  - Exit Visual Studio
  - Remove bin, obj and ClientBin directories
  - Open again Visual Studio
  - Add your ESRI references
  - Double check that the versions of the referenced dlls are right
  - Try again to compile

Not sure all steps are useful, but in the doubt....

View solution in original post

0 Kudos
3 Replies
ShaningYu
Honored Contributor
I loaded another SL project (termed Proj B)  that was compiled on my personal laptop.  This project was re-compiled well on my company's CPU.  However the SL project (termed Proj A) gets the problem as shown above.  I compared both References and codes, and found no difference actually. 

Something is strange.  Even though the Designers can be drawn on VS, the project compiled "successfully".  If I run debug, all of the pages display correctly.

I wish ESRI support team can answer my Q.  Thanks.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I wish ESRI support team can answer my Q. Thanks.


Please note that this is not an ESRI support page.
This is just a forum where users and sometimes ESRI staff help out. If you have any specific need, you are very welcome to contact the ESRI Support Hotline.

That being said, your issue is very likely coming from dll versions mismatch.

Try this:
  - In your project, remove the references to any ESRI dll
  - Clear your solution
  - Exit Visual Studio
  - Remove bin, obj and ClientBin directories
  - Open again Visual Studio
  - Add your ESRI references
  - Double check that the versions of the referenced dlls are right
  - Try again to compile

Not sure all steps are useful, but in the doubt....
0 Kudos
ShaningYu
Honored Contributor
Using the procedure you provided, the errors were gone.  Thanks a lot.
0 Kudos