Could not register with the current version of Aspose.Drawing 23.6.0.0

When I tried to register this product with the trial license, I’ve got an error saying: “Drawing does not exist in the namespace Aspose.”
Even though I did putting this line at the beginning:
using Aspose.Drawing;

Here is the code that I’ve used to register the product:
var license = new Aspose.Drawing.License();
license.SetLicense(“Aspose.Drawing.lic”);

The version I’ve used is Aspose.Drawing.dll version 23.6.0.0

@lionking2k,

You are doing wrong or your code is not right. Please instantiate License object from System.Drawing.AsposeDrawing namepsace. I tested your scenario/case with latest Aspose.Drawing for .NET v23.6 and a valid license using the following sample code and it works as expected:
e.g.
Sample code:

...
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
...
var license = new System.Drawing.AsposeDrawing.License();
license.SetLicense("Aspose.Drawing.lic");         
System.Console.WriteLine("License set successfully.");

Bitmap oImage = new Bitmap(548, 950, System.Drawing.Imaging.PixelFormat.Gdi);
Graphics g = Graphics.FromImage(oImage);
g.SmoothingMode = SmoothingMode.HighQuality;
g.Clear(Color.Red);
oImage.Save(@"g:\\test2\\bitmap1.png");

We recommend you to kindly see the document on Licensing for your complete reference.

Let us know if you still find any issue.

1 Like

Thank you for quick reply. Yes it works like a charm now! :smiling_face_with_three_hearts:

@lionking2k,

It is nice to know that your issue is sorted out by the suggested code segment. Feel free to write us back if you have further queries or comments.

1 Like