--- title: "Error Message: 'Variable LasernetPrinter Has not Been Declared'" slug: "error-message-variable-lasernetprinter-has-not-been-declared" description: "This article provides a solution to the following compilation error in AX 2012: 'Variable LasernetPrinter has not been declared'." tags: ["Lasernet Connector ", "Compiling", "Variable", "Error message", "AX2012"] updated: 2025-06-02T12:09:15Z published: 2025-06-02T12:09:15Z canonical: "kb.lasernetgroup.com/error-message-variable-lasernetprinter-has-not-been-declared" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Error Message: 'Variable LasernetPrinter Has not Been Declared' This article provides a solution to the following compilation error: > [!CAUTION] > Error > > Variable LasernetPrinter has not been declared. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-1LN22I4V.png) This compile error occurs due to the DLL files either: - Being unavailable on the AOS server - Missing on the AX client. Therefore, DLL files must be deployed to the AOS server and AX client. > [!NOTE] > Info > > If AX throws an error when it tries to deploy the DLL files to the AOS, the system will create an entry in the event log. > > In the following example, the system could not save the file **LasernetPrinter.Data.dll** to the AOS servers Bin folder (C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\): > > ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-DXJITJ4R.png) ### Resolution The following DLL files need to be in the AOS server and client Bin folder in order to compile correctly: - LasernetEvent.dll - LasernetPrinter.dll - LasernetPrinter.Data.dll If this does not work, you can try to manually deploy it from the AX client. Follow these steps to do so: 1. Right-click **AX client** and click **Run as administrator**. 2. Navigate to **Lasernet** > **Setup** > **Resource deployment**. 3. Click **Deploy resources**, and then select **Deploy resources**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-K909JZW0.png) If this fails, you will get an Infolog. The following image shows an example of DLL files missing from the AOS server: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-4LICD9PI.png) If all this fails, you can try to copy the DLL files manually. > [!WARNING] > Warning > > This is only recommended for testing purposes. 1. Right-click the **AX client** and click **Run as administrator**. 2. Navigate to **Lasernet** > **Setup** > **Resource deployment**. 3. Select the DLL files one by one and click the **Download resource** button. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-4AR76H4O.png) 1. Stop the AX client and the AOS server. 2. Copy the DLL files into their Bin folders, for instance: `C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\ `and `C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin`. Problems with the DLL files normally occur due to missing user rights to the Bin folder, for example, on the client if you are not a local admin.