How do i solve publishing problems with visual studio 2013 - c#

I have followed all the instructions to publish my application via ClickOnce
it keeps popping up the above error when I try to install on the host computer

You mentioned that you are using ClickOnce but I see the error is related to a file with extension (.msi), it seems that you have tried other ways to publish your application and one of that you tried is Installer Package (.msi), which should not be related to ClickOnce.
Try to put Only your Original application in a different folder and follow the steps to publish it via ClickOnce. I want you to do this because it seems to me that the error is not be related to ClickOnce nor an error related to the main application.
Wish my answer is clear if not just let me know, good luck

Related

Visual Studio - Registration of the app failed after uninstalling app

I am developing a Universal Windows 10 app and I get an annoying problem every time I try to run project after I uninstall the app from windows start menu. The scenario is:
I run project on local machine - app is running good;
I press Shift+F5 to stop runing;
Go to Windows start menu and uninstall just installed app;
Run app again from Visual Studio;
Get error 1>Error : DEP0700 : Registration of the app failed. An internal error occurred with error 0x80073D05. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues. (0x80073cf6)
NOTE: sometimes Clean Solution + Rebuild Solution helps, but sometimes only system restart solves the problem. Is this an official bug or I am missing something?
I was facing the similar problem, and as per this link
https://social.msdn.microsoft.com/Forums/en-US/566e53ec-2020-4969-9f17-f0a5a916f027/error-dep0700-registration-of-the-app-failed?forum=winappswithcsharp
we need to locate the app`s package in C:\Users\UserName\AppData\Local\Packages and delete it. This error occurs when after installing if the system is not able to delete the complete package from Local.
This is not the official bug in this case.
Please check if your project is build before and then deployed (please see screenshots below) and let me know whether problem remains and what is the version of the Windows platfrom you use.
You can check it using search window and type "winver":

WPF application doesn't run on another computer

I created a new WPF project. I copied the built .exe file onto another computer and tried to run the application. But nothing happened. It was just loading. Nothing more.
All my WPF projects do this thing.
What am I doing wrong? Has anyone any idea?
Edit: For somebody in the future: the question might not be clear. What I meant was that I created a simple WPF application with nothing in it and tried to run the application on another computer. I wasn't able to make it run. Just nothing appeared. I figured out that the Avast Free Antivirus was causing this problem. When the antivirus is turned off, it runs as expected. Even though it is no solution, at least we know, what was causing the problem.
You are probably missing the dot net libraries on the target machine.
For quick fix, download the dot net framework distributable for the .net version you compiled against and install it on the target machine. Here is 4.5.1 for example.
For actual distribution, look at creating an installer that will ensure all dependencies are installed with the application. InstallShield has a limited edition which may be included with your edition of visual studio
Try publishing your application using click once. You can do this by right clicking on your project > Publish > Specify the location to publish your application > Finish. Copy the files inside the Published folder to another computer and try installing by click the setup.
Note: The instructions I said above only works if you only have basic functions on your app. If your application uses SQL Server, you need to install it first on the computer that you will be installing your application in.
For your reference. How to: Publish a ClickOnce Application using the Publish Wizard

Acess Denied to installed application on Windows 8

I've developed an application in Visual Studio 2010 but I used the VS 2012 to create the
Setup Installer. It's working perfect when running it on Visual Studio 2012, no errors at all.
Detail: I builded this when I used win7, now i'm using windows 8
But when I install the application and try to run it, when it tries to overwrite the app.config file it throws the exception. I already tried to give permission by RightClick - Security tab but didnt solve the problem. I found THIS thread that looks like my problem. But didnt worked... All I have on my app.config is the connections strings. What may it be?
UPDATE
I gave permissions to Users/PC1 in each file.cfg and to the whole folder that the files are in.
And now it seens that it worked, but what may I do to do not need do all of this to run the applpication ? I want to install without needing to give permission to the folders and files. (It's a win8 complications... -.- ).
It sounds like a permission issue, mostly with the project folder potentially.
You should try the following steps:
Run Visual Studio as an Administrator.
Verify that your User Account can Read / Write to your project folder.
Ensure that your Local Service, Network Service, or Local System
Off the top of my head those would be what I would try, more then likely Visual Studio isn't able to modify your app.config which would be tied to your Local Service account- The one that would be tied to your System.
Though the inner content isn't the problem, it is tied to your Directory Permissions which may be inherited to the sub-folders and sub-files.
Hopefully that helps.

Installing a Windows Service -Setup.exe fails

There is a weird issue I am facing. I created my first windows service looking through various blogs and tutorials.
Then created setup for that adding installer etc. It works fine while installing , un-installing via Visual Studio but it fails when i deploy it .
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\bhuvint\Documents\Visual Studio 2010\Projects\CPNS Library\ServicePackage\CommonPushNotificationWindowsService.application resulted in exception. Following failure messages were detected:
+ You cannot start application CommonPushNotificationWindowsService from this location because it is already installed from a different location.
+ You cannot start application CommonPushNotificationWindowsService from location file:///C:/Users/bhuvint/Documents/Visual%20Studio%202010/Projects/CPNS%20Library/ServicePackage/CommonPushNotificationWindowsService.application it is already installed from location file:///C:/inetpub/wwwroot/ServicePackage/CommonPushNotificationWindowsService.application. You can start it from location file:///C:/inetpub/wwwroot/ServicePackage/CommonPushNotificationWindowsService.application or you can uninstall it and reinstall it from location file:///C:/Users/bhuvint/Documents/Visual%20Studio%202010/Projects/CPNS%20Library/ServicePackage/CommonPushNotificationWindowsService.application.
I have already un-installed the service and trying to install it from the deployed service in the same pc to test. But it fails with above error.
I feel i have deployed the windows service the wrong way. Could you guys please suggest how to deploy a windows service ?? (I have looked through net. All suggest building it and installing it from visual studios. But how to publish it is the thing which i need.)
Please help asap.
Possibly you built the setup project before uninstalling the preovious service. In that case you can't use the new setup to uninstall the service, since the setup won't be the same and can't be able to access the service installed.
You should try to go to a previous version of your project and uninstall the service and for the future unistall the service each time you're building your setup project.
This happened to me several times.
Run visual studio in debug mode, and in your properties of your service project goto tab build events in Post-Build event command line and add a -d so you can run your service without installing it, it will run as an console app
The LocalService account acts as a non-privileged user on the local computer, and presents anonymous credentials to any remote server. Use the other accounts with caution, as they run with higher privileges and increase your risk of attacks from malicious code.
If your service application will not install correctly, check to make sure that the ServiceName property for the service class is set to the same value as is shown in the installer for that service. The value must be the same in both instances in order for your service to install correctly.
NoteNote
You can also look at the installation logs to get feedback on the installation process.
You should also check to determine whether you have another service with the same name already installed. Service names must be unique for installation to succeed.
STUPIDITY PERSONIFIED
As i told i was deploying my service. So this published code had a "setup.exe" file to it. Now I had already created a setup project for the windows service , which i was using for the installing , uninstalling . And i din't know (These words needs courage !!) that msi file created is required to install the windows service. So as i got through the folder structure of the setup project. I came across the .msi file . And hence the problem got solved. The Main problem was :
Me not knowing to use setup projects
And I confused setup.exe with the published windows service with the setup of windows service.
I am really sorry for stealing bandwidth off your precious time. Thanks to all for the valuable inputs.

Visual Studio: Publish application

I made a simple Windows application to test how I can publish my application.
So what I want to know is how can I publish my application so that it creates an installer so that other users around the world can download, install and use my application?
Thanks
You could use the "setup" project available in visual studio, that creates a MSI file.
Also you may use the publish concept called "click-once-deployment".
Please go through this article that explains the methodology:
http://www.codeproject.com/KB/install/ClickOnce-Deployment.aspx
Create homepage to describe your application information, update somewhere for others to download. Well, you can give a try by creating a site on CodePlex, SourceForge...
You could try ClickOnce.
ClickOnce deployment allows you to publish Windows-based applications to a Web server or network file share for simplified installation.
You just need to define which prerequisites you want to include in bootstraper, as described here

Categories