I wrote a fairly simple application with C#/.NET and can't figure out a good way to publish it. It's a sort of a "tool" that users would only run once, or run every few months. Because of this, I'm hoping that there is a way I could deploy it where it wouldn't need installing to run (it could just be run by double clicking an EXE file straight after downloading).
However, it still needs (somehow) to include the correct version of .NET, libraries, etc. so it will run correctly. I know this is included when using ClickOnce, but that still installs the application onto the user's computer.
Is there a way this can be done?
EDIT - \bin\Debug
myAppName.application
myAppName.exe
myAppName.exe.config
myAppName.exe.manifest
myAppName.pdb
myAppName.vshost.application
myAppName.vshost.exe
myAppName.vshost.exe.config
myAppName.vshost.exe.manifest
extraLibrary.dll
as well as two folders
app.publish
Resources
It is possible and is deceptively easy:
bin\Debug
folder below the project file (.csproj).app.publish
folder (they are not needed), and the .pdb files unless you foresee debugging directly on your user's system (for example, by remote control)), and provide it to the users.An added advantage is that, as a ClickOnce application, it does not require administrative privileges to run (if your application follows the normal guidelines for which folders to use for application data, etc.).
As for .NET, you can check for the minimum required version of .NET being installed (or at all) in the application (most users will already have it installed) and present a dialog with a link to the download page on the Microsoft website (or point to one of your pages that could redirect to the Microsoft page - this makes it more robust if the Microsoft URL change). As it is a small utility, you could target .NET 2.0 to reduce the probability of a user to have to install .NET.
It works. We use this method during development and test to avoid having to constantly uninstall and install the application and still being quite close to how the final application will run.