Infragistics 许可证文件将自身添加到项目中吗?

发布于 2024-09-18 18:21:38 字数 568 浏览 1 评论 0原文

我在 VB.NET .NET 2 中有一个解决方案,

在整个应用程序中使用 Infragistics 组件。

有一天决定向我们的表单添加浮动工具栏支持。

我们的表单继承了一种基本表单 - BaseForm。该基本表单用于解决方案中的多个项目。

因此,在 BaseForm 上添加了 UltraToolbarsManager

从那时起,一场噩梦开始了:licenses.licx开始在设计器中打开的每个表单上创建并将其自身添加到项目中。...

licenses.licx 包含:

Infragistics.Win.UltraWinToolbars.UltraToolbarsManager, Infragistics2.Win.UltraWinToolbars.v6.3, 版本=6.3.20063.53,文化=中立, PublicKeyToken=7dd5c3163f2cd0cb

该怎么办?为什么这个许可证文件会出现在继承的表单中?

I have a solution in VB.NET .NET 2

Use Infragistics components all over the application.

One day decided to add floating toolbar support to our Forms.

Our forms inherit one base form - BaseForm. This base form is used in multiple projects in the solution.

So, on the BaseForm was added a UltraToolbarsManager.

Since, a nightmare began: the licenses.licx started to create and add itself to the project on every form opened in designer....

licenses.licx contains:

Infragistics.Win.UltraWinToolbars.UltraToolbarsManager,
Infragistics2.Win.UltraWinToolbars.v6.3,
Version=6.3.20063.53, Culture=neutral,
PublicKeyToken=7dd5c3163f2cd0cb

What to do? Why does this license file appear in the inherited forms?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

倚栏听风 2024-09-25 18:21:38

仅当您将控件添加到表单时才会创建许可证文件。如果您打开包含现有 Infragistics 控件的表单,它不会执行任何操作。

如果您在添加控件后删除了 license.licx 文件中的所有行,则一切都应该可以正常工作。

我们的环境有一个已签入的 license.licx 文件,该文件为空,并且我们使源代码管理忽略许可证文件,因此开发人员计算机上的任何更改都不会进入构建计算机或其他任何地方。

The license file only gets created when you add a control to the form. It won't do anything if you open a form with existing Infragistics controls.

If you delete all the lines in the license.licx file after adding the control everything should work.

Our environment has a checked in license.licx file that is empty and we make source control ignore the license file so any changes on a developer machine won't make it into the build machine or anywhere elsewhere.

往事风中埋 2024-09-25 18:21:38

网络上有大量有关 licenses.licx 文件的信息(以及它经常引发的相关哀号和咬牙切齿的信息)。

基本上,此文件存储参与 .NET 组件许可方案的设计器中加载的每个程序集的强名称(一种简单的内置机制,组件开发人员可以利用该机制来确定开发人员是否使用许可或演示) / 其组件的精简版)。

每当设计者加载此类程序集时,它都会将该程序集的强名称添加到导致加载的项目中。由于您将工具栏添加到了基本表单中,因此打开继承的表单将导致加载该程序集,从而将该行添加到文件中(并在必要时创建它,这就是您所看到的)。

不幸的是,对于它所产生的问题,我们无能为力。你有什么麻烦吗?

There's a load of information on the licenses.licx file (and the associated wailing and gnashing of teeth that it often inspires) across the web.

Basically, this file stores the strong name of each assembly that gets loaded in the designer that participates in .NET's component licensing scheme (a simple built-in mechanism that component developers can take advantage of in determining if the developer is using a licensed or demonstration/lite version of their components).

Whenever the designer loads such an assembly, it adds the strong name of the assembly to the project that caused the load. Since you added the toolbar to your base form, opening an inherited form will cause that assembly to load, which adds the line to the file (and creates it if necessary, which is what you're seeing).

Unfortunately, there's not a lot that can be done about the issues it creates. What trouble are you having with it?

关于从前 2024-09-25 18:21:38

我发现解决此问题的最佳方法是从源代码管理中的所有解决方案中删除所有许可证.licx 文件,然后当您在窗体上实例化控件时,让 Visual Studio 在每台计算机上本地重新创建该文件。该文件是在您的解决方案目录中创建的,但未明确添加到源代码管理中,并且永远不应该添加到源代码管理中。

The best way I have found to get around this is to delete all licenses.licx files from all solutions in source control and then let Visual Studio recreate the file locally on every machine when you instance a control on the form. This file is created in your solution directory but not explicitly added to source control and should never be.

杀お生予夺 2024-09-25 18:21:38

这是手动执行此操作的方法,这相对容易做到:

  1. 将旧项目中的 licx 文件复制到新项目的“我的项目”文件夹中。如果“My Project”文件夹不存在,请创建它。

  2. 在文本编辑器中打开 vbproj 文件,找到 Resources.resx 部分,如下所示:

<ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
        <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
        <LastGenOutput>Resources.Designer.vb</LastGenOutput>
        <CustomToolNamespace>My.Resources</CustomToolNamespace>
        <SubType>Designer</SubType>
    </EmbeddedResource>
</ItemGroup>

并将其更改为:

<ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
        <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
        <LastGenOutput>Resources.Designer.vb</LastGenOutput>
        <CustomToolNamespace>My.Resources</CustomToolNamespace>
        <SubType>Designer</SubType>
    </EmbeddedResource>
   <EmbeddedResource Include="My Project\licenses.licx" />
</ItemGroup>

3. 在 Visual Studio 中重新打开该项目。

This is how you do this manually, which is relatively easy to do:

  1. Copy the licx file from the old project, into the "My Project" folder of your new project. If the "My Project" folder doesn't exist, create it.

  2. Open the vbproj file in a text editor, and find the Resources.resx section, which will look like this:

<ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
        <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
        <LastGenOutput>Resources.Designer.vb</LastGenOutput>
        <CustomToolNamespace>My.Resources</CustomToolNamespace>
        <SubType>Designer</SubType>
    </EmbeddedResource>
</ItemGroup>

And change it to this:

<ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
        <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
        <LastGenOutput>Resources.Designer.vb</LastGenOutput>
        <CustomToolNamespace>My.Resources</CustomToolNamespace>
        <SubType>Designer</SubType>
    </EmbeddedResource>
   <EmbeddedResource Include="My Project\licenses.licx" />
</ItemGroup>

3. Reopen the project in Visual Studio.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文