Adding licensing to Visual Studio solution

SeanPress 206 Reputation points
2023-05-15T21:48:54.77+00:00

Hi,

I have created a Microsoft Forms application in VB with Visual Studio 2019 community & am trying to incorporate licensing from a 3rd party provider. The developers software has provided me with a DLL file, an exe file & an xml file for incorporation into my application.

I have used the Project/Add Existing Item function to copy the files into my solution, when I build & debug my solution in Visual Studio everything works perfectly well. The files appear in the application files in the the publishing wizard, however, when I publish the application & run the setup, the application installs but fails to open, an error message pops up stating that a required file is missing. (Unfortunately it doesn’t state which file).

I have done my best find some answers in the VS manuals but am not confident I know what to do. I believe I should have incorporated the files as Custom Actions but I see there is a number of other methods for incorporating external files, can anyone tell me if the custom actions route is correct & preferable provide a simple step by step guide on how to do it?

I have very limited capabilities and any help would be greatly appreciated.

Regards

Sean

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,908 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jiale Xue - MSFT 47,581 Reputation points Microsoft Vendor
    2023-05-16T03:15:03.58+00:00

    Hi @SeanPress , Welcome to Microsoft Q&A.

    About using the provider's license: Project->Properties->Signing

    Sign according to your needs: mostly use Sign the ClickOnce manifests->Select From File

    User's image

    You have several ways to copy files to the publish folder.

    1. Project->Properties->Publish->Install Mode and Settings->Application Files->Show all files

    Check to see if all required resources are Included.

    User's image

    1. xxx.file->Properties->Advanced->Copy to output Directory->Copy if newer

    User's image

    1. In the Post Build Event Command Line field, enter the xcopy command to perform a file copy operation.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.