Skip to Main Content
Cognex Support Hub
Logo

Technical Bulletin: VisionPro | v2

PDF: 0.12 MB

Version: 2

Release Date: 08/20/2012

Language: English

Download

Content Summary

This bulletin outlines a compatibility issue between Cognex VisionPro (versions 7.0-8.0) and Microsoft Visual Studio 2010 with .NET 4.0. VisionPro uses .NET 2.0, requiring useLegacyV2RuntimeActivationPolicy> in app.config for .NET 4.0. If a VPP file with .NET 4.0 types is serialized, Cognex.VisionPro.QuickBuild.exe> fails to load it. Workarounds include targeting .NET 2.0-3.5, embedding CogJobManagerEdit>, or adding Cognex.VisionPro.QuickBuild.exe.config>. Limitations exist, but future updates will fix this.

This technical bulletin addresses a compatibility issue when using Cognex VisionPro (versions 7.0, 7.1, 7.2, and 8.0) with Microsoft Visual Studio 2010 and the .NET 4.0 Framework. VisionPro's assemblies are built on .NET 2.0, while Visual Studio 2010 allows targeting .NET 4.0, requiring the useLegacyV2RuntimeActivationPolicy setting in the app.config file. If a custom VisionPro application targeting .NET 4.0 serializes a VPP file, it may contain .NET 4.0-specific types, causing Cognex.VisionPro.QuickBuild.exe, a .NET 2.0 application, to fail when loading the file. Workarounds include targeting .NET 2.0–3.5, embedding the CogJobManagerEdit control into the .NET 4.0 application, or adding a Cognex.VisionPro.QuickBuild.exe.config file to enable .NET 4.0 runtime loading. However, these workarounds have limitations. Future VisionPro versions will resolve this issue.