Excel-DNA / Excel-DNA/ExcelDna

AutoOpen InvalidOperationException while AutoUpdate

Open
#83 0 comments 0 reactions 0 assignees View on GitHub
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."

![image](https://cloud.githubusercontent.com/assets/14793205/16009521/16f0236c-314b-11e6-9405-208a93b2883c.png)

Can you please advise if I am missing anything ?

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.