Select to view content in your preferred language

Upgrading an addin to 10.8.1: BC30002: "Type '<typename>' is not defined" - error

1029
5
01-03-2022 04:38 AM
AxelThomas
Regular Contributor

Hi all,

I am upgrading a 10.2 addin to 10.8.1 (VB.NET, VS 2019) and receive several "BC30002: Type '<typename>' is not defined"- errors. They are mostly related to ESRI.ArcGIS.Desktop.AddIns, but also to Carto, Framework, ArcMapUI or Editor. All references are set with a valid path. I compared all settings to an structurally identical addin I had converted earlier that references the same libraries and runs fine but see no code or settings differences.

I m quite at a loss so any ideas are appreciated!

Axel

 

 

0 Kudos
5 Replies
ABishop
MVP Regular Contributor

Hello Axel,

I did a search for the error you were receiving and I got this thread: https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/error-messages/type-typename...

Hope this helps!

Amanda Bishop, GISP
0 Kudos
AxelThomas
Regular Contributor

Amanda,

thanks for your answer. Your link was also the first thing I found while looking for a possible cause but it did not help me much. All references have been added properly, the dlls exist in their defined directory and another addin with the same structure runs just fine. So I am a bit at a loss where to search next.

Axel

0 Kudos
AxelThomas
Regular Contributor

Amanda,

to be more specific: I have various BC30002 errors such as 'type "ESRI.ArcGIS.Desktop.Addins.Multiitem" is not defined'. However, I have referenced ESRI.ArcGIS.Desktop.Addins. The .NET framework is set to 4.5.2 and I see no outdated entries (from the conversion from 10.2) in the vbproj file.

Any other ideas what might have gone wrong?

Axel

0 Kudos
ABishop
MVP Regular Contributor

I found this thread which sounds similar to your issue even though it is for an earlier version upgrade.

https://community.esri.com/t5/arcobjects-sdk-questions/compiling-arcmap-10-add-in-build-failed/td-p/... 

Amanda Bishop, GISP
0 Kudos
AxelThomas
Regular Contributor

Hi Amanda,

thanks for this one. This is actually a problem I had immediately after upgrading to ArcGIS 10.8.1 from 10.2 (and VS2012 to VS2019). It was solved by changing the ESRI.ArcGIS.AddIns.11.targets reference in the project properties to ESRI.ArcGIS.AddIns.targets. Now other very similar addins run fine but one remains stubborn...

But to make sure, yes, "Register for COM interop" is not ticked and the ESRI.ArcGIS.Deskop.AddIns assembly reference Copy Local property set to false.

I really appreciate your help! Any other ideas?

Axel

 

0 Kudos