Select to view content in your preferred language

Method not found: ' ... ESRI.ArcGIS.Client.FeatureLayer.get_LayerInfo()'

2192
3
08-09-2010 11:05 AM
DavidLowther
Deactivated User
Hello All,

Thanks in advance for your assistance with what is inevitably a user/installation issue.

I have a Silverlight 4 application that uses the ESRI.ArcGIS assemblies. It runs as intended in my development environment, but not in my colleague's, and not on the development server. I have a feeling it could be because the codebase on my machine is using a different version of the assemblies, but I have done everything I can think of to ensure they are the same. The reason I suspect version difference is because the error message I get on the dev server is:

Method not found: 'ESRI.ArcGIS.Client.FeatureLayerInfo ESRI.ArcGIS.Client.FeatureLayer.get_LayerInfo()'.

To me, it seems like Visual Studio would never allow compilation if this method were missing and in fact shows no error on the only line referencing FeatureLayerInfo:

For Each fName As String In (From f In CType(l, FeatureLayer).LayerInfo.Fields Select f.Name).ToList()
   lOutFields.Add(fName)
Next

Object Browser says that the FeatureLayerInfo resides in the ESRI.ArcGIS.Client assembly which, as referenced in my project (and on my colleague's project, AND the dev server), is 2.0.0.290.

It feels like a wild goose chase. Any ideas what I am overlooking here?

Thanks,
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
I believe Method not found exception occurs when the assemblies included are not the same assemblies the project was built in. Why it worked on your machine and not on your colleague's or server, probably means you had the correct path for the assemblies and built the solution with them, but they didn't have access to these assemblies or was not able to rebuild the solution with them. For the machines that threw this exception, have you tried to Clean the solution, check that the referenced assemblies are the correct ones and then rebuild solution again? Are there any file access issue to these assemblies? If you go to the file properties of the DLL's, do you see "Unblock" button? Are all referenced assemblies the same in comparison to your machine and theirs? 

Jennifer
0 Kudos
DavidLowther
Deactivated User
Jennifer,

Thanks for the reply. I think you are exactly right, that there must be some version issue. The odd thing is that the solutions build with no trouble on my colleague's machine (clean, rebuild, clean, delete debug/obj folders, rebuild, etc...)! I have checked into a supposed issue with the HintPath setting VS2010/Silverlight in the vbproj file and added HintPath settings to my references - but I still believe that things are not lining up.

Does anyone at ESRI know at what version(s) of the API the LayerInfo was added or modified?

Thanks,
Dave
0 Kudos
JenniferNery
Esri Regular Contributor
LayerInfo was added in SL/WPF API v2.0

Jennifer
0 Kudos