Visual Studio 2008 - Problems Publishing C # Console Application

I have a C # console application written in Visual Studio 2008. Usually I just build the application and then copy the files from the "Release" folder, but this time trying to do it "right" by publishing the application.

I went through the Publishing Wizard and ended up with the Setup.exe file in the specified folder. When you run this setup file on another computer, the installation fails and indicates through an error message that:

Cannot download the application. The Application is missing required files...

When I select the "details" button, the error log shows that the program tried to load files from the latest version directory (for example, 1_0_0_4).

What am I doing wrong? (except fatigue ...)
Show that I am deactivating the auto-increase version?

+2


source to share


3 answers


Unless you have a compelling reason to do so, I will unsubscribe and revert to installing XCopy. (And by Walid, I mean something other than someone telling you that this is the โ€œrightโ€ way to do it.) I base this advice on the following arguments:

  • We've been using ClickOnce for all of our WinForms applications for a while, but it ended up being more of a problem than it was worth. First, you need to deal with security certificates. We had problems when we replaced the server with a new name with a different name, then we had problems when we replaced our development machines, etc.
  • You said it was a console application. ClickOnce publishing seems like overkill for a simple console application, unless there are third-party dependencies to include in your installation.


Don't get me wrong, I liked using ClickOnce for the convenience of posting updates there, and we still use it when it's the best option. However, in your situation, it seems to me that an XCopy deployment should be sufficient for a simple console application.

+9


source


Without knowing what you choose from the wizard, the web, or the CD, the setup.exe file should be able to reference the installation files. If you are using the CD method, you will see version directories in the output directory, eg. 1_0_0_4

where each version of your application is saved. I agree with @David_Stratton, and if you really don't need to use one-click publishing, don't. Just use xcopy (robocopy), zipfiles, etc. This will significantly reduce your stress levels on the road.



+1


source


Everything David Stratton said is correct. ClickOnce is overwhelmed with what you are trying to do and publishing through Visual Studio has always given me headaches.

I would recommend taking a look at NSIS if you want to create an installer for others. It is relatively easy to create full installers that simply grab files from your directory /Release/

, with lots of code examples to make the installer work quickly. Once you have a working script, your installers are as easy as right clicking and compiling.

0


source







All Articles