I have created a Windows Service Application and attempted to install it using installutil. But it doesn't show up in my services list. After doing a lot of research I concluded this is because I do not have access to the Setup Project template VS2010 Professional provides. I only have VS2010 express.
I need to mimic any code and configuration for installing a Windows Service Application but without creating a Setup Project in VS 2010. I only have VS2010 Express and want to toy around with creating a service for my home PC.
In other words, is it even possible to hand code what a Setup Project template provides in VS 2010?
If so, what are the essential steps? Are there any tutorials available for how to accomplish this?
Thanks.
the only thing you will need is a class which you will need to derive from ServiceBase and is instantiated from Program.cs.
Just compile and put your project output somewhere on your filesystem, open a command prompt and do InstallUtil your-assembly.exe.
Please note that you should use InstallUtil of .Net 4.0 (instead of 2.0).
On my PC, I use InstallUtil from C:\Windows\Microsoft.NET\Framework\v4.0.30319
Related
I am writing an application that scaffolds the creation of other Visual Studio solutions. My application is intended to be run on an Azure web app instance and uses C# as the primary middle-tier language.
Previously, I have been able to scaffold or generate VS solutions from a Windows forms app running on my local machine using EnvDte and I know it is possible to do the same via a command line.
Is it possible to accomplish to scaffold/generate a Visual Studio solution from my web app that is itself running on an Azure web instance?
Though out-of-scope for the question, please assume that once generated, the solution will be stored in a folder, zipped and emailed to the user, checked into source control, or some other viable option that is altogether a different issue.
I have references to
using Microsoft.VisualStudio.TestTools.UITest.Extension;
using Microsoft.VisualStudio.TestTools.UITesting;
But I'm building on a server without Visual Studio installed.
My builds are failing because these dlls can't be found (their path is in the VS install directory on my local machine)
Does this mean VS is required to run these on the build server? Or can I just copy the dlls into some project folder and add them as references?
The recommended approach is to install VS on the build server and the licensing is such that you are able to do that. The team know that this is not an ideal solution but it's the only one we have today. Note that the build server images provided by Microsoft in the hosted environment (tfs.visualstudio.com) have VS2012 and VS2010 installed into them for exactly this type of reason.
I have created a windows based application in C# using visual studio 2008 which basically scans for the registry and then fixes the resulting errors. Now using the msi installer i have made a setup and it works fine. However i have met with a new requirement.
Usually after providing the setup to the user/client has to install the setup and when installed, in the installed folder there are lots of .dlls that i had used to create the project. But my requirememt is to create a single standalone .exe using which i wouldnt have to provide my users with the setup file. All i need to do is that using this single .exe file my whole project should execute and perform the same process of scanning and fixing the registry.
I also tried "ClickOnce Deployment in .NET Framework 2.0" and got the error "ClickOnce does not support the request execution level 'requireAdministrator'". and also have gone through the link
"ClickOnce does not support the request execution level 'requireAdministrator.'"
But still i feel that i would be comfortable if i can get a single standalone exe which can execute my windows forms application.
Is there any way to do it?
Any hint with this thing will be really helpful to me.
Thanks in advance
~Viknesh
Today I tried to use the publishing feature with visual studio, which creates an application manifest, and not a traditional exe.
What are the benefits of this?
I noticed each time the app starts up it does some kind of check before launching in?
When using Publish on a Windows application, you create a ClickOnce installer. You can find a lot of information about that in the official documentation. Basically, this is an alternative to creating a conventional MSI-based setup project (File/New/Project/Other Project Types/Setup and Deployment/Setup Project).
On MSDN you can find a comparison of the two approaches.
A colleague has written a Windows Application and left me to do the installers. I have created the installer project through Visual Studio and added the primary output of the service project to the new project.
When I run the installer it creates the correct folders and copies the dlls, exe and config file in, but it doesn't do the actual install of the service.
The service isn't listed in the Services window, and if I double click on the exe I'm told I need to run installutil to install the service.
How do I make the installer do this bit for me? I found this article:
http://www.codeproject.com/KB/install/InstallService.aspx
but that seems overly complex for what I would expect to be pretty basic.
I used this article:
How to create a Setup project for a Windows Service in Visual Basic .NET or in Visual Basic 2005
Felt pretty dumb that I couldn't figure it all out until I went through all of the steps in this article. It's not a trivial exercise by any means.
For those who are looking for updated instructions for Visual Studio 2010 (instructions in answer are for VS 2005) check the following link:
Walkthrough: Creating a Windows Service Application in the Component Designer (note that "other versions" [VS 2005, VS2008] are available from the same link)
I had this issue in my case the problem was I neglected to add the custom actions for the installer project. To find these right click project->"view"->"custom actions" under there it needs the primary output added to the folders.