我们有一个用VS2005创建的网站
最近,我们将网站升级到了2.0框架的VS2008。
当编译网站时,发生编译错误,即Licenses.licx文件没有编译,如果它编译了,那么它将重新生成AppLicenses.dll。
在包含一个类和一个命名空间(即OSADirectLicensing.OSADirectLicensedClass、OSADirectLicensing)的licensing.licx文件中。
编译错误如下:
Error 1 C:\Program Files\Sharp\Sharp Developer Tools\OSA SDK\Samples\DirectOSA\ExternalAuthority\licenses.licx: Could not transform licenses file into a binary resource. (1) : error LC0004 : Exception occurred creating type 'OSADirectLicensing.OSADirectLicensedClass, OSADirectLicensing, Version=1.0.4006.31768, Culture=neutral, PublicKeyToken=null System.ComponentModel.LicenseException: Invalid License
at System.ComponentModel.LicenseManager.CreateWithContext(Type type, LicenseContext creationContext, Object[] args)
at System.ComponentModel.LicenseManager.CreateWithContext(Type type, LicenseContext creationContext)
at System.Tools.LicenseCompiler.GenerateLicenses(String fileContents, String targetPE, ITypeResolutionService resolver, DesigntimeLicenseContext ctx)' .VS2008是否支持licenses.licx?
我们不应该从网站上删除此文件。
我们该如何解决这个问题呢?
发布于 2011-01-17 17:22:08
删除licenses.licx文件并重新编译项目。
这应该可以解决问题。
祝好运!
发布于 2016-11-25 06:38:09
安装EmptyLicensesLicx nuget包,在编译之前,它将在您的项目中生成一个空的Licenses.licx (这就是它工作所需的全部)。
https://stackoverflow.com/questions/4643690
复制相似问题