Excel-DNA / ExcelDna

Excel-DNA - Free and easy .NET for Excel. This repository contains the core Excel-DNA library.
https://excel-dna.net
zlib License
1.31k stars 277 forks source link

Updating to version 1.6.0 #552

Closed jimbrew closed 1 year ago

jimbrew commented 1 year ago

Hello I am trying to update the nuget package on a .net framework 4.8 excel add in.

The current version I am using is

I want to update these both to v1.6. However, I get the error messages -

20>  ExcelDnaPack: bin\x86\Debug\FloXL2020-AddIn.dna -> bin\x86\Debug\FloXL2020-AddIn-packed.xll
20>MSBUILD : PackExcelAddIn error DNA1899655818:   ~~> ERROR: Reference with Path: Microsoft.VisualStudio.Tools.Applications.Runtime.dll and Name:  NOT FOUND.
20>MSBUILD : PackExcelAddIn error DNA1899655818: System.InvalidOperationException:   ~~> ERROR: Reference with Path: Microsoft.VisualStudio.Tools.Applications.Runtime.dll and Name:  NOT FOUND.
20>MSBUILD : PackExcelAddIn error DNA1899655818:    at ExcelDna.PackedResources.ExcelDnaPack.PackDnaLibrary(Byte[] dnaContent, String dnaDirectory, ResourceUpdater ru, Boolean compress, Boolean multithreading, List`1 filesToPublish)
20>MSBUILD : PackExcelAddIn error DNA1899655818:    at ExcelDna.PackedResources.ExcelDnaPack.Pack(String dnaPath, String xllOutputPathParam, Boolean compress, Boolean multithreading, Boolean overwrite, String usageInfo, List`1 filesToPublish)
20>MSBUILD : PackExcelAddIn error DNA1899655818:    at ExcelDna.AddIn.Tasks.PackExcelAddIn.Execute()
acher1965 commented 1 year ago

My 0.02$: I got this yesterday, and I thought it was because yesterday WindowsDefender started flagging 1.6.0 as malware (wrongly etc etc), and the Remove action deleted the nuget 1.6.0 package. I worked around it by by following a colleague's suggestion: close VisualStudio, delete everything inside ./nuget/packages, then reopenVS: it took a little while to get all of the nugets again, but this time it did, then I cleaned solution and rebuilt, OK. So I can't be sure whether windows defender was responsible to begin with or not. And don't follow my steps... they might make the situation worse on your machine :-)

jimbrew commented 1 year ago

@acher1965 Thanks for your input. However, the issue is still persisting.

I am going to run the build on the build server (won't have any of the company antivirus etc) see if it creates the installers with no errors. Update - get the same errors on the build server too.

jimbrew commented 1 year ago

I removed the packages from the .dna file turns out they were not required.