Select to view content in your preferred language

Creating envelope in API 3.0, Silverlight 5

805
7
Jump to solution
06-11-2012 03:12 PM
TanyaOwens
Frequent Contributor
I am converting a project I had in API 2.4 Silverlight 4 into 3.0 and SL 5, when creating an envelope I get the error "The type or namespace name 'Envelope' could not be found (are you missing a using directive or an assembly reference?)" I check my using directives and references and everything matches my original project. Any suggestions?
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
using references of ESRI.ArcGIS.Client, Client.Symbols, Client.Tasks, and Client.ValueConverters. Any suggestions?


Envelope is in the namespace ESRI.ArcGIS.Client.Geometry so you need this using reference as well (not a 3.0 change though).

View solution in original post

0 Kudos
7 Replies
DominiqueBroux
Esri Frequent Contributor
I am converting a project I had in API 2.4 Silverlight 4 into 3.0 and SL 5, when creating an envelope I get the error "The type or namespace name 'Envelope' could not be found

That smeels a dll version mismatch.

Double check that in your project all referenced ArcGIS dlls are ArcGIS SL 3.0.
Clean your project.
Exit Visual studio.
Remove bin, obj and clientbin directories.
Reopen Visual Studio
Try again.

That should work.
0 Kudos
TanyaOwens
Frequent Contributor
That smeels a dll version mismatch.

Double check that in your project all referenced ArcGIS dlls are ArcGIS SL 3.0.
Clean your project.
Exit Visual studio.
Remove bin, obj and clientbin directories.
Reopen Visual Studio
Try again.

That should work.


I checked my referenced ArcGIS dlls and all say 3.0 in for the version. I followed the rest of the steps you suggested and it still doesn't recognize "envelope". I  have the ESRI references: ESRI.ArcGIS.Client, Behaviors, Toolkit and Toolkit.DataSources and using references of ESRI.ArcGIS.Client, Client.Symbols, Client.Tasks, and Client.ValueConverters. I also started a new project with only the ESRI.ArcGIS.Client reference and using directory and it also didn't recognize "envelope".  Any suggestions?
0 Kudos
DominiqueBroux
Esri Frequent Contributor
using references of ESRI.ArcGIS.Client, Client.Symbols, Client.Tasks, and Client.ValueConverters. Any suggestions?


Envelope is in the namespace ESRI.ArcGIS.Client.Geometry so you need this using reference as well (not a 3.0 change though).
0 Kudos
TanyaOwens
Frequent Contributor
oops!!! I totally missed that one when transferring it over. It works now. Thanks!!
0 Kudos
JoeHershman
MVP Alum
If you have that error, you can place your Cursor over the class name that is in red that throws the error.  Edit > Intellisense > Resolve and it will show you what using statement is missing and add it for you.
Thanks,
-Joe
0 Kudos
TanyaOwens
Frequent Contributor
If you have that error, you can place your Cursor over the class name that is in red that throws the error.  Edit > Intellisense > Resolve and it will show you what using statement is missing and add it for you.


Thanks!! That tip is going to help.
0 Kudos
JoeHershman
MVP Alum
Your welcome, and feel free to give points for any helpful post by clicking the up arrow 🙂
Thanks,
-Joe
0 Kudos