ASP.NET 中的 licences.licx 文件的用途是什么?什么时候编辑的?
What is the purpose of the licences.licx file in ASP.NET? When is it edited?
我想知道 ASP.NET 项目中的 licenses.licx 文件的用途是什么。我可以在我的提交历史记录中看到,在我上次提交到 licenses.licx 文件时添加了以下行:
Telerik.Web.UI.RadGrid, Telerik.Web.UI, Version=2019.1.115.45, Culture=neutral, PublicKeyToken=...
Telerik.Web.UI.RadAsyncUpload, Telerik.Web.UI, Version=2019.1.115.45, Culture=neutral, PublicKeyToken=...
另一位开发人员问我添加的这两行代码对项目有何不同。
那么 licences.licx 文件的用途是什么?为什么会自动添加这两行?我已经通过谷歌搜索了解了它,但我还没有真正理解它的目的是什么。
谢谢!
来自 EmptyLicensesLicx 项目自述文件:
When you are developing .NET applications that use third-party controls such as the ones that you can buy from Telerik or DevExpress for example, a mysterious file called licenses.licx
appears inside the Properties
folder of your C# project (Or My Project
folder if you're using VB .NET).
This means that the third-party control uses the licensing model provided by the .NET Framework for licensing components and controls.
This file is a transitional file generated (and modified) by Visual Studio that participates in license checking. In design mode, Visual Studio uses this file to make a note of every licensed control you use in your design. When you then build your application, Visual Studio reads this licenses.licx
file and for every control mentioned there, loads the relevant assembly and runs the license code in that assembly to see if the assembly is properly licensed (that is, that the product to which it belongs has been properly installed on that machine). If everything checks out, Visual Studio embeds the license key into the executable. If it doesn't, you'll get weird error messages about the control not being licensed (my favorite is "Could not transform licenses file 'licenses.licx' into a binary resource.
").
The licenses.licx
is a file automatically added to your project (if you cannot see it there, click Show All Files). Visual Studio uses a program called lc.exe
to compile the licenses into embedded resources in your application, and when things go wrong with the license compiling process, you might see error messages referencing this executable.
Here's an example of a line in a licenses.licx
file:
DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v15.2.UI, Version=15.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraMap.MapControl, DevExpress.XtraMap.v15.2, Version=15.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
Infragistics.Win.Misc.UltraButton, Infragistics2.Win.Misc.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb
Infragistics.Win.Misc.UltraGroupBox, Infragistics2.Win.Misc.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb
Each line contains a reference to a type that is contained in an assembly, in a comma delimited list format. The first value is the full name of the class, the second is the assembly that contains the class, and the other values are part of the assembly's identity.
我想知道 ASP.NET 项目中的 licenses.licx 文件的用途是什么。我可以在我的提交历史记录中看到,在我上次提交到 licenses.licx 文件时添加了以下行:
Telerik.Web.UI.RadGrid, Telerik.Web.UI, Version=2019.1.115.45, Culture=neutral, PublicKeyToken=...
Telerik.Web.UI.RadAsyncUpload, Telerik.Web.UI, Version=2019.1.115.45, Culture=neutral, PublicKeyToken=...
另一位开发人员问我添加的这两行代码对项目有何不同。
那么 licences.licx 文件的用途是什么?为什么会自动添加这两行?我已经通过谷歌搜索了解了它,但我还没有真正理解它的目的是什么。
谢谢!
来自 EmptyLicensesLicx 项目自述文件:
When you are developing .NET applications that use third-party controls such as the ones that you can buy from Telerik or DevExpress for example, a mysterious file called
licenses.licx
appears inside theProperties
folder of your C# project (OrMy Project
folder if you're using VB .NET).This means that the third-party control uses the licensing model provided by the .NET Framework for licensing components and controls.
This file is a transitional file generated (and modified) by Visual Studio that participates in license checking. In design mode, Visual Studio uses this file to make a note of every licensed control you use in your design. When you then build your application, Visual Studio reads this
licenses.licx
file and for every control mentioned there, loads the relevant assembly and runs the license code in that assembly to see if the assembly is properly licensed (that is, that the product to which it belongs has been properly installed on that machine). If everything checks out, Visual Studio embeds the license key into the executable. If it doesn't, you'll get weird error messages about the control not being licensed (my favorite is "Could not transform licenses file 'licenses.licx' into a binary resource.
").The
licenses.licx
is a file automatically added to your project (if you cannot see it there, click Show All Files). Visual Studio uses a program calledlc.exe
to compile the licenses into embedded resources in your application, and when things go wrong with the license compiling process, you might see error messages referencing this executable.Here's an example of a line in a
licenses.licx
file:DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v15.2.UI, Version=15.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraMap.MapControl, DevExpress.XtraMap.v15.2, Version=15.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a Infragistics.Win.Misc.UltraButton, Infragistics2.Win.Misc.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb Infragistics.Win.Misc.UltraGroupBox, Infragistics2.Win.Misc.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb
Each line contains a reference to a type that is contained in an assembly, in a comma delimited list format. The first value is the full name of the class, the second is the assembly that contains the class, and the other values are part of the assembly's identity.