Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been compiling and debugging my Add-In (a toolbar with a few menus, custom commands, custom selection tool and a context shortcut menu) with no issues until suddenly the edits and changes I do in Visual Studio are reflected in the Add-In. There are no errors and compile success. I first noticed this when I was wanting to debug but application was ignoring new edits and additions. The Add-In is still there but some commands don't seem to not respond to current changes.

What am I doing wrong?

share|improve this question
    
I have the same problem..... I find the folder C:\Documents and Settings\<username>\My Documents\ArcGIS\AddIns\Desktop10.0 but but the C:\Documents and Settings\<username>\Local Settings\Application Data\ESRI\Desktop10.0\AssemblyCache\ does not exist. I am using Eclispe, Java and Windows Xp SP2 – user3032 May 19 '11 at 20:14
up vote 8 down vote accepted

I had a similar issue to this and resolved it by deleting the corresponding cache directory for my add-in:

C:\Documents and Settings\<username>\Local Settings\Application Data\ESRI\Desktop10.0\AssemblyCache\

10.1 on Windows7:
%LOCALAPPDATA%\ESRI\Desktop10.1\AssemblyCache will take you to:
C:\Users\<UserName>\AppData\Local\ESRI\Desktop10.1\AssemblyCache

I also have in my notes to check this directory, but I don't recall if that was for while I was debugging in Visual Studio or just normal troubleshooting. :
c:\Documents and Settings\<username>\My Documents\ArcGIS\AddIns\Desktop10.0
If the AddIn that you are debugging exists here, try deleting it here.


Update

I knocked one of my add-ins and debugged. It does create a directory in My Documents\ArcGIS\AddIns\Desktop10.0 for debugging, which is unpacked to the AssemblyCache directory.

share|improve this answer
1  
Awesome!! Thanks Jay. One little tidbid i'd like to add is that it is not enough to show hidden files "Hide protected operating system files" must also be turned off. – Jakub Nov 17 '10 at 17:29
    
    
Seems that this is a remedy for all problems... Seems to also fix if breakpoints stop working "Breakpoint will not currently be hit. No symbols loaded for this document." – Jakub Nov 17 '10 at 19:12
    
I'll add that on Windoze7 you can find the AssemblyCache dir at C:\Users\<username>\AppData\Local\ESRI\Desktop10.0\AssemblyCache, so long as you are viewing hidden and system files/folders. – Chad Cooper Apr 27 '11 at 18:07

For ArcGIS 10.2 and 10.3 the Assembly Cache is in a different place i.e. C:\Users\YOUR USER NAME\AppData\Local\ESRI\Desktop10.3\AssemblyCache

I have not been able to pin down why ArcMap gets versions confused. I have seen the ArcMap Add-In Manager show that the new version is available while the actuale version that runs is the old version. You can get your code to display the version using a button that returns (in VB.Net) Public g_strVersion As String = My.ThisAddIn.Version

Occasionally Visual Studio (2012 Express for Desktop) does not update the AddIn files when a build is done. I delete the old ones and redo the build.

share|improve this answer
    
C:\Users\<user name>\AppData\Local is the Windows 7 equivalent of the Windows XP path C:\Documents and Settings\<user name>\Local Settings\Application Data. It's nothing to do with ArcGIS version. – jon_two Mar 3 at 8:42
    
Ok my bad. We had a simultaneous upgrade from XP to Windows 7 and ArcGIS 10.1 to ArcGIS 10.2 – TazAstroSpacial Mar 18 at 0:30

For the record, I've spent the last few months trying to debug ArcGIS addin versions and the situation seems to be this:

When you manually install an addin (by double clicking on it), it is copied to %My Documents%\ArcGIS\Addins\Desktop%BUILD NUMBER%, where %BUILD NUMBER% is the ArcGIS version you used to compile the addin. Addins are forward-compatible, so you need to compile on the oldest version you support (for us, this is still 10.0. I know, you tell our clients to upgrade!). When you build your Visual Studio project, this file is updated.

Every time you start ArcMap (or ArcCatalog if your addin works there too), this addin is unzipped to the C:\Users\%USERNAME%\AppData\Local\ESRI\Desktop10.3\AssemblyCache folder and should overwrite the files there with the new version. Sometimes Windows can't do this for various reasons (permissions, file is open elsewhere, etc.) and the addin doesn't update.

The situation is complicated when you attempt a network install of your addin. You can set a registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ESRI\Desktop10.3\Settings\AddInFolders), which tells ArcGIS of a network location for an addin. If this key is available and the network location contains a .esriaddin file, this file is unzipped to the AssemblyCache folder instead of the file in Documents\ArcGIS\Addins.

Because the addin is unzipped into the AssemblyCache folder every single time you start ArcMap, you are never quite sure if the right version of your addin is installed. We ended up adding lots of code to check these locations and compared the addins there to the installed version, then warned the user if there was a mismatch. Apparently it's all fixed at 10.4 though. We'll see...

share|improve this answer
    
Sorry, I tried to add links to ArcGIS help, but it's not responding at the moment. Just search for 'addinfolders' when it's back up. – jon_two Mar 3 at 9:04

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.