【问题标题】:Upgrading website from VS2005(2.0 Framework) to VS2008(2.0 Framework)将网站从VS2005(2.0 Framework)升级到VS2008(2.0 Framework)
【发布时间】:2011-01-10 04:28:35
【问题描述】:

我们有一个在 VS2005 中创建的网站

最近我们将网站升级到了带有2.0框架的VS2008。

在编译网站时发生编译错误,即 Licenses.licx 文件未编译,如果它编译将重现 AppLicenses.dll。

在licensing.licx 文件中包含一个类和一个命名空间(即OSADirectLicensing.OSADirectLicensedClass、OSADirectLicensing)。

编译错误如下:

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?

我们不应该从网站上删除这个文件。

我们如何解决这个问题?

【问题讨论】:

    标签: visual-studio-2008 licenses.licx emptylicenseslicx licenseslicx


    【解决方案1】:

    删除 licenses.licx 文件并重新编译项目。

    这应该可以解决问题。

    祝你好运!

    【讨论】:

      【解决方案2】:

      安装EmptyLicensesLicx nuget 包,它会在编译之前在你的项目中生成一个空的Licenses.licx(这是你工作所需要的一切)。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2010-11-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多