# Simple Install opencv Visual Studio 2017 by NUGET

> Simple installation of OpenCV for Visual Studio 2017 by image example. Easy and fast way to start coding in OpenCV by Nuget packages.

- Canonical URL: https://www.funvisiontutorials.com/blog/install-opencv-visual-studio-2017-nuget/
- Author: Vladimir Kucera
- Published: 2017-04-23
- Updated: 2023-09-13
- Topics: Installing & building OpenCV

Simple installation of OpenCV for Visual Studio 2017 by image example. Easy and fast way to start coding in OpenCV by Nuget packages. If your plan is going to use Cuda or some advanced opencv settings. You should install opencv in a different way. For example, build your own libs according to HW you have available. This will be my next tutorial.

If you want to play and have fun in Visual Studio 2017 this is a tutorial for you. All my tutorials for Opencv are now running just based on the NUGET package installation. For the most common purpose is this installation just fine.

## OpenCV Visual Studio 2017 needs vs141 libs version

This doesn't make any sense to me Visual Studio 2012 has a 110 lib version, 2013 has 113, Visual Studio 2015 has a VS140 lib version and now the big step forward. Visual Studio 2017 you are finding DLL, libs, etc compatible with VS141. What a big step from the previous visual studio :)

### Instal opencv under 1 minute

On the Nuget package side find Nuget distribution. This will install the library, DLL, and header into your project. Find the right NUGET for you on https://www.nuget.org/packages

Find support VS141
openCV for Windows
320.1.1-vs141

I just tried this Nuget and It works fine for 86 version built in VS 2017.

**Install-Package opencv.win.native -Pre**
x86/x64 builds for OpenCV 3.2 release for Visual Studio 2017

Install Step-by-step

-   Create an empty C++ project
-   Click on the source file on the Right and add a new source.cpp file.
-   Add source code. You will see unresolved dependencies and other staff. Just because your functions try to find where are they implemented.

[Image: opencv nuget visual studio 2017]

-   Your Visual Studio 2017 needs a NUGET packages extension installed. The installation of VS17 is more modular than before, but NUGET are most common extension.
-   In tools - Nuget Packages Manager - open Package Manager Console
-   Write here simple **Install-Package opencv.win.native -Pre     OR any others you find**
-   **On second picture you can see that Nuget is installed**

[Image: Visual Studio 2017 with Tools, NuGet Package Manager, Package Manager Console open, and Install-Package opencv.win.native -Pre typed at the prompt]

[Image: The Package Manager Console finishing: opencv.win.native 320.1.1-vs141 successfully installed, 6.4 minutes elapsed]

Now, You can compile at least 86 released without any problem. I am tested just this packages. The next tutorial show how to build your own libraries.. See you

[Image: The program running from Visual Studio 2017, showing a webcam frame of a toy robot in a window titled funvision]

### Troubles with opencv  ZLIBD1.DLL zlib dll in some Nuget packages

Hi, all friends with zlibd1.dll troubles. This NuGet package has some trouble with debugging and the project needs to switch to release. As in the last picture above. Look at the proof down here. All instructions above are ok. You can find Nugets package that corrects this problem and installs it in the same way.  Thanks.

DEBUG

[Image: A Windows system error reporting that zlibd1.dll is missing, over the Debug folder full of opencv 320d DLLs]

[Image: The same missing zlibd1.dll error raised while debugging the project in Visual Studio]

RELEASE

[Image: The Release build running: the source file, a console window, and a webcam frame of a book cover in the funvision window]

[Image: The finished Release build showing a close-up webcam frame, with the OpenCV DLLs sitting beside the executable in the Release folder]
