簡體   English   中英

Apose.Total 找不到許可證文件

[英]Apose.Total cannot find license file

我目前在我的一個庫中使用 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>

確保將 lic.Embedded 設置為 true,如下面的代碼片段所示:

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

另一個原因可能是由於許可證在輸出文件夾中不可用右鍵單擊 Aspose.lic 文件並選擇屬性

在此處輸入圖片說明

選擇 Build action to Content和 Copy to output directory -->總是復制/如果更新則復制

我在 Aspose 擔任社交媒體開發人員。 此處查看嵌入許可證的詳細信息。 如果您仍然遇到任何問題,請分享您正在使用的 Aspose API 版本和環境詳細信息,以便我們進一步測試。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM