Search code examples
c#.netvisual-studioreference.net-5

Publishing .NET 5 Project including COM References


I have a .NET 5 Project running. I have added a COM Reference to the Zebra Scanner SDK. The SDK is built for the .Net Framework but I want it to run on .NET 5. I can build the project on my machine, as the SDK is installed on my machine.

The problem now is, that I want to build the project including the reference. So I can easily copy the generated .dll and .exe files to a new computer without needing to install the Scanner SDK there.

Is there a way to achieve this? Maybe to create a dll from the COM Reference and use that?

SDK Info

Scanner SDK Sample Projects


Solution

  • I found a working solution for the Zebra Scanner SDK. In this case you can identify the SDK location and there find the sample projects. They contain a InterOp.CoreScanner.dll.

    Just copy this file to your project folder, use it as a reference and you are good to go.