k-ujihara / NCDK

The Chemistry Development Kit ported to .NET
https://kazuyaujihara.github.io/NCDK/
GNU Lesser General Public License v2.1
35 stars 11 forks source link

No reference to NCDK is added after installing from NuGet #14

Closed git-hub-user closed 5 years ago

git-hub-user commented 5 years ago

When I install the package NCDK, no references are added to the project(s). With the option Manage NuGet Packages for Solution, I would expect a reference for each project I check. With the option Manage NuGet Packages, I would expect a reference to the current project. When using the Package Manager Console, I would excpect it to be installed into the selected default project. Below is the output from the Package Manager Console, which seems just fine.

PM> Install-Package NCDK
Attempting to gather dependency information for package 'NCDK.1.5.3' with respect to project 'NCDKtest', targeting '.NETFramework,Version=v4.5.2'
Gathering dependency information took 80,17 ms
Attempting to resolve dependencies for package 'NCDK.1.5.3' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'NCDK.1.5.3'
Resolved actions to install package 'NCDK.1.5.3'
Retrieving package 'NCDK 1.5.3' from 'nuget.org'.
Adding package 'NCDK.1.5.3' to folder '<directory name>\NCDKtest\packages'
Added package 'NCDK.1.5.3' to folder '<directory name>\NCDKtest\packages'
Added package 'NCDK.1.5.3' to 'packages.config'
Successfully installed 'NCDK 1.5.3' to NCDKtest
Executing nuget actions took 718,9 ms
Time Elapsed: 00:00:00.9289763

If, e.g., I install NUnit, a reference nunit.framework is automatically added.

git-hub-user commented 5 years ago

After adding the reference manually, I got:

Error CS0246 The type or namespace name 'NCDK' could not be found (are you missing a using directive or an assembly reference?)

Then, of course, I discovered that the Target Framework of my solution was 4.5.2, which should have been 4.6.1. After changing that, I tested the package installation again and then the reference was added automatically.