F# complie xll failed.
See original GitHub issueI used Rider to create a .Net Framework Class Library, and tried to compile the xll file but failed. Here is the log file: ` 生成启动时间为 2020/11/15 12:32:33。 日志记录详细程度设置为: Normal。 1>项目“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\UDFs.fsproj”在节点 1 上(build 个目标)。 1>GenerateTargetFrameworkMonikerAttribute: 正在跳过目标“GenerateTargetFrameworkMonikerAttribute”,因为所有输出文件相对于输入文件而言都是最新的。 CoreCompile: C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\FSharp.Compiler.Tools.10.0.2\build..\tools\fsc.exe -o:obj\Debug\UDFs.dll -g –debug:portable –noframework –define:DEBUG –define:TRACE –optimize- –tailcalls- -r:C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.Integration.1.1.0\lib\ExcelDna.Integration.dll -r:C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll -r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\mscorlib.dll -r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll -r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.dll -r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Numerics.dll –target:library –warn:3 –warnaserror:76 –fullpaths –flaterrors –subsystemversion:6.00 –highentropyva+ –warnon:1182 AssemblyInfo.fs Library.fs obj\Debug.NETFramework,Version=v4.5.AssemblyAttributes.fs
1>C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\Library.fs(7,9): warning FS1182: The value 'add' is unused
_CopyFilesMarkedCopyLocal:
正在对“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\obj\Debug\UDFs.fsproj.CopyComplete”执行 Touch 任务。
CopyFilesToOutputDirectory:
正在将文件从“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\obj\Debug\UDFs.dll”复制到“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\bin\Debug\UDFs.dll”。
UDFs -> C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\bin\Debug\UDFs.dll
正在将文件从“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\obj\Debug\UDFs.pdb”复制到“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\bin\Debug\UDFs.pdb”。
ExcelDnaBuild:
---
ExcelDnaBuild: Running CreateExcelAddIn MSBuild Task
ExcelDnaBuild: ----Arguments----
ExcelDnaBuild: FilesInProject: 3
ExcelDnaBuild: ExcelDna-Template.dna
ExcelDnaBuild: packages.config
ExcelDnaBuild: Properties\ExcelDna.Build.props
ExcelDnaBuild: OutDirectory: bin\Debug\
ExcelDnaBuild: Xll32FilePath: C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.AddIn.1.1.1\build\..\tools\ExcelDna.xll
ExcelDnaBuild: Xll64FilePath: C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.AddIn.1.1.1\build\..\tools\ExcelDna64.xll
ExcelDnaBuild: Create32BitAddIn: True
ExcelDnaBuild: Create64BitAddIn: True
ExcelDnaBuild: FileSuffix32Bit:
ExcelDnaBuild: FileSuffix64Bit: 64
ExcelDnaBuild: -----------------
ExcelDnaBuild: Number of files in project: 3
ExcelDnaBuild: ExcelDna-Template.dna -> bin\Debug\ExcelDna-Template.dna
ExcelDnaBuild: packages\ExcelDna.AddIn.1.1.1\build\..\tools\ExcelDna.xll -> bin\Debug\ExcelDna-Template.xll
ExcelDnaBuild: ---
ExcelDnaBuild: ExcelDna-Template.dna -> bin\Debug\ExcelDna-Template64.dna
ExcelDnaBuild: packages\ExcelDna.AddIn.1.1.1\build\..\tools\ExcelDna64.xll -> bin\Debug\ExcelDna-Template64.xll
---
ExcelDnaPack:
ExcelDnaPack: bin\Debug\ExcelDna-Template.dna -> bin\Debug\ExcelDna-Template-packed.xll
"C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.AddIn.1.1.1\build\..\tools\ExcelDnaPack.exe" "bin\Debug\ExcelDna-Template.dna" /Y /O "bin\Debug\ExcelDna-Template-packed.xll"
Using base add-in bin\Debug\ExcelDna-Template.xll
!!! ExternalLibrary `%OutputFileName%` not found. Aborting.
1>C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.AddIn.1.1.1\build\ExcelDna.AddIn.targets(196,5): error MSB3073: 命令“"C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.AddIn.1.1.1\build\..\tools\ExcelDnaPack.exe" "bin\Debug\ExcelDna-Template.dna" /Y /O "bin\Debug\ExcelDna-Template-packed.xll"”已退出,代码为 1。
1>已完成生成项目“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\UDFs.fsproj”(build 个目标)的操作 - 失败。
生成失败。
“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\UDFs.fsproj”(build 目标) (1) ->
(CoreCompile 目标) ->
C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\Library.fs(7,9): warning FS1182: The value 'add' is unused
“C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\UDFs.fsproj”(build 目标) (1) ->
(ExcelDnaPack 目标) ->
C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.AddIn.1.1.1\build\ExcelDna.AddIn.targets(196,5): error MSB3073: 命令“"C:\Users\Victor\Documents\scripts\fsharp\ExcelAddIn\UDFs\packages\ExcelDna.AddIn.1.1.1\build\..\tools\ExcelDnaPack.exe" "bin\Debug\ExcelDna-Template.dna" /Y /O "bin\Debug\ExcelDna-Template-packed.xll"”已退出,代码为 1。
1 个警告
1 个错误
已用时间 00:00:04.10
`
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
It looks like the
<DnaLibrary Name="%...." />
should also be fixed.Then the function must be static for it to be recognized by Excel-DNA. Top-level code in a module would also work.
Try this as your F# source file:
I don’t know Rider or Chinese, so it’s really hard for me to support. One problem is that Rider does not install the NuGet package correctly. You can try to fix this by: