Reputation: 218
I am developing a small C# application in Visual Studio 2012. The project is a console app using .NET 4.5. I am fairly new to VS2012 and C# development - my background is with HTML/XML & JavaScript, but after a lot of trial and error (and Google searches), I have the application working as expected. However, I have a question regarding the resulting project files.
When I build the application for release, numerous files are placed in the BIN folder with the actual EXE you run. These files have names such as the following:
The folder also includes the two DLL files used as resource files, plus some additional files named like above, but using the DLL file name instead of 'AppName'. Only three of the files are updated each time I build the app, so I'm wondering if all of them are needed. If possible, I'd like to streamline the number of files being copied to production.
Are these additional files required for the EXE to work, and if so, can they be packaged into the EXE itself to streamline the deployment process?
The application in question references two DLL files included with Office 2016 products. I ticked off the option to embed references, which is apparently why it copied the DLL files to the project folder.
Currently, my deployment process is to copy all files (the *.exe as well as the files mentioned above) from the project's BIN folder to a network location that users have READ access to. The EXE is then called the client machines via UNC path.
Ideally, my goal would be to streamline the last step so that only the EXE appears in the user-accessible network location.
Upvotes: 2
Views: 1774
Reputation: 5858
You will need the AppName.exe file and any dependant DLLs that it references. I am not sure what resources you are using, but given they exist in a DLL that your EXE uses then this needs to be deployed onto the target machine. You can find more info here:
NOTE: It may be the case where these DLLs are already deployed to your clients PCs by Office and they can be accessed in the GAC. Given the question, you might want to update to include this information.
The .vshost file is used for Visual Studio debugging and does not need to be deployed. You may wish to deploy the AppName.exe.config file if it has runtime information required to deviate from standard .NET Configuration or again, there are app settings included with your application. More info here.
As for only having a .exe at the end of compilation, you may want to check out ILMerge which already has an answer here, although I don't know how it would work with resources - what ever resources you are using.
Upvotes: 1