Search code examples
clickonceterminal-services

ClickOnce deployment for Terminal Service Recieving COM Error


I've deployed a desktop application utilizing 3rd party dll's to a test terminal server in order to report its viablity. In my testing I've received this error:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in General Purpose.dll

Additional information: Creating an instance of the COM component with CLSID {8EB296F1-6C46-4BC1-9F00-B49F14B57DB8} from the IClassFactory failed due to the following error: 800a0035.

It occurs when a new third-party class is created (one that is vital to the application). As far as I can tell this is the only third-party class having such issues, but the only one in this DLL.

The application deploys properly using ClickOnce for a normal desktop to use, but will not work for the TS session or the server console.

All the DLLs are set as "Copy Local" and I've confirmed they were copied into the users local settings "Apps\2.0\crazylongnamehere" folder.

I've chosen to go the publish route (over MSI) since we currently have thick clients and the thin clients will be integrated slowly over time.


Solution

  • After playing around with copying referenced files to the output location, I finally got my app to work on TS.

    The solution was to add the referenced dll's to the project as linked items and changed the properties to:

    • Build Action: Content
    • Copy to Output Directory: Copy Always

    Once both these were updated it worked properly.