The following control could not be licensed: TXTextControl.TextControl解决方法
2012-08-27 15:48
3263 查看
In this blog entry, I would like to explain the required steps to force Visual Studio to compile a specific license into a .NET application. This article should help you, if you get the following error message in Visual Studio:
The following control could not be licensed: TXTextControl.TextControl
That means that Visual Studio could not find an appropriate license to validate the control. Generally, the license will be automatically included into the application and typically do not have to worry about licensing at all.
However, should you wish to do one of the following, it is necessary to take a closer look at licensing:
Create TextControl dynamically
Encapsulate TextControl in a user control
Update an existing project with a newer version of TX Text Control
Two significant steps are necessary in order to add the license of TX Text Control into an application. These steps must be performed when creating a TextControl instance dynamically:
The project must include a reference to the 'TX Text Control .NET for Windows Forms Component'. To include the reference, select Add Reference... from the Project main
menu in Visual Studio. Browse for 'TX Text Control .NET for Windows Forms Component', select it and confirm by clicking OK.
A 'licenses.licx' file must exist in the 'Properties' folder (C#) or the 'My Project' folder (VB.NET). To build such a file, create a new text file in this folder and name it 'licenses.licx'. Open the file and add the following string:
TXTextControl.TextControl, TXTextControl, Version=13.0.500.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638
The 'licenses.licx' file is not a TX Text Control specific file, but a Visual Studio file that is used by 'lc.exe' (which is part of the .NET SDK) to compile the licenses into the assembly. These above steps are done automatically, if you drag and drop a TextControl
from the toolbox onto a form.
If you wrap TextControl in a user control assembly, the license information must be in the calling application (exe). It is not sufficient that the user control contains a reference to 'TX Text Control .NET for Windows Forms Component'. Licenses can be only
compiled into executable files. The following diagram shows the dependencies:
Projects will be updated automatically, if only one version of TX Text Control is installed. If you have several versions of TX Text Control installed, perform the following steps:
Load your Visual Studio .NET project.
Open the Add Reference... dialog box in the Project... menu.
Delete the reference to the current TX Text Control version.
Add a reference to the new version and close the dialog box.
Open the licenses.licx file of your project and change the version number of the referenced TX Text Control version to the version number of the newer TX Text Control version.
Close the Visual Studio .NET development environment.
Reopen the Visual Studio .NET development environment.
Rebuild your project using the Rebuild Solution menu item.
The following control could not be licensed: TXTextControl.TextControl
That means that Visual Studio could not find an appropriate license to validate the control. Generally, the license will be automatically included into the application and typically do not have to worry about licensing at all.
However, should you wish to do one of the following, it is necessary to take a closer look at licensing:
Create TextControl dynamically
Encapsulate TextControl in a user control
Update an existing project with a newer version of TX Text Control
Creating TextControl dynamically
Two significant steps are necessary in order to add the license of TX Text Control into an application. These steps must be performed when creating a TextControl instance dynamically:The project must include a reference to the 'TX Text Control .NET for Windows Forms Component'. To include the reference, select Add Reference... from the Project main
menu in Visual Studio. Browse for 'TX Text Control .NET for Windows Forms Component', select it and confirm by clicking OK.
A 'licenses.licx' file must exist in the 'Properties' folder (C#) or the 'My Project' folder (VB.NET). To build such a file, create a new text file in this folder and name it 'licenses.licx'. Open the file and add the following string:
TXTextControl.TextControl, TXTextControl, Version=13.0.500.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638
The 'licenses.licx' file is not a TX Text Control specific file, but a Visual Studio file that is used by 'lc.exe' (which is part of the .NET SDK) to compile the licenses into the assembly. These above steps are done automatically, if you drag and drop a TextControl
from the toolbox onto a form.
Encapsulating TextControl in a user control
If you wrap TextControl in a user control assembly, the license information must be in the calling application (exe). It is not sufficient that the user control contains a reference to 'TX Text Control .NET for Windows Forms Component'. Licenses can be only
compiled into executable files. The following diagram shows the dependencies:
Updating an existing project
Projects will be updated automatically, if only one version of TX Text Control is installed. If you have several versions of TX Text Control installed, perform the following steps:Load your Visual Studio .NET project.
Open the Add Reference... dialog box in the Project... menu.
Delete the reference to the current TX Text Control version.
Add a reference to the new version and close the dialog box.
Open the licenses.licx file of your project and change the version number of the referenced TX Text Control version to the version number of the newer TX Text Control version.
Close the Visual Studio .NET development environment.
Reopen the Visual Studio .NET development environment.
Rebuild your project using the Rebuild Solution menu item.
相关文章推荐
- The following classes could not be instantiated: - android.support.v7.widget.Toolbar 解决方法
- IIS出现The specified module could not be found解决方法
- This platform could not be created because a solution platform of the same name already exists解决方法
- ISAPI程序出现“The specified module could not be found”问题解决方法
- 解决Android Studio默认AppTheme主题找不到的问题 The following classes could not be found: - android.support.v
- The message received from the server could not be parsed 错误解决方法
- webstorm安装时遇到The JVM could not be started的解决方法
- Web服务器The specified module could not be found错误解决方法
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
- SqlServer2005 恢复数据库时出现Exclusive access could not be obtained because the database is in use 的解决方法
- IIS出现The specified module could not be found的解决方法
- IIS出现The specified module could not be found解决方法
- 关于解决android studio的"rendering problems The following classes could not be found android.support.v7
- IIS出现The specified module could not be found解决方法
- 关于在xcode中使用Versions时,比较文件出现The File Merge application could not be located. 解决方法
- ERROR:The requested URL could not be retrieved解决方法
- SqlServer2005 恢复数据库时出现Exclusive access could not be obtained because the database is in use 的解决方法
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
- mac上 go-delve 安装出现The specified item could not be found in the keychain 解决方法
- Roundcube 无法删除邮件错误解决方法>服务器错误UID COPY: The folder could not be found.