This topic contains the following sections.
VisionPro assemblies are built against the .NET 4.6 Framework and can be used by Visual Studio applications that target the .NET 4.6 or .NET 4.6.1 Frameworks. VisionPro supports building applications using Microsoft Visual Studio 2012, 2013 or 2015. VisionPro also supports building applications in Microsoft Visual Studio 2012 Express, 2013 Express, and 2015 Express.
Be aware that if you have Visual Studio 2012 or Visual 2013 installed, the installer will install .NET 4.6.
VisionPro applications built using Microsoft Visual Studio 2005, Visual Studio 2008 or Visual Studio 2010 are not supported. In addition, targeting any of the following .NET Frameworks is not supported:
- .NET 4.5.2
- .NET 4.5.1
- .NET 4.5
- .NET 4.0 Client Profile
- .NET 3.5 Client Profile
- .NET 3.5
- .NET 3.0
- .NET 2.0
Visual Studio allows you to select the target .NET Framework when creating a project.
- Refer to the documentation for your version of Visual Studio for information on targeting the desired .NET Framework.
If you target an unsupported .NET framework, you will get the following compilation error:
The type or namespace name 'Cognex' could not be found (are you missing a using directive or an assembly reference?)- Refer to the documentation for your version of Visual Studio for information on retargeting an existing application to a supported .NET Framework.
You can use Visual Studio to develop and build VisionPro applications that use the Microsoft Windows Forms (WinForms) libraries. When using the WinForms designer, the VisionPro toolbox appears in the designer environment. If you create a VisionPro application that will use Tool Edit Controls, be sure to select a WinForms application and not a Windows Presentation Foundation (WPF) application.
If you want to develop a WPF application, you cannot use VisionPro Tool Edit Controls directly in the WPF designer because they are WinForms controls. The VisionPro toolbox does not appear in the WPF designer environment, nor can it be added manually.
You cannot create a VisionPro Tool Edit Control programmatically and add it to a WPF window directly. You can, however, use a VisionPro Tool Edit Control if you host it inside of a WindowsFormHost control. The instantiation and placing of hosted VisionProTool Edit Controls must be done programmatically inside of your application.
You may find the following MSDN articles particularly useful when developing Windows Presentation Foundation (WPF) applications that use VisionPro Tool Edit Controls:
- Migration and Interoperability
- Migration and Interoperability How-to Topics
- Walkthrough: Hosting a Windows Forms Control in Windows Presentation Foundation.
During the VisionPro installation, the installer allows you to run the VisionPro Controls Wizard utility to populate the tool palette in Visual Studio with the latest set of VisionPro edit controls. By default, the option is enabled and labeled Install VisionPro Controls in Visual Studio, as shown in the following figure:

If you did not allow the wizard to run during the initial VisionPro installation, you can launch the utility manually by choosing Start->All Programs->Cognex->VisionPro->Utilities->VisionPro Controls Wizard. The wizard detects which versions of Visual Studio are installed and supported in this release:

See the topic Adding a Control for more information on the VisionPro Controls Wizard.
By default the VisionPro software documentation is not integrated with Visual Studio. Gaining access to the VisionPro software documentation varies depending on the version of Visual Studio you use. Perform the following steps to gain access to the VisionPro Software Documentation through the Visual Studio development environment:
- Copy the contents of the Doc folder on the installation media to a location on your PC outside of \Program Files, such as the Windows desktop.
- Launch Visual Studio.
- Choose Help->Add and Remove Content.
- From the Installation Source option, choose Disk.
Select the file VisionPro_Documentation.msha from its location on the PC.
Visual Studio makes the VisionPro Software Documentation available for installation.

Click Add and Update.
A Security Alert might appear. Click Yes to proceed with the update.
Updating Visual Studio with the documentation can take several minutes.
The sample programs, by default installed at C:\Program Files\Cognex\VisionPro\Samples\Programming, contain C# and VP.NET project and solution files which can be opened with any supported version of Visual Studio. All sample programs have read-only access and must be copied to another directory before use. Cognex recommends you copy any sample programs you wish to use to a directory outside of C:\Program Files.
Cognex recommends you set the Embed Interop Types property to False for all referenced assemblies in your application to prevent compilation warnings such as:
warning CS1762: A reference was created to embedded interop assembly 'c:\Program Files\Cognex\VisionPro\ReferencedAssemblies\Cognex.VisionPro.Interop.Core.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files\Cognex\VisionPro\ReferencedAssemblies\Cognex.VisionPro.CorePlus.dll'. Consider changing the 'Embed Interop Types' property on either assembly.
The following figure shows the Properties dialog box with the Embed Interop Types property set to False:

Setting the property to False avoids compilation warnings regarding embedded type information.