install MathNet.Numerics

41 views
Skip to first unread message

Mark Houldsworth

unread,
Oct 26, 2020, 5:41:17 PM10/26/20
to Excel-DNA
I'm starting a new project and trying to include MathNet.Numerics with ExcelDNA. In the past I haven't had problems simply referring to the Numerics.dll. But now I'm seeing error that ExcelDNA is not compatible with projects that use Nuget "PackageReference". Is there a work around for this?  Thanks.

C. Augusto Proiete

unread,
Oct 26, 2020, 6:27:09 PM10/26/20
to exce...@googlegroups.com
The latest version of Excel-DNA as of this writing (v1.1.1) doesn't support PackageReference and by default displays the error message you're seeing.

The recommendation at this time is to use the Class Library (.NET Framework) project type instead of Class Library (.NET Standard) project type to get the best development & debugging experience.

If you really want to use the new SDK-style project at your own risk, you can set ExcelDnaAllowPackageReferenceProjectStyle to true in your ExcelDna.Build.props. See PR #327 for more details.

Cheers,
C. Augusto Proiete



On Mon, Oct 26, 2020 at 6:41 PM Mark Houldsworth <houlds...@gmail.com> wrote:
I'm starting a new project and trying to include MathNet.Numerics with ExcelDNA. In the past I haven't had problems simply referring to the Numerics.dll. But now I'm seeing error that ExcelDNA is not compatible with projects that use Nuget "PackageReference". Is there a work around for this?  Thanks.

--
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/4479ea35-5900-4992-89bd-1ed90f7eee6fn%40googlegroups.com.

Govert van Drimmelen

unread,
Oct 27, 2020, 7:17:39 AM10/27/20
to exce...@googlegroups.com

There are separate issues here, which is important to keep apart.

 

  1. Is your project file a new SDK-style project file?
  2. Which style of NuGet package references are you using – a packages.config or the embedded <PackageReference ../> entries in the project file.

 

Augusto has discussed the first issue – what to do if you have to support an SDK-style project file.

 

The second issue arises even if you have created a “Class Library (.NET Framework)” project, when your Visual Sutdio has the default NuGet format set to PackageReference.

There is an option under the Visual Studio options to set this:

 

Graphical user interface, application, Word

Description automatically generated

 

Currently the ExcelDna.AddIn package only really works in the packages.config mode.

 

-Govert

image001.png
Reply all
Reply to author
Forward
0 new messages