简体   繁体   中英

Why can't I access a namespace added through NuGet?

Because I want to use matrices in my program, I added the Math.NET library through NuGet in Visual Studio 2015. However, although I can see the library files in the Project References folder, VS doesn't seem to recognize any of the references to it. Autocomplete won't suggest MathNet when writing the using-command, and it won't recognize any of the classes from that namespace either, of course. Are there any more steps I'm missing?

尽管我仍然不能说为什么自动完成功能不建议使用命名空间(即使尝试构建后仍会在建议中显示),但我可以确认问题的根源在于矩阵和向量使用MathNet.Numerics.LinearAlgebra而不是MathNet.Numerics导入。

Why can't I access a namespace added through NuGet?

Whether there is a error when you add the using command: using MathNet.Numerics; ?

Not sure why autocomplete won't suggest MathNet when you write the using-command, it works fine on my machine, I will write detail steps here so that you can check the difference, then find some help.

Detail Steps:

  1. Create a new blank c# class library project.
  2. Add the package MathNet.Numerics to the project by NuGet.
  3. Open a .cs file, add using MathNet.Numerics and instantiate a class " Permutation " (Most classes are static class).

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM