Home > Mobile >  Visual Studio 22 EXE missing DLL
Visual Studio 22 EXE missing DLL

Time:04-26

I reviewed multiple responses from this platform about this new issue that I am experiencing and was wondering if there was a better way.

I created a Console application, utilizing DOTNET Framework 4.8 in the latest version of Visual Studio 2022. I conducted a Clean and rebuild of the Console App to create its EXE file. Then, I moved the generated EXE from the Release BIN folder to another folder on my Server for production. However, when I called and executed the EXE, I get an error that supporting DLLs were missing. I am using SendGrid to send emails from within the EXE and did install the Nuget Package to support the SendGrid functionalities.

In order for the EXE to work, I had to also drag all the generated DLLs from the release folder. This was never the case before.

How do I compile the EXE so it works as is into one single file?

CodePudding user response:

Thank you for all of your answers and support. After reading all of them, the Publish recommendation is the winner. I was able to get just one exe file that I then transferred to my Server and it runs without issues on its own. I am not being asked to provide the SendGrid DLL or any other requests.

The pic below depicts my Publish Settings for net6.0. As a supporting document for this process, I also found the following article: enter image description here

  • Related