Are you using .net framework or .net core?
If it is .net core, please try the following steps:
- Right-click on the project and select Publish.
- Choose the location you want to deploy, as an example, I choose the folder, and then next->finish.
- Click Edit, set Deployment Mode to Self-contained, expand File publish options, and select Produce single file.
If the response is helpful, please click "Accept Answer" and upvote it.
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.