【问题标题】:Apose.Total cannot find license fileApose.Total 找不到许可证文件
【发布时间】:2014-05-22 12:37:12
【问题描述】:

我目前在我的一个库中使用 Aspose Total,当我将此库导入应用程序时,它运行良好,因为我的许可证已嵌入。

但是,当我将此库从调试切换到发布时,运行应用程序时会出现错误提示“找不到 Aspose.Total.lic”

有没有使用 Aspose 经验的人可能知道这个问题。

我包括我的 Projbuild 集。

  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{B6C9F754-6764-4D2A-B1A4-C0047152BE33}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>NitecCore</RootNamespace>
    <AssemblyName>NitecCore</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <TargetFrameworkProfile>
    </TargetFrameworkProfile>
    <FileAlignment>512</FileAlignment>
    <SccProjectName>SAK</SccProjectName>
    <SccLocalPath>SAK</SccLocalPath>
    <SccAuxPath>SAK</SccAuxPath>
    <SccProvider>SAK</SccProvider>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>TRACE;DEBUG;CSHARP30</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE;CSHARP30;  </DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
  </PropertyGroup>

【问题讨论】:

    标签: c# asp.net .net dll aspose


    【解决方案1】:

    确保将 lic.Embedded 设置为 true,如下面的代码 sn-p:

    Aspose.Pdf.License lic = new Aspose.Pdf.License(); 
    lic.SetLicense("MergedAPI.Aspose.Total.Product.Family.lic");
    lic.Embedded = true;
    

    参考请查看http://www.aspose.com/community/forums/thread/396532/aspose-pdf-cannot-find-the-embedded-license-file.aspx

    【讨论】:

    • 是的,我已经这样做了,但是它适用于调试模式,但不适用于发布
    • 分享您的环境详细信息以及您最终使用的 API 版本。
    【解决方案2】:

    另一个原因可能是许可证在输出文件夹中不可用 右键单击 Aspose.lic 文件并选择属性

    选择构建操作到内容并复制到输出目录--> 总是复制/如果更新则复制

    【讨论】:

      【解决方案3】:

      我在 Aspose 担任社交媒体开发人员。检查嵌入许可证的详细信息here。如果您仍然遇到任何问题,请分享您正在使用的 Aspose API 版本和环境详细信息,以便我们进一步测试。

      【讨论】:

      • 我知道它很旧了,可能你不再在那里工作了但是:为什么 Aspose 论坛要求你登录才能查看帖子?!最烦人的用户体验;如果你想发帖,你应该只需要登录。
      猜你喜欢
      • 2021-05-30
      • 1970-01-01
      • 2021-11-20
      • 2021-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-01
      • 1970-01-01
      相关资源
      最近更新 更多