Creating Applications for various versions of the .NET Framework

Creating Applications for various versions of the .NET Framework

You are here:
< Back

This KB explains how to target different versions of the .NET Framework when creating applications with Visual Studio, VB .NET or C# .NET. This issue applies to the Windows Forms Barcode Control.

Solution(s):

As of 2009, most IDAutomation .NET barcode components have been built using version 1.1 of the .NET Framework for compatibility purposes. However, compiled applications can target different versions of the .NET Framework. To ensure the correct version of the framework is used in Visual Studio 2010, select the “target framework” option in the Application section of the solution. In earlier versions of Visual Studio, create a .config file with the same name as the .exe file and specify the version(s) of the framework that are compatible with the exe file being created. For example:

EXE File Name: MyApp.exe
Config File Name: MyApp.exe.config

Contents of the .config file:

<?xml version ="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v1.1.4322" /> 
</startup>
</configuration>

Details regarding this issue can be found at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconTargetingNETFrameworkVersion.asp.