Apose.Total找不到许可证文件

时间:2014-05-22 12:37:13

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

我目前在我的一个库中使用Aspose Total,当我将这个库导入到一个应用程序中时,它可以很好地嵌入我的许可证。

然而,当我将这个库从调试版转换为发布版时,它会在运行应用程序时出现错误,说“找不到Aspose.Total.lic'

是否有任何有Aspose经验的人可能知道这个问题。

我包括我的Projbuild Set。

  <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>

3 个答案:

答案 0 :(得分:3)

确保将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

答案 1 :(得分:0)

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

答案 2 :(得分:0)

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

enter image description here

选择构建操作以 内容 ,然后复制到输出目录-> 始终复制/如果更新则复制