Skip to content

Implemented initial minimal support for native Excel add-ins #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
be083e1
Created ExcelDna.Host.Shared project and moved common files from Exce…
Sergey-Vlasov Jan 19, 2025
ccda90d
Created ExcelDna.Host.NativeAOT project.
Sergey-Vlasov Jan 19, 2025
187244d
Added ExcelDna.SourceGenerator.NativeAOT project.
Sergey-Vlasov Jan 19, 2025
b576515
Added MethodsForRegistration and InitializeNativeAOT.
Sergey-Vlasov Jan 25, 2025
f53775e
Disabled AssemblyDependencyResolver when NativeAOT is active.
Sergey-Vlasov Jan 25, 2025
6e0667c
Added function marshaling for NativeAOT.
Sergey-Vlasov Jan 25, 2025
6366eff
Disabled unnecessary logging errors for NativeAOT.
Sergey-Vlasov Jan 25, 2025
2f66ddf
Added ExcelDna.AddIn.RuntimeTestsAOT project and tests.
Sergey-Vlasov Jan 26, 2025
f40ee2d
Fixed ManagedHost dependency on Integration.
Sergey-Vlasov Jan 26, 2025
935505b
Added NativeAOT build task.
Sergey-Vlasov Feb 1, 2025
c89ff50
Added AOTMinimal TestTarget project.
Sergey-Vlasov Feb 1, 2025
66724a6
Added building ExcelDna.AddIn.NativeAOT package.
Sergey-Vlasov Feb 1, 2025
0495665
Disabled release AddIn.RuntimeTests builds.
Sergey-Vlasov Feb 1, 2025
724fbfa
Disabled runtime tests in Debug|Win32 configuration.
Sergey-Vlasov Feb 15, 2025
b51cada
Disabled runtime tests in Release|Win32 configuration.
Sergey-Vlasov Feb 15, 2025
351aaaa
Added support for Release configuration to runtime tests.
Sergey-Vlasov Feb 15, 2025
6e27a65
Merge pull request #749 from Excel-DNA/ExcelDna-NativeAOTMain-2
Sergey-Vlasov Feb 15, 2025
2c907cf
Created AOTAddIn test target project.
Sergey-Vlasov Feb 16, 2025
5cc54ec
Implemented loading of IExcelAddIn(s).
Sergey-Vlasov Feb 16, 2025
8990b3a
Added AddIn64 suffix to the published .xll.
Sergey-Vlasov Feb 16, 2025
9611a42
Merge pull request #750 from Excel-DNA/NativeAOTMain-2
Sergey-Vlasov Feb 16, 2025
af33c95
Added support for ExcelCommand registration.
Sergey-Vlasov Mar 1, 2025
04a07f5
Merge pull request #753 from Excel-DNA/NativeAOTMain-3
Sergey-Vlasov Mar 2, 2025
c56cd5b
Trying to add a command to a ribbon. Work in progress...
Sergey-Vlasov Mar 9, 2025
ac26aed
Added support for optional missing parameters.
Sergey-Vlasov Mar 11, 2025
d72fdbd
Fixed DispParams parameters order.
Sergey-Vlasov Mar 11, 2025
1aefdc8
Added Is and Invoke implementation to TypeAdapter.
Sergey-Vlasov Mar 11, 2025
5ee4540
Added a test command.
Sergey-Vlasov Mar 11, 2025
8839e3d
Implemented SetProperty.
Sergey-Vlasov Mar 12, 2025
ec6b996
Completed adding a command to Add-ins ribbon.
Sergey-Vlasov Mar 12, 2025
2797c5b
Implemented ExcelDnaUtil.ApplicationObject.
Sergey-Vlasov Mar 15, 2025
83482d1
Implemented TypeAdapter.Is using QueryInterface.
Sergey-Vlasov Mar 15, 2025
c388ebf
Cleaned and refactored ExcelDna.COMWrappers.NativeAOT project.
Sergey-Vlasov Mar 22, 2025
f29ab0e
Cleaned ExcelDna.ComInterop files.
Sergey-Vlasov Mar 22, 2025
47b8009
Cleaned ExcelDnaUtil.
Sergey-Vlasov Mar 22, 2025
62e0517
Implemented getting COM index by name.
Sergey-Vlasov Mar 22, 2025
b651174
Extended TypeAdapter usage to all ExcelCommandBars methods.
Sergey-Vlasov Mar 22, 2025
b1320dd
Cleaned ExcelDna.Integration.
Sergey-Vlasov Mar 22, 2025
9f6e9c7
Added ExcelDna.COMWrappers.NativeAOT.dll to the package.
Sergey-Vlasov Mar 22, 2025
bddefe1
Merge pull request #756 from Excel-DNA/NativeAOTMain-2
Sergey-Vlasov Mar 22, 2025
0cf482c
Load ExcelRibbon from add-in (work in progress).
Sergey-Vlasov Mar 23, 2025
6f7d42e
Added net8.0 target to ExcelDna.Integration project.
Sergey-Vlasov Mar 30, 2025
12d19a4
Copied Generator.Interfaces to ExcelDna.Integration project.
Sergey-Vlasov Apr 10, 2025
77bad1f
Copied Generator.TypeAdapter to ExcelDna.Integration project.
Sergey-Vlasov Apr 11, 2025
d7f7f00
Removed the ExcelDna.COMWrappers.NativeAOT project.
Sergey-Vlasov Apr 11, 2025
b84986c
Created source generated IDTExtensibility2 interface.
Sergey-Vlasov Apr 11, 2025
31ba20d
Implemented source generated DummyComAddIn.
Sergey-Vlasov Apr 11, 2025
f49efd0
Implemented COM wrapper type detection for an object.
Sergey-Vlasov Apr 12, 2025
f25a0d6
Moved ExcelComAddInHelper to a separate file.
Sergey-Vlasov Apr 12, 2025
4a9705b
Implemented minimal source generated ExcelRibbon.
Sergey-Vlasov Apr 13, 2025
8f20113
Implemented loading ribbon from a native add-in.
Sergey-Vlasov Apr 13, 2025
a57f172
Limited IExcelRibbon to .NET 8.
Sergey-Vlasov Apr 13, 2025
e9a54f4
Corrected generated IDispatch implementation.
Sergey-Vlasov Apr 19, 2025
26bed1d
Added support for IExcelRibbon onAction methods.
Sergey-Vlasov Apr 26, 2025
ccb048a
Removed marshalling for IDispatch.Invoke ExcepInfo.
Sergey-Vlasov Apr 26, 2025
c17bda1
Added IExcelRibbon onAction support to native source generator.
Sergey-Vlasov Apr 26, 2025
cd46c5c
Implemented optional VariantResult marshalling.
Sergey-Vlasov Apr 27, 2025
fcd2589
Implemented source generated RibbonControl.
Sergey-Vlasov Apr 27, 2025
ee105e7
Added RibbonControl Tag support.
Sergey-Vlasov May 3, 2025
6b92c83
Added OnDisconnection cleanup for source generated ribbon.
Sergey-Vlasov May 3, 2025
42deaf0
Updated UnloadComAddIns for NativeAOT.
Sergey-Vlasov May 3, 2025
4c4873f
Updated package for replaced ExcelDna.COMWrappers.NativeAOT.dll.
Sergey-Vlasov May 3, 2025
8f726a2
Merge pull request #764 from Excel-DNA/NativeAOTMain-2
Sergey-Vlasov May 3, 2025
441f7bd
Created AOTRibbon TestTarget project.
Sergey-Vlasov May 4, 2025
e1ca86b
Added a command to AOTRibbon project.
Sergey-Vlasov May 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Build/BuildPackages.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
setlocal

set PackageVersion=%1
set DllVersion=%2
set MSBuildPath=%3
set PackageNativeAOTVersion=%2
set DllVersion=%3
set MSBuildPath=%4

set rcfile=..\Source\versioninfo.rc2
PowerShell "(Get-Content %rcfile%) -replace '\d+,\d+,\d+,\d+', '%DllVersion%'.Replace('.',',') -replace '\d+\.\d+\.\d+\.\d+', '%DllVersion%' | Set-Content %rcfile%"
Expand All @@ -18,7 +19,7 @@ call build.bat
@if errorlevel 1 goto end

cd ..\Package
call package.cmd %PackageVersion%
call package.cmd %PackageVersion% %PackageNativeAOTVersion%
@if errorlevel 1 goto end

set pushfile=push.cmd
Expand Down
9 changes: 9 additions & 0 deletions Build/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ copy /Y ..\Source\ExcelDnaPack\bin\Release\net6.0-windows\ExcelDnaPack.runtimeco

if not exist "..\Package\ExcelDna.AddIn\tools\net462\" mkdir "..\Package\ExcelDna.AddIn\tools\net462\"
if not exist "..\Package\ExcelDna.AddIn\tools\net6.0-windows\" mkdir "..\Package\ExcelDna.AddIn\tools\net6.0-windows\"
if not exist "..\Package\ExcelDna.AddIn.NativeAOT\tools\" mkdir "..\Package\ExcelDna.AddIn.NativeAOT\tools\"
if not exist "..\Package\ExcelDna.AddIn.NativeAOT\lib\net8.0-windows\" mkdir "..\Package\ExcelDna.AddIn.NativeAOT\lib\net8.0-windows\"
if not exist "..\Package\ExcelDna.AddIn.NativeAOT\analyzers\dotnet\cs" mkdir "..\Package\ExcelDna.AddIn.NativeAOT\analyzers\dotnet\cs"

copy /Y ..\Source\ExcelDna.AddIn.Tasks\bin\Release\net462\ExcelDna.AddIn.Tasks.dll ..\Package\ExcelDna.AddIn\tools\net462\
copy /Y ..\Source\ExcelDna.AddIn.Tasks\bin\Release\net462\ExcelDna.AddIn.Tasks.pdb ..\Package\ExcelDna.AddIn\tools\net462\
Expand All @@ -31,5 +34,11 @@ copy /Y ..\Source\ExcelDna.AddIn.Tasks\bin\Release\net462\System.Collections.Imm
copy /Y ..\Source\ExcelDna.AddIn.Tasks\bin\Release\net6.0-windows\ExcelDna.AddIn.Tasks.dll ..\Package\ExcelDna.AddIn\tools\net6.0-windows\
copy /Y ..\Source\ExcelDna.AddIn.Tasks\bin\Release\net6.0-windows\ExcelDna.AddIn.Tasks.pdb ..\Package\ExcelDna.AddIn\tools\net6.0-windows\

copy /Y "..\Source\ExcelDna.Integration\bin\Release\net8.0-windows\ExcelDna.Integration.dll" "..\Package\ExcelDna.AddIn.NativeAOT\lib\net8.0-windows\"
copy /Y "..\Source\ExcelDna.ManagedHost\bin\Release\net6.0-windows\ExcelDna.ManagedHost.dll" "..\Package\ExcelDna.AddIn.NativeAOT\lib\net8.0-windows\"
copy /Y "..\Source\ExcelDna.Loader\bin\Release\net6.0-windows\ExcelDna.Loader.dll" "..\Package\ExcelDna.AddIn.NativeAOT\lib\net8.0-windows\"
copy /Y "..\Source\ExcelDna.SourceGenerator.NativeAOT\bin\Release\netstandard2.0\ExcelDna.SourceGenerator.NativeAOT.dll" "..\Package\ExcelDna.AddIn.NativeAOT\analyzers\dotnet\cs\"
copy /Y "..\Source\ExcelDna.Host.NativeAOT\bin\Release\x64\ExcelDna.Host.NativeAOT.x64.xll" "..\Package\ExcelDna.AddIn.NativeAOT\tools\ExcelDnaNativeAOT64.xll"

copy /Y ..\Distribution\net462\ ..\Distribution\

3 changes: 2 additions & 1 deletion MasterBuild/MasterBuild.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
setlocal

set PackageVersion=1.9.0-alpha3
set PackageNativeAOTVersion=0.1.0
set PackageReferenceVersion=1.9.0-alpha3
set DllVersion=1.9.0.3

Expand All @@ -24,7 +25,7 @@ PowerShell "(Get-Content %targetsfile%) -replace '_VERSION_', '%PackageReference
@if errorlevel 1 goto end

cd %rootPath%\ExcelDna\Build
call BuildPackages.bat %PackageVersion% %DllVersion% %MSBuildPath%
call BuildPackages.bat %PackageVersion% %PackageNativeAOTVersion% %DllVersion% %MSBuildPath%
@if errorlevel 1 goto end

cd %rootPath%\Registration\Build
Expand Down
54 changes: 54 additions & 0 deletions Package/ExcelDna.AddIn.NativeAOT/ExcelDna.AddIn.NativeAOT.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>ExcelDna.AddIn.NativeAOT</id>
<version>$ExcelDnaNativeAOTVersion$</version>
<title>Excel-DNA Add-In NativeAOT</title>
<authors>Govert van Drimmelen</authors>
<owners>Govert van Drimmelen</owners>
<projectUrl>http://excel-dna.net</projectUrl>
<repository type="git" url="https://github.com/Excel-DNA/ExcelDna" />
<icon>images\ExcelDna-nu.png</icon>
<license type="expression">Zlib</license>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
Excel-DNA eases the development of Excel add-ins using .NET.
Add-ins created with Excel-DNA can export high-performance user-defined functions and macros, and can be packed into a single file for easy distribution and installation.

Excel versions 2007 through 2021 / Office 365 can be targeted with a single add-in.
Advanced Excel features are supported, including multi-threaded recalculation, registration-free RTD servers and customized Ribbon and Task Pane interfaces and asynchronous functions.

Excel-DNA supports .NET Framework version 4.6.2 to 4.8.1, and .NET 6.0+

The Excel-DNA Runtime is free for all use, and distributed under a permissive open-source license that also allows commercial use.</description>
<summary>Excel-DNA is an independent project to integrate .NET into Excel.</summary>
<tags>excel exceldna udf excel-dna</tags>
<dependencies>
<group targetFramework="net8.0-windows7.0" />
</dependencies>
</metadata>
<files>
<file src="..\..\Distribution\net462\ExcelDna.Integration.dll" target="tools\net462\ExcelDna.Integration.dll" />
<file src="..\ExcelDna.AddIn\tools\net462\ExcelDna.AddIn.Tasks.dll" target="tools\net462\ExcelDna.AddIn.Tasks.dll" />
<file src="..\ExcelDna.AddIn\tools\net462\EnvDTE.dll" target="tools\net462\EnvDTE.dll" />
<file src="..\ExcelDna.AddIn\tools\net462\Newtonsoft.Json.dll" target="tools\net462\Newtonsoft.Json.dll" />
<file src="..\ExcelDna.AddIn\tools\net462\Microsoft.Extensions.DependencyModel.dll" target="tools\net462\Microsoft.Extensions.DependencyModel.dll" />

<file src="..\..\Distribution\net6.0-windows\ExcelDna.Integration.dll" target="tools\net6.0-windows7.0\ExcelDna.Integration.dll" />
<file src="..\ExcelDna.AddIn\tools\net6.0-windows\ExcelDna.AddIn.Tasks.dll" target="tools\net6.0-windows7.0\ExcelDna.AddIn.Tasks.dll" />
<file src="..\ExcelDna.AddIn\tools\net6.0-windows\AsmResolver.dll" target="tools\net6.0-windows7.0\AsmResolver.dll" />
<file src="..\ExcelDna.AddIn\tools\net6.0-windows\AsmResolver.PE.dll" target="tools\net6.0-windows7.0\AsmResolver.PE.dll" />
<file src="..\ExcelDna.AddIn\tools\net6.0-windows\AsmResolver.PE.File.dll" target="tools\net6.0-windows7.0\AsmResolver.PE.File.dll" />

<file src="lib\net8.0-windows\ExcelDna.Integration.dll" target="lib\net8.0-windows7.0\ExcelDna.Integration.dll" />
<file src="lib\net8.0-windows\ExcelDna.ManagedHost.dll" target="lib\net8.0-windows7.0\ExcelDna.ManagedHost.dll" />
<file src="lib\net8.0-windows\ExcelDna.Loader.dll" target="lib\net8.0-windows7.0\ExcelDna.Loader.dll" />

<file src="analyzers\dotnet\cs\ExcelDna.SourceGenerator.NativeAOT.dll" target="analyzers\dotnet\cs" />

<file src="build\ExcelDna.AddIn.NativeAOT.props" target="build" />
<file src="build\ExcelDna.AddIn.NativeAOT.targets" target="build" />
<file src="tools\ExcelDnaNativeAOT64.xll" target="tools" />
<file src="..\images\ExcelDna-nu.png" target="images\" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<UseWindowsForms>true</UseWindowsForms>
<SelfContained>true</SelfContained>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<ExcelDnaToolsPath Condition="$(ExcelDnaToolsPath) == '' Or $(ExcelDnaToolsPath) == '*Undefined*'">$(MSBuildThisFileDirectory)..\tools\</ExcelDnaToolsPath>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildRuntimeType)' == 'Core'">
<ExcelDnaTasksPath>$(ExcelDnaToolsPath)net6.0-windows7.0\</ExcelDnaTasksPath>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)' != 'Core'">
<ExcelDnaTasksPath>$(ExcelDnaToolsPath)net462\</ExcelDnaTasksPath>
</PropertyGroup>

<UsingTask TaskName="ExcelDna.AddIn.Tasks.PackExcelAddInNativeAOT" AssemblyFile="$(ExcelDnaTasksPath)ExcelDna.AddIn.Tasks.dll" />

<!--
Default values for configuration properties - in case they were not set in via .props file or command-line
-->
<PropertyGroup>
<ExcelDnaPackRunMultithreaded Condition="'$(ExcelDnaPackRunMultithreaded)' == ''">true</ExcelDnaPackRunMultithreaded>
</PropertyGroup>

<Target Name="ExcelDnaAddInNativeAOTPublish" AfterTargets="Publish">
<PackExcelAddInNativeAOT
Xll64FilePath="$(ExcelDnaToolsPath)ExcelDnaNativeAOT64.xll"
ProjectName="$(MSBuildProjectName)"
PublishDir="$(PublishDir)"
RunMultithreaded="$(ExcelDnaPackRunMultithreaded)"
PackManagedOnWindows="$(ExcelDnaPackManagedResourcePackingOnWindows)"
>
</PackExcelAddInNativeAOT>
</Target>

</Project>
4 changes: 4 additions & 0 deletions Package/package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set currentPath=%~dp0
set basePath=%currentPath:~0,-1%
set outputPath=%basePath%\nupkg
set ExcelDnaVersion=%1
set ExcelDnaNativeAOTVersion=%2

if exist "%outputPath%\*.nupkg" del "%outputPath%\*.nupkg"

Expand All @@ -18,6 +19,9 @@ nuget.exe pack "%basePath%\ExcelDna.Templates\ExcelDna.Templates.nuspec" -BasePa
nuget.exe pack "%basePath%\ExcelDna.AddIn\ExcelDna.AddIn.nuspec" -BasePath "%basePath%\ExcelDna.AddIn" -OutputDirectory "%outputPath%" -Verbosity detailed -NonInteractive -Prop ExcelDnaVersion="%ExcelDnaVersion%"
@if errorlevel 1 goto end

nuget.exe pack "%basePath%\ExcelDna.AddIn.NativeAOT\ExcelDna.AddIn.NativeAOT.nuspec" -BasePath "%basePath%\ExcelDna.AddIn.NativeAOT" -OutputDirectory "%outputPath%" -Verbosity detailed -NonInteractive -Prop ExcelDnaNativeAOTVersion="%ExcelDnaNativeAOTVersion%"
@if errorlevel 1 goto end

nuget.exe pack "%basePath%\ExcelDna.Integration\ExcelDna.Integration.nuspec" -BasePath "%basePath%\ExcelDna.Integration" -OutputDirectory "%outputPath%" -Verbosity detailed -NonInteractive -Prop ExcelDnaVersion="%ExcelDnaVersion%" -Symbols -SymbolPackageFormat snupkg
@if errorlevel 1 goto end

Expand Down
8 changes: 8 additions & 0 deletions Source/ExcelDna.AddIn.Tasks/ExcelDna.AddIn.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@
<Link>ExcelDna.AddIn.props</Link>
<SubType>Designer</SubType>
</None>
<None Include="..\..\Package\ExcelDna.AddIn.NativeAOT\build\ExcelDna.AddIn.NativeAOT.targets">
<Link>ExcelDna.AddIn.NativeAOT.targets</Link>
<SubType>Designer</SubType>
</None>
<None Include="..\..\Package\ExcelDna.AddIn.NativeAOT\build\ExcelDna.AddIn.NativeAOT.props">
<Link>ExcelDna.AddIn.NativeAOT.props</Link>
<SubType>Designer</SubType>
</None>
</ItemGroup>

<Import Project="..\ExcelDna.PackedResources\ExcelDna.PackedResources.projitems" Label="Shared" />
Expand Down
85 changes: 85 additions & 0 deletions Source/ExcelDna.AddIn.Tasks/PackExcelAddInNativeAOT.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
using System;
using Microsoft.Build.Framework;
using ExcelDna.AddIn.Tasks.Logging;
using ExcelDna.AddIn.Tasks.Utils;
using ExcelDna.PackedResources.Logging;
using System.IO;

namespace ExcelDna.AddIn.Tasks
{
public class PackExcelAddInNativeAOT : AbstractTask
{
private readonly IBuildLogger _log;
private readonly IExcelDnaFileSystem _fileSystem;

public PackExcelAddInNativeAOT()
{
_log = new BuildLogger(this, "PackExcelAddInNativeAOT");
_fileSystem = new ExcelDnaPhysicalFileSystem();
}

internal PackExcelAddInNativeAOT(IBuildLogger log, IExcelDnaFileSystem fileSystem)
{
_log = log ?? throw new ArgumentNullException(nameof(log));
_fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
}

public override bool Execute()
{
try
{
_log.Debug("Running PackExcelAddInNativeAOT Task");

bool useManagedResourceResolver = false;
#if NETCOREAPP
useManagedResourceResolver = PackManagedOnWindows || !OperatingSystem.IsWindows();
#endif

string mainNativeAssembly = Path.Combine(PublishDir, ProjectName + ".dll");
string xllOutput = Path.Combine(PublishDir, ProjectName + "-AddIn64.xll");
File.Copy(Xll64FilePath, xllOutput, true);

int result = ExcelDna.PackedResources.ExcelDnaPack.PackNativeAOT(mainNativeAssembly, xllOutput, RunMultithreaded, useManagedResourceResolver, _log);
if (result != 0)
throw new ApplicationException($"Pack failed with exit code {result}.");

return true;
}
catch (Exception ex)
{
_log.Error(ex, ex.Message);
_log.Error(ex, ex.ToString());
return false;
}
}

/// <summary>
/// The 64-bit .xll file path
/// </summary>
[Required]
public string Xll64FilePath { get; set; }

/// <summary>
/// The name of the project being compiled
/// </summary>
[Required]
public string ProjectName { get; set; }

/// <summary>
/// The output location for the publish target; includes the trailing backslash (\).
/// </summary>
[Required]
public string PublishDir { get; set; }

/// <summary>
/// Use multi threading
/// </summary>
[Required]
public bool RunMultithreaded { get; set; }

/// <summary>
/// Enable/disable cross-platform resource packing implementation when executing on Windows.
/// </summary>
public bool PackManagedOnWindows { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<ItemGroup>
<ExcelDnaTestFilesToCopyToRoot Include="..\..\Package\ExcelDna.AddIn\**\*.*" />
<ExcelDnaTestFilesToCopyToRoot Include="..\..\Package\ExcelDna.AddIn.NativeAOT\**\*.*" />
</ItemGroup>

<Copy SourceFiles="@(ExcelDnaTestFilesToCopyToRoot)"
Expand Down Expand Up @@ -52,6 +53,46 @@
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="true" />

<Copy
Condition="Exists('$(ProjectDir)..\ExcelDna.Host.NativeAOT\bin\$(Configuration)\x64\ExcelDna.Host.NativeAOT.x64.xll')"
SourceFiles="$(ProjectDir)..\ExcelDna.Host.NativeAOT\bin\$(Configuration)\x64\ExcelDna.Host.NativeAOT.x64.xll"
DestinationFiles="$(ExcelDnaTestPackageDir)tools\ExcelDnaNativeAOT64.xll"
ContinueOnError="false"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="true" />

<Copy
Condition="Exists('$(ProjectDir)..\ExcelDna.SourceGenerator.NativeAOT\bin\$(Configuration)\netstandard2.0\ExcelDna.SourceGenerator.NativeAOT.dll')"
SourceFiles="$(ProjectDir)..\ExcelDna.SourceGenerator.NativeAOT\bin\$(Configuration)\netstandard2.0\ExcelDna.SourceGenerator.NativeAOT.dll"
DestinationFiles="$(ExcelDnaTestPackageDir)analyzers\ExcelDna.SourceGenerator.NativeAOT.dll"
ContinueOnError="false"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="true" />

<Copy
Condition="Exists('$(ProjectDir)..\ExcelDna.ManagedHost\bin\$(Configuration)\net6.0-windows\ExcelDna.ManagedHost.dll')"
SourceFiles="$(ProjectDir)..\ExcelDna.ManagedHost\bin\$(Configuration)\net6.0-windows\ExcelDna.ManagedHost.dll"
DestinationFiles="$(ExcelDnaTestPackageDir)tools\net6.0-windows\ExcelDna.ManagedHost.dll"
ContinueOnError="false"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="true" />

<Copy
Condition="Exists('$(ProjectDir)..\ExcelDna.Loader\bin\$(Configuration)\net6.0-windows\ExcelDna.Loader.dll')"
SourceFiles="$(ProjectDir)..\ExcelDna.Loader\bin\$(Configuration)\net6.0-windows\ExcelDna.Loader.dll"
DestinationFiles="$(ExcelDnaTestPackageDir)tools\net6.0-windows\ExcelDna.Loader.dll"
ContinueOnError="false"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="true" />

<Copy
Condition="Exists('$(ProjectDir)..\ExcelDna.Integration\bin\$(Configuration)\net8.0-windows\ExcelDna.Integration.dll')"
SourceFiles="$(ProjectDir)..\ExcelDna.Integration\bin\$(Configuration)\net8.0-windows\ExcelDna.Integration.dll"
DestinationFiles="$(ExcelDnaTestPackageDir)tools\net8.0-windows7.0\ExcelDna.Integration.dll"
ContinueOnError="false"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="true" />

<Copy
Condition="Exists('$(ProjectDir)..\ExcelDna\x64\$(Configuration)\ExcelDna64.xll')"
SourceFiles="$(ProjectDir)..\ExcelDna\x64\$(Configuration)\ExcelDna64.xll"
Expand Down
Loading