‘Object reference not set to an instance’
When adding a .NET barcode control (or .NET DLL) to a form, the following errors may occur:
- Object reference not set to an instance of an object.
- The .NET assembly ‘????.dll’ could not be found.
- Cannot Add Barcode Control to Toolbox or Form in Visual Studio .NET
If the barcode control (or .NET DLL) cannot be added to the project, make sure the proper control is used for the type of application.
- The ASP.NET Web Server Control only works in Web Applications.
- The .NET Windows Forms Control only works in Local Windows Applications.
If the proper control is used in the appropriate application and it is still not functioning, delete all files from %temp%, remove the control from the project and reinstall the control again.