Replies: 5 comments
-
The error you show has to do with references or packages you use to get the COM interop assemblies. |
Beta Was this translation helpful? Give feedback.
-
Added ExcelDna.Interop to Test Project with no effect
Still get an error if I add AddIn project as reference to Test project
|
Beta Was this translation helpful? Give feedback.
-
Do you perhaps have explicit COM references to the Excel object model in the project file? |
Beta Was this translation helpful? Give feedback.
-
I got it <ItemGroup Condition=" '$(TargetFramework)' == 'net6.0-windows' ">
<COMReference Include="Microsoft.Office.Interop.Excel">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>9</VersionMinor>
<VersionMajor>1</VersionMajor>
<Guid>00020813-0000-0000-c000-000000000046</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Core">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>8</VersionMinor>
<VersionMajor>2</VersionMajor>
<Guid>2df8d04c-5bfa-101b-bde5-00aa0044de52</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
</ItemGroup> COM References was added to Test project by ExcelDNA.Testing package because my target framework was 'net6.0-windows' |
Beta Was this translation helpful? Give feedback.
-
@Sergey-Vlasov Can we update the ExcelDna.Testing so that the net6.0-windows target also depends on ExcelDna.Interop, instead of the explicit COMReference? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
All examples from Testing samples works well.
I have some internal add-in methods with Excel functionality such as worksheet validations or Ribbon buttons functions. With no
[ExcelFunction]
attribute. So they are not accessible by cell formulas.Adding add-in project as reference causing an error:
And this conflict i can't resolve by just
How to test methods like these?
Beta Was this translation helpful? Give feedback.
All reactions