--
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/3e481d10-d590-4e05-af76-d3c683f4d85an%40googlegroups.com.
--------------------------------------------------
Excel-DNA is now registered on GitHub Sponsors.
Your small monthly contribution will directly fund further development.
--------------------------------------------------
Hi Jorrit,
> my .net assembly is marked as Native_Library not Assembly
This might be a problem.
Make sure that you are not compiling your .NET assembly with a RuntimeIdentifier like x64.
I think that makes it compile it as a mixed assembly, instead of a manage .NET assembly.
You can look at the build output to see how what is packed:
1>Target ExcelDnaPack:
1> ExcelDnaPack: bin\Debug\net6.0-windows\TestUnpackNative-AddIn64.dna -> bin\Debug\net6.0-windows\publish\TestUnpackNative-AddIn64-packed.xll
1> PackExcelAddIn: Running PackExcelAddIn Task
1> PackExcelAddIn: Using base add-in bin\Debug\net6.0-windows\TestUnpackNative-AddIn64.xll
1> PackExcelAddIn: ~~> ExternalLibrary path TestUnpackNative.dll resolved to bin\Debug\net6.0-windows\TestUnpackNative.dll.
1> PackExcelAddIn: -> Updating resource: Type: ASSEMBLY_LZMA, Name: SQLITEPCLRAW.BATTERIES_V2, Source: Managed deps.json, Length: 2043
1> PackExcelAddIn: -> Updating resource: Type: ASSEMBLY_LZMA, Name: TESTUNPACKNATIVE, Length: 1662
1> PackExcelAddIn: -> Updating resource: Type: DNA, Name: __MAIN__, Length: 583
1> PackExcelAddIn: -> Updating resource: Type: ASSEMBLY_LZMA, Name: SQLITEPCLRAW.PROVIDER.E_SQLITE3, Source: Managed deps.json, Length: 11783
1> PackExcelAddIn: -> Updating resource: Type: ASSEMBLY_LZMA, Name: SQLITEPCLRAW.CORE, Source: Managed deps.json, Length: 16456
1> PackExcelAddIn: -> Updating resource: Type: NATIVE_LIBRARY_LZMA, Name: E_SQLITE3.DLL, Source: Native deps.json, Length: 739835
1> PackExcelAddIn: Completed Packing bin\Debug\net6.0-windows\publish\TestUnpackNative-AddIn64-packed.xll.
<ExcelDnaUnpack>true</ ExcelDnaUnpack> doesn’t build the list of all the dependencies that you need for the output in ‘publish’ to work, so you probably need some managed dependencies and the files from the “runtimes” directory, and possibly the .deps.json file too. Or you might get lucky just copying the right native libraries into the publish directory directly. But I don’t think it’s a scenario we’re trying to cater for automatically.
-Govert
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/670ce3a2-90c9-4c63-80b3-5ff8967fab48n%40googlegroups.com.
Hi Jorrit,
Can you confirm that the simplest .NET 6 add-in gives the same error?
This project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ExcelDna.AddIn" Version="1.7.0-rcfinal" />
</ItemGroup>
</Project>
This code:
namespace TestNet6
{
public static class Functions
{
public static object SayHello() => "Hello World!";
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/5649fdcd-5acc-49e2-84fd-1dc98fb8b4e3n%40googlegroups.com.
Hi Jorrit,
<TargetFramework>net472</TargetFramework>
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/1aeff7b5-1ad8-49e0-a0b2-2b1db2448cfbn%40googlegroups.com.
Hi Jorrit,
Are you running any security software that might block files from that temp directory from being loaded?
Anything else that is unusual about the environment?
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/e2d51647-8904-4e3b-b0aa-ca4b148f676en%40googlegroups.com.
OK great – what security software was blocking this?
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/0f0bfd18-a2c1-4a80-9643-f16299aaa902n%40googlegroups.com.