Hi Michael,
I’ve had this error occur in the following scenarios:
Hi Mickey,
Since .NET Framework 4.0, the COM interop assembly parts that are used by your code are embedded inside the assembly during compilation.
This means we don’t have the same problems with different versions of the COM interop assemblies as before, and the NetOffice style wrapper is no longer needed.
You can add the “ExcelDna.Interop” package to your project to get the interop assemblies matching Excel 2013, and as long as the COM object model features that you use are available on the running Excel version (older or newer) it will work fine.
One important rule to keep in mind when doing COM interop from your Excel-DNA add-in is to only talk to the COM object model from the main thread. Work that runs on a Task thread, a Timer callback or similar external event (network data received) should not use the COM object model directly to update Excel. You can, however, schedule work to run on the main thread in a context where COM usage is safe by calling ExcelAsyncUtil.QueueAsMacro.
-Govert
Has anyone seen this before either?
On Wednesday, April 5, 2023 at 11:26:38 AM UTC-6 Michael Goldsworth wrote:
Hi Alexander,
I will check these out, thank you very much for responding.
On #3 though, I don't seem to find that option anywhere. It seems Microsoft may have removed this for package references for newer versions of Visual Studio (I'm running 2022 17.1.6). I'm wondering if you're running Visual Studio 2019 and if I should consider switching to that to get this working.
However, if you are using 2022, then I'm really wondering what I'm missing. I see several other people across many different posts having the same or related issues and in which they also don't have that option to set Copy Local to True.
I will double check AV (I only use the default Microsoft Security, no installed AV) but suspect it's the 3rd option I need, and don't know how to resolve that since the option just isn't there.
Thanks,
Mickey
On Wednesday, April 5, 2023 at 5:45:30 AM UTC-6 Alexander Rickman wrote:
Hi Michael,
I’ve had this error occur in the following scenarios:
- Projects stored on OneDrive: I resolved this by copying the entire project to the disk and building there.
- Security software blocking a DLL: Sometimes third-party antivirus software blocks certain DLLs. The only way to fix that it to report it as a false positive to the offending third-party and hope they remove it from their blocked list.
- If a required package reference is not set to Copy Local == True: This property can be found by clicking on a reference in the Solution Explorer (see images below) and changing it there.
--
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/1f955765-eb67-4d75-983b-c193afb3cdcan%40googlegroups.com.
Can you paste the exact error from your build?
I think building an Excel-DNA add-in requires at least .NET 4.7.2 installed.
What version of Visual Studio and .NET are you using to build the project?
-Govert
From: exce...@googlegroups.com <exce...@googlegroups.com> On Behalf Of femKing
Sent: Friday, December 15, 2023 11:40 AM
To: Excel-DNA <exce...@googlegroups.com>
Has anyone seen this before either?
On Wednesday, April 5, 2023 at 11:26:38 AM UTC-6 Michael Goldsworth wrote:
Hi Alexander,
I will check these out, thank you very much for responding.
On #3 though, I don't seem to find that option anywhere. It seems Microsoft may have removed this for package references for newer versions of Visual Studio (I'm running 2022 17.1.6). I'm wondering if you're running Visual Studio 2019 and if I should consider switching to that to get this working.
However, if you are using 2022, then I'm really wondering what I'm missing. I see several other people across many different posts having the same or related issues and in which they also don't have that option to set Copy Local to True.
I will double check AV (I only use the default Microsoft Security, no installed AV) but suspect it's the 3rd option I need, and don't know how to resolve that since the option just isn't there.
Thanks,
Mickey
On Wednesday, April 5, 2023 at 5:45:30 AM UTC-6 Alexander Rickman wrote:
Hi Michael,
I’ve had this error occur in the following scenarios:
- Projects stored on OneDrive: I resolved this by copying the entire project to the disk and building there.
- Security software blocking a DLL: Sometimes third-party antivirus software blocks certain DLLs. The only way to fix that it to report it as a false positive to the offending third-party and hope they remove it from their blocked list.
- If a required package reference is not set to Copy Local == True: This property can be found by clicking on a reference in the Solution Explorer (see images below) and changing it there.
--
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/0eca8781-486f-4a3b-bbd8-a12ab74b5e51n%40googlegroups.com.