简体   繁体   中英

Build a project with Math.net Numerics and C#

I have no experience over C# and i do not know how to use those binaries i downloaded there : http://mathnetnumerics.codeplex.com/releases/view/101319

How do i include and build those in my project so i can make a standalone when the project is done?

Thanks!

Install the required libraries and packages via the Nuget Package Console in Visual Studio.

Click File -> Library Package Manager -> Package Manager Console. Then type the following command.

PM> Install-Package MathNet.Numerics

This will install the package and provide you with your dlls.

添加对二进制文件的引用,并包含您在文件中使用的二进制文件的任何部分的命名空间。

if you are using Visual Studio then you can add these libraries from Add Reference option in your project.在此处输入图片说明

To use an external binary, you will need to make a reference to it. This might guide you

http://msdn.microsoft.com/en-us/library/7314433t%28v=vs.80%29.aspx

In my opinion, the easiest way is to drop all the files in the "bin" folder. Then, right click on the "references" folder in your project, click Add --> Add Reference. Next, click the "Browse" tab, navigate to your "bin" folder, and select the files. Now the libraries are available to access through your source code.

You can access the methods and such by inserting "using" statements at the top of your classes, like "using MathNet.Numerics"

In Visual Studio 2019 it's much easier to install the MathNet.Numerics package:

  1. Go to the Project tab
  2. Find and click NuGet Package Management
  3. Go to Search and enter the name of the package you want to install
  4. Select the package and install it

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