ExcelDnaBuild error DNA731704007

117 views
Skip to first unread message

Andrew DeBear

unread,
Aug 7, 2023, 5:15:26 PM8/7/23
to Excel-DNA
I was running into some weird compiler error having something to do with Visual Studio. So I backed up the pertinent files and created a brand new solution/project.

The working folder is up on the cloud. It compiles without a problem on one computer, but I get the following error(s) on another computer.

Any idea why that is? or how to fix it? Thanks!


Build started...
1>------ Build started: Project: AKHudfC, Configuration: Debug Any CPU ------
1>  ---
1>  ExcelDnaSetDebuggerOptions: EXCEL.EXE path for debugging: C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE
1>  ExcelDnaSetDebuggerOptions: Add-In for debugging: bin\Debug\AKHudfC-AddIn64.xll
1>  AKHudfC -> C:\Users\%username%\OneDrive\Ref_Software\MS Excel\Add-Ins\AKHudfC\bin\Debug\AKHudfC.dll
1>  ---
1>MSBUILD : ExcelDnaBuild error DNA731704007: File does not exist (Xll64FilePath): C:\Users\%username%\OneDrive\Ref_Software\MS Excel\Add-Ins\AKHudfC\packages\ExcelDna.AddIn.1.6.0\build\..\tools\\net452\ExcelDna64.xll
1>MSBUILD : ExcelDnaBuild error DNA731704007: System.InvalidOperationException: File does not exist (Xll64FilePath): C:\Users\%username%\OneDrive\Ref_Software\MS Excel\Add-Ins\AKHudfC\packages\ExcelDna.AddIn.1.6.0\build\..\tools\\net452\ExcelDna64.xll
1>MSBUILD : ExcelDnaBuild error DNA731704007:    at ExcelDna.AddIn.Tasks.CreateExcelAddIn.RunSanityChecks()
1>MSBUILD : ExcelDnaBuild error DNA731704007:    at ExcelDna.AddIn.Tasks.CreateExcelAddIn.Execute()
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 4:59 PM and took 00.944 seconds ==========

Andrew DeBear

unread,
Aug 7, 2023, 5:20:47 PM8/7/23
to Excel-DNA
...as noted, the "ExcelDna64.xll" file is not present in the filepath (there's only an "ExcelDna.xll", but why would that be causing an error for one computer and not another?

Govert van Drimmelen

unread,
Aug 7, 2023, 6:12:47 PM8/7/23
to exce...@googlegroups.com

Hi Andrew,

 

This looks like anti-virus software removing some files.

 

I suggest you try the latest pre-release Excel-DNA package (1.7.0-rc6).

 

-Govert

--
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/137cec62-b4b0-4490-9e84-4ca4fdb1301cn%40googlegroups.com.

Andrew DeBear

unread,
Aug 8, 2023, 9:45:47 AM8/8/23
to Excel-DNA
Thanks Govert. I installed Excel DNA 1.7 in Nuget. And it compiled without an error.

Though intellisense tool tips weren't working, but I'll take a closer look at that later.

And, just an FYI, the local antivirus software displayed these notifications while/after compiling.

error01.png

Andrew DeBear

unread,
Aug 8, 2023, 11:00:11 AM8/8/23
to Excel-DNA

This is the output text during debugging (below)...the UDFs in the add-in seemed to be working, except for the intellisense tooltips...they did not appear.

Any idea why it's throwing exceptions in ExcelDna.IntelliSense.dll?

10:48:43:443 Exception thrown: 'System.Runtime.InteropServices.COMException' in ExcelDna.IntelliSense.dll
10:48:43:443 Exception thrown: 'System.Runtime.InteropServices.COMException' in ExcelDna.IntelliSense.dll



[manually started debugger]
10:48:42:689 'EXCEL.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Symbols loaded.
10:48:42:689 'EXCEL.EXE' (CLR v4.0.30319: Domain 2): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Symbols loaded.
10:48:42:689 Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll): Loaded 'ExcelDna.ManagedHost'.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: Domain 3): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Symbols loaded.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: Domain 2): Unloaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll): Unloaded 'ExcelDna.ManagedHost'
10:48:42:954 Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'ExcelDna.ManagedHost'.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Symbols loaded.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'ExcelDna.Loader'.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'ExcelDna.Integration'. Symbols loaded.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'.
10:48:42:954 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'.
10:48:43:190 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'AKHudfC'. Symbols loaded.
10:48:43:190 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'ExcelDna.IntelliSense'. Symbols loaded.
10:48:43:190 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'ExcelDna.Registration'. Symbols loaded.
10:48:43:190 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'.
10:48:43:190 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\~\AKHudfC\bin\Debug\ExcelDna.IntelliSense.dll'. Symbols loaded.
10:48:43:190 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\~\AKHudfC\bin\Debug\ExcelDna.Registration.dll'. Symbols loaded.
10:48:43:443 Exception thrown: 'System.UnauthorizedAccessException' in mscorlib.dll
10:48:43:443 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\CustomMarshalers\v4.0_4.0.0.0__b03f5f7f11d50a3a\CustomMarshalers.dll'.
10:48:43:443 'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\~\AKHudfC\bin\Debug\AKHudfC-AddIn64.xll)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Symbols loaded.
10:48:43:443 Exception thrown: 'System.Runtime.InteropServices.COMException' in ExcelDna.IntelliSense.dll
10:48:43:443 Exception thrown: 'System.Runtime.InteropServices.COMException' in ExcelDna.IntelliSense.dll
[manually loaded test spreadsheet, then stopped debugger]
10:50:30:266 The program '[34548] EXCEL.EXE' has exited with code 4294967295 (0xffffffff).

Govert van Drimmelen

unread,
Aug 8, 2023, 12:09:50 PM8/8/23
to exce...@googlegroups.com

Did you update the versions of the ExcelDna.Registration and ExcelDna.IntelliSense package references to be the same as ExcelDNa.AddIn?

Are all of these now 1.7.0-rc6?

Andrew DeBear

unread,
Aug 8, 2023, 2:59:17 PM8/8/23
to Excel-DNA
Yes (I think). As soon as I selected to install Excel-DNA 1.7 in Nuget, everything else just automatically updated.

PACKAGES.png

Govert van Drimmelen

unread,
Aug 8, 2023, 4:14:35 PM8/8/23
to exce...@googlegroups.com

Hi Andrew,

 

To be clear, the IntelliSense worked for this project before?

And the add-in itself works, except for the IntelliSense?

And you are calling IntelliSenseServer.Install() from the AutoOpen.

 

Also, the Sophos anti-virus message you show should give you a problem, I’m not sure why it still works after that.

 

I’ve just made a test project with v 1.7.0-rc and the IntelliSense, and everything seems to work fine.

The repository is here, if you want to try: govert/TestIntelliRc6 (github.com)

Andrew DeBear

unread,
Aug 9, 2023, 11:49:50 AM8/9/23
to Excel-DNA
That's correct. Intellisense worked before. The server is being called by AutoOpen. I even put a break in AutoOpen to make sure the intellisenseserver was being hit & installed.

And the UDFs are functioning properly, just without the tool tips.

    public class Auto : IExcelAddIn
    {
        public void AutoOpen()
        {
            IntelliSenseServer.Install();
            ExcelRegistration
                .GetExcelFunctions()
                    .ProcessParamsRegistrations()
                .RegisterFunctions();
        }
        public void AutoClose()
        {
            IntelliSenseServer.Uninstall();
        }
    }

Govert van Drimmelen

unread,
Aug 9, 2023, 11:56:33 AM8/9/23
to exce...@googlegroups.com
You either need to call the IntelliSenseServer.Install() after doing the registration, or call IntelliSenseServer.Refresh() after.

-Govert

Andrew DeBear

unread,
Aug 9, 2023, 11:57:09 AM8/9/23
to Excel-DNA
I'll try downloading the repository and see how it goes on my end.

...I don't know if this is somehow related, but the other weird stuff started with this project a week or two ago, when I renamed a Visual Studio solution/project from UDFakhC to AKHudfC.

I updated and couldn't find any files / code containing the old name (UDFakhC). I had deleted the ".vs" folder a couple of times. And I tried deleting all of the files from all "bin" and "obj" folder(s).

The project working folder is saved in a OneDrive folder.

When I compile (either "Start" or "Build") the new project in Visual Studio on my PERSONAL computer, everything's "fine" (except intellisense). And the expected files are created in "AKHudfC\bin\debug".

When I "Build" the new project in Visual Studio on my WORK computer, everything's "fine" (except intellisense). And the expected files are created in "AKHudfC\bin\debug".

When I "Start" the "AKHudfC" project for debugging with Excel and Visual Studio on my WORK computer, it creates a "UDFakhC\UDFakhC\bin\debug" folder with a bunch of *.pdb folders for a few of the project references. And the only file (for the most part) in each of the folders was "symsrv.miss.txt" which just contains the link "https://referencesource.microsoft.com/symbols" (or something similar).

...I got fed up with it, so I backed up the cs files and started a new project from scratch in Visual Studio. Same thing is still happening.

Any ideas why it's still Windows/Excel/VS might be creating the bin folder with the old project name?

Andrew DeBear

unread,
Aug 9, 2023, 12:31:41 PM8/9/23
to Excel-DNA
Yup. I just rearranged the AutoOpen and intellisense is working, now.

forehead-slap.jpg

Reply all
Reply to author
Forward
0 new messages