我当前在我的一个库中使用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
关于c# - Apose.Total找不到许可证文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23807009/