Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've migrated my add-in project from VS 2008 to VS 2010 recently, and am now receiving the following error:

Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.Carto.IFeatureLayer..... ... No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

I've aready gone through and removed/refreshed the references to my testing framework (I had to move Rhino Mocks when I upgraded). I am curious, has anyone seen this, and which obscure setting have I not captured and repaired -- I've already gone through the x64/x86 switches?

share|improve this question
add comment

1 Answer

So here is how I successfully solved the issue -- although I did go through every one of the settings for the x86 again --

I removed EVERY reference to the ArcObject interfaces and re-added them to the project.

I also, removed and re-added my Unit Test project. In doing this, I was able to catch one of the x86 references that I could have missed the first time through. When I moved to VS2010 I missed the settings in the configurations window the first time through. So here is the quick list of places I needed to change to x86:

Add-In Project settings Debug/Release Configuration Manager Unit Testing Project Settings Debug/Release Configuration Manager.

I hope this helps anyone else who still has to make the migration (prior to the 10.1 bump)

share|improve this answer
    
is this the express edition? Is the full version VS 2010 supported? –  Jakub Sep 17 '11 at 14:17
    
I'm using the professional version. As I understand it all versions of VS 2010 are supported, given that you continue to target DOTNET Framework 3.5 –  Luke Sep 28 '11 at 13:17
    
Not sure about that. The ArcGIS installer requires VS2008 to be installed. Both VS2008 and 2010 are fine but the SDK will not install with only VS 2010 installed on the machine. Mind you i do not have the full version only Express. I wanted to do the same and upgrade all my add-ind on my new machine just a few weeks ago and it would not install unless I put on VS 2008 express. –  Jakub Sep 28 '11 at 17:48
    
I'm fairly certain. The desktop support team didn't install VS2008 at all on this new machine, and 2010 was installed prior to my install of ArcGIS and all of the sundry SDK's (I'm using the java one as well). Now if you don't have ArcGIS installed at all on your dev machine, I could see that being a problem. –  Luke Oct 7 '11 at 15:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.