Excel-DNA / Excel-DNA/ExcelDna
AutoOpen InvalidOperationException while AutoUpdate
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 292
- Avg merge
- 20d 12h
- Merged PRs (30d)
- 1
Description
Hi Govert,
I am trying to check for updates to the Add-In from a network share where the master xll(latest updated xll file) file sits with a separate version xml file, which I use to compare the master version with user version.
I check for updates in AutoOpen() so only newly opened Excel instances will get the update.
When there is an update available I re-name the currently installed/used xll file, and copy over the new xll file, then call the Register function (which I read from your previous posts that it both un-registers and re-registers) -->
ExcelAsyncUtil.QueueAsMacro(() =>
{
ExcelIntegration.RegisterXLL(LOCAL_INSTALLATION_XLL_PATH);
});
This all works great, but when I open Excel, I always see this error message:
"Initialization [Error] Integration.DnaLibraryAutoOpen Error : InvalidOperationException - Collection was modified; enumeration operation may not execute."

Can you please advise if I am missing anything ?
Thank you.
Contributor guide
Assessment
This issue has not been assessed yet.