0

I am trying to build a simple solution but always get the following error:

Severity Code Description Project File Line Suppression State Error The assembly 'ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7' is not registered for COM Interop. Please register it with regasm.exe /tlb. ASCOM.ML16200.DeviceClass1
Error The assembly "C:\Users\tonyb\source\repos\ASCOM.ML16200.DeviceClass1\ASCOM.ML16200.DeviceClass1\bin\Debug\ASCOM.ML16200.Camera.dll" could not be converted to a type library. Type library exporter encountered an error while processing 'ASCOM.ML16200.Camera, ASCOM.ML16200.Camera'. Error: Error loading type library/DLL. ASCOM.ML16200.DeviceClass1

I've tried using the following command within Visual Studio Powershell, but it always fails:

PS C:\Users\tonyb\source\repos\ASCOM.ML16200.DeviceClass1> regasm.exe ASCOM.ML16200.Camera.dll /tlb Microsoft .NET Framework Assembly Registration Utility version 4.8.4084.0 for Microsoft .NET Framework version 4.8.4084.0 Copyright (C) Microsoft Corporation. All rights reserved.

RegAsm : error RA0000 : Unable to locate input assembly 'ASCOM.ML16200.Camera.dll' or one of its dependencies. PS C:\Users\tonyb\source\repos\ASCOM.ML16200.DeviceClass1>

Can anyone please tell me how to properly register this .dll?

Anthony
  • 41
  • 2

1 Answers1

0

I can assume that this will help you:

1. Run Visual Studio as an administrator. And try to rebuild the project, then start debugging (so Visual Studio will try to register the .dll file). This method worked for me on Visual Studio 2015.

But when developing a driver for Focuser in Visual Studio 2019, this method did not work for me.

My screenshot Focuser error registration

2. Registering ASCOM .dll file in manual mode:

My screenshot example, manual register

  • Now you can start debugging the .dll file.

P.S. Do not forget, you cannot debug .dll files directly, use other applications for this. For example ASCOM provides ready-made templates for such applications