deployed clickonce application not working in client system - c#

I created a c# windows application and deployed it by clicking publish(clickonce). now 2 setup files and a Application folder are generated. when the setup file is installed in one system in which it was created, it is working properly. but when i copy the files to another system and install, when i run the icon nothing happens. what to do?also how to add mdf or ldf files to the setup file?

The idea with publishing a ClickOnce application is not to copy it elsewhere afterwards but to execute the installer from the publish location.
Otherwise you'll need to change the app location in the manifest using MageUI for instance.

Related

Install console application where the installer wants

I have published a console application and produced 3 items :
Application Files
Application
setup.exe
First off, am I correct in saying I can run the application directly from here without installing ? And will this use the config settings from the application files directory ?
Second, if I run the setup.exe, I don't have the ability to choose the install location. Is it possible to set this up ?
This deployment technology is called ClickOnce. You can read more about it and how it works on MSDN: https://msdn.microsoft.com/en-us/library/t71a733d.aspx
First off, am I correct in saying I can run the application directly from here without installing ?
The application is indeed installed when you run setup.exe or *.application.
And will this use the config settings from the application files directory ?
Yes. The running application will use the config file in the folder of the current version of the application.
Second, if I run the setup.exe, I don't have the ability to choose the install location. Is it possible to set this up ?
No. You can't change the installation folder when you use ClickOnce. A ClickOnce application is always installed per user in the user application cache (C:\Users\username\AppData\Local\Apps\2.0).

Winform application not running after installing into program files directory

I had created a windows form application and used setup project to create installer. But after installing my application the application is not opening from the location it is installed("c:\Programs Files(86x)\"). But the application runs fine if i copy the entire installed files to another drive. Actually my application is creating some folder inside the installed directory when running. so i thought it is some problem related to windows permissions. I had set app privileges as "requireAdministrator" and still not working. Can anyone help me with a solution?
Actually my application is creating some folder inside the installed directory when running.
Don't do that!
The Program Files folder is read only to standard users, and has been since Windows 2000. And since Windows Vista even Administrator users will require elevation to get write access into this folder.
Use the All Users Application Data folder instead (Environment.SpecialFolder.CommonApplicationData).
The alternative is an advanced installer product (meaning purchasing the full version of InstallShield or similar rather than the version included with Visual Studio) which supports adding an action to your install process that both creates the folder and sets new permissions, and does this at install time. But that's really a cheat, anyway. Just use Application Data.

how does the installer creates other needed files beside the main exe?

i develop a windows service in C#. and my project has Installer, and Setup project. the setup project, installs service very well and it doesn't have any problem, but my service 'exe' needs some files beside own. for example config files or other needed files. but the installer(setup.exe) just creates service 'exe' file.
how do i define that the installer creates other needed files, too?
thanks,
Follow the steps given below,
Select the Installer project.
Select File System Editor under Solution Explorer
Select Application Folder under File System on Target Machine pane.
Right click on the UI and add whatever the file you want to pack with the installer.

Instead of hosting site Manually, Create a Installer file for hosting website/web Application in asp.net

I have Created a website and our client don't want to use net to access that site(I know its strange but its true)
so i have only one option left, Host site on client system locally but is there any way to create a installer file for it. Instead of hosting site Manually, Create a Installer file for hosting website/web Application in asp.net.
Sure, You can do that. Please see this link
Step by Step Guide to Create a Setup for a Web Application
In the final step an msi file has generated at applications bin/debug folder.You can supply this msi the target machine(to your client), when you run this msi at target machine, it will create a virtual directory as well as create same folder structure, which you have specified in File System. This installer will also install the specified those libraries in the registry which are specified in the Registry.
Now you can browse that application at the target machine in same way as you have done at your own machine.
If you are using VisualStudio 2012 or 2013 .Please follow this link.creating-setup-for-web-application-using-install-shield

Best way to deploy Visual Studio application that can run without installing

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:
"Publish" the application (to, say, some folder on drive C), either from menu Build or from the project's properties → Publish. This will create an installer for a ClickOnce application.
But instead of using the produced installer, find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the bin\Debug folder below the project file (.csproj).
Zip that folder (leave out any *.vhost.* files and the 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 a user's probability to install .NET.
It works. We use this method during development and test to avoid constantly uninstalling and installing the application and still being quite close to how the final application will run.
First, you need to publish the file by:
BUILD -> PUBLISH or by right clicking project on Solution Explorer -> properties -> publish or select project in Solution Explorer and press Alt + Enter
NOTE: if you are using Visual Studio 2013 then in properties you have to go to BUILD and then you have to disable define DEBUG constant and define TRACE constant and you are ready to go.
Save your file to a particular folder.
Find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and type in the bin\Debug folder below the project file (.csproj).
In Visual Studio they are in the Application Files folder and inside that, you just need the .exe and dll files.
(You have to delete ClickOnce and other files and then make this folder a zip file and distribute it.)
NOTE: The ClickOnce application does install the project to the system, but it has one advantage. You DO NOT require administrative privileges here to run (if your application follows the normal guidelines for which folders to use for application data, etc.).

Categories