Error installing Excel-DNA package in VS2017

566 views
Skip to first unread message

DavidE (Sydney)

unread,
Jun 2, 2017, 3:24:22 AM6/2/17
to Excel-DNA
Hi all,

On using the NuGet installation command [PM> Install-Package Excel-DNA -Version 0.33.9] in Visual Studio 2017 Community Preview, ver 15.3, I'm receiving the following error:

---------------------

Install-Package : Package ExcelDna.Integration 0.33.9 is not compatible with netstandard1.4 (.NETStandard,Version=v1.4). Package ExcelDna.Integration 0.33.9 supports: net 
(.NETFramework,Version=v0.0)
At line:1 char:1
+ Install-Package Excel-DNA -Version 0.33.9
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 
Install-Package : One or more packages are incompatible with .NETStandard,Version=v1.4.
At line:1 char:1
+ Install-Package Excel-DNA -Version 0.33.9
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 
Install-Package : Package restore failed. Rolling back package changes for 'Test'.
At line:1 char:1
+ Install-Package Excel-DNA -Version 0.33.9
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 
----------------

My searching for a solution has thus far yielded no success. Note - I am no expert and apologise in advance if I have done something silly!

Really looking forward to returning to Excel-DNA after some years away from coding. If it's of any help, I'm using C#. Your help will be greatly appreciated.

Many thanks and regards from Australia,
David

Govert van Drimmelen

unread,
Jun 2, 2017, 3:37:23 AM6/2/17
to exce...@googlegroups.com
Hi David,

The message indicates that the target of class library (targeting .NETStandard 1.4) that your project makes, is not compatible with Excel-DNA. These are some complications introduced in moving .NET to be a cross-platform framework. All the old stuff still works, but there are some more options to navigate, which can be a bit confusing.

The easiest way to fix this is to start a new project, and check in the project template list that you are targeting .NET Framework (not .NET Standard) and any version above 4.0. The new project should allow you to install the NuGet package without error.

There's probably some setting that can fix your existing project too, so you can poke around a bit.

If you're still stuck with this, please write back and I can have a closer look.

-Govert
--
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 post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

DavidE (Sydney)

unread,
Jun 3, 2017, 1:14:45 AM6/3/17
to Excel-DNA
Dear Govert,

once again your fast response is incredible and your willingness to assist someone with such a basic question very much appreciated. Your solution worked of course and now I'm on my way!

Now for me to try to come to grips with Excel DNA this time in a C# environment. I really can't wait.

Many regards and thank you very much.

David Eldridge
Reply all
Reply to author
Forward
0 new messages