LogDisplay appears even though configured to be off

52 views
Skip to first unread message

bpie...@gmail.com

unread,
Oct 11, 2023, 1:22:06 PM10/11/23
to Excel-DNA
Hi Govert,

I hope all is well. I have the log display disabled as described here: https://excel-dna.net/docs/archive/wiki/Diagnostic-Logging

...but for one user, it still comes up with info about an access violation when closing workbooks (see image). Anecdotally, the user does have other workbooks open so Excel is not exiting. I've seen some older discussions where some users saw this when trying to get the "caller" after a workbook was closed but others were open...

I have 2 basic questions:
  (1) Why is this dialog showing when logging is disabled? Can I do something to strongly prevent that message box from ever being displayed to the user?
  (2) Is the HandleProcessCorruptedStateExceptions still relevant?

I'm using version 1.6.1-beta3, and the user in question has a new-ish version of x64 Excel 2016 (build 16827) on Windows 11 (NT 10.0.22621).

Thanks for any insights you may have.

BrianAccessViolation.png

Govert van Drimmelen

unread,
Oct 11, 2023, 1:26:05 PM10/11/23
to exce...@googlegroups.com

Hi Brian

 

What version of .NET is your add-in targeting?

I don’t think the diagnostics configuration works with .NET 6, so you’d be stuck with the defaults in that case.

 

I suggest you try the latest pre-release version 1.7.0-RC7 of Excel-DNA.

We tried to clean up the API call which causes this problem during shutdown, and I’d be curious to know if you still experience this message with the current version.

 

-Govert

Brian

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/766a3256-0afb-42a4-82df-fc43c718a0b5n%40googlegroups.com.

image001.png

bpier...@gmail.com

unread,
Oct 11, 2023, 2:06:18 PM10/11/23
to Excel-DNA
Hi Govert,

Thanks for the quick response. I'm targeting .NET 4.7.2.

I'll try with 1.7.0-RC7 and let you know if it still occurs with that.

Brian

Govert van Drimmelen

unread,
Oct 11, 2023, 2:17:12 PM10/11/23
to exce...@googlegroups.com

> I'm targeting .NET 4.7.2.

In that case I do expect the configuration to work.

Can you confirm that the .config file has the right name matching the .xll file “MyProject-AddIn.xll.config” or “<MyProject-AddIn64.xll.config”, is located nect to the .xll file, and what the contents of your .config file is?

bpier...@gmail.com

unread,
Oct 11, 2023, 2:39:24 PM10/11/23
to Excel-DNA
Ah - I only have <MyProject>.AddIn.xll.config but not not <MyProject.AddIn64.xll.config ...and the user has x64 Excel. Should I include that file twice, the 2nd time with the same contents but the 64 in the name?

Here is the content:

<configuration>
 <system.diagnostics>
    <sources>
      <source name="ExcelDna.Integration" switchValue="Off">
      </source>
    </sources>
  </system.diagnostics>
</configuration>

I do pack everything and then rename the packed xll. Not sure if that would matter (?).

Thanks again,

Brian

Govert van Drimmelen

unread,
Oct 11, 2023, 2:50:45 PM10/11/23
to exce...@googlegroups.com

Put the file in your project as “App.config” and set the Build Action to the right setting (I think “None”) and Copy to Output “false”.

Then the build should make .config files in your output matching the different .xll files in the output.

Then the packing will pack the .config file (you can see this clearly in the build output from the packing step).

 

At runtime, a loose file with correct name next to the .xll file can be used to override the packed .config file.

bpier...@gmail.com

unread,
Oct 11, 2023, 3:18:50 PM10/11/23
to Excel-DNA
Ha -- ok, I think that was the issue. I already had an app.config containing assembly bindings ...in addition to a file explicitly named <MyProject>.AddIn.xll.config ...and in the build directory, it was just the contents of the app.config that remained. I have now properly added the system.diagnostics section to the existing app.config. Will let you know if any continued issues.

Thanks again as always.

Btw, any particular risk with 1.7-rc7? That seems like a lot of release candidates haha, but not sure if there's much that would introduce risk for users targeting .NET 4.7.2 (?).

Brian

Govert van Drimmelen

unread,
Oct 11, 2023, 3:32:31 PM10/11/23
to exce...@googlegroups.com

Hi Brian,

 

> That seems like a lot of release candidates haha

I have become incapable of writing the release notes needed to make a ‘real’ release, so all versions are pre-release for now.

1.7.0-rc7 is the best Excel-DNA version, and 4.7.2 is the best .NET version.

I might give up and just make it a final release real soon.

bpie...@gmail.com

unread,
Oct 11, 2023, 4:24:31 PM10/11/23
to Excel-DNA
Perfect -- I'm going to try upgrading now.

I can completely empathize on the release notes!

Reply all
Reply to author
Forward
0 new messages