Hi,
The release build of my DLL prompted it cannot locate “Aspose.Total.lic” file… The debug version showing no such problem.
Any idea?
MyBass
Hi Pei Ying,
// initialize license object<o:p></o:p>
Aspose.Pdf.License lic = new Aspose.Pdf.License();
// Name of license fie. Note that WindowsFormsApplication1 is default namespace of project
lic.SetLicense("WindowsFormsApplication1.Aspose.Total.Product.Family.lic");
// embed the license file with solution
lic.Embedded=true;
Can you please share further details regarding your working environment i.e. Aspose.Pdf for .NET version, OS version, OS architecture (X64 or X86), .NET Framework version, VisualStudio version etc. We are sorry for your inconvenience.
Hi,
I tested using Windows 7 Professional 64 bit. Due to find out the cause, I have tested using Windows Server 2003 R2 as well. The strange thing is Words, Excel, and Mails do not have such issue. They all in the same assembly. Please refer to the pictures I captured.
OS: Windows7 64 bits.
VS Studio 2010 Version 10.0.40219.1 SP1Rel
.NET Frameword Version 4.0.30319 SP1Rel
Aspose.Pdf - runtime version v4.0.30319
Hi Pei Ying,
Thanks for sharing the details.
I have again tested the scenario using Aspose.Pdf for .NET 7.0.0 in a VisualStudio 2010 project where I have selected the target platform as .NET 4.0 and I have included Aspose.pdf.dll from net4.0 folder present under <Aspose.Pdf_Install_Directory\bin> and I am unable to notice any problem. When using license file as an embedded resource, did you try to initialize the license using following code line.
[C#]
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>
<![endif]–>
Aspose.Pdf.License lic = new Aspose.Pdf.License();
// MergedAPI is default namespace of project
lic.SetLicense("MergedAPI.Aspose.Total.Product.Family.lic");
lic.Embedded = true;
In case the problem still persists, can you please share the license file so that we can test the scenario at our end. Please visit the following link for instructions on How to send a license?
Hi Team,
- If you are developing an ASP.NET application, you can call License.SetLicense from the Global.asax.cs (Global.asax.vb) file, in the Application_Start protected method. It is called once when the application starts. Do not call License.SetLicense from within Page_Load methods since it means the license will be loaded every time a web page is loaded.
- If you are developing a Windows Forms or console application, call License.SetLicense in your startup code, before using Aspose.Pdf for .NET classes.
- If you are developing a class library, you can call License.SetLicense from a static constructor of your class that uses Aspose.Pdf for .NET. The static constructor will execute before an instance of your class is created making sure Aspose.PDF for .NET license is properly set.
Best Regards,