There is a number of issues logged on stackoverflow about a Windows Service that does not appear in the Windows Services Manager.
A number of solutions suggest that you use InstallUtil.
When I run my setup project, my service does not appear in Windows Services, but when I run InstallUtil it does appear.
At least that tells me my project is okay, and the problem is with the setup project.
A good post from here talks about adding Custom Functions. I'm using Visual Studio 2013 and the default InstallShield setup project, and I do not see those options in my project.
Anything specifically that I have to change in the setup project so that it works as well to display the project in Service Manager?
Make sure you have done this custom step:
1.In Solution Explorer, right-click the setup project, point to View, then choose Custom Actions. The Custom Actions editor appears.
2.In the Custom Actions editor, right-click the Custom Actions node and choose Add Custom Action. The Select Item in Project dialog box appears.
3.Double-click the application folder in the list box to open it, select primary output from MyNewService (Active), and click OK. The primary output is added to all four nodes of the custom actions � Install, Commit, Rollback, and Uninstall.
4.Build the setup project.
Related
I've built a Windows Service in vs2019 using C# but in order to test it I need to install it. I have built a VS Setup project and I can see this is installing the files into a sub-directory of Program Files (x86), but it isn't adding it to the services list.
I'm new to creating Setup projects, but I do have an existing project built by someone else which I have been using as a guide. As far as I can see I have everything set up correctly, so there must be something not obvious that I'm missing.
I've tried googling the issue but, as usual, there are millions of results but none of them apply to my situation. I'm really hoping someone can point me in the right direction as my experience on Stack Overflow has been disappointing so far.
So, yet again I have to answer my own question. It seems that as well as creating a Setup project I also needed to add an installer to my service. I did this by:
Double click the .cs for the service
Right click on the grey panel that appears and select Add Installer
Select each of the two items that appear in the grey panel and set their properties to appropriate values (Description, DisplayName, ServiceName, StartType, Account etc).
I think ideally this should be done before the setup project is created as it took me several attempts to get the service to install correctly this way around.
I have a MVC 5 solution in VS 2017 with 2 projects. Sometimes, when I'm working in one, I need to enter new information in the database using the other one. The only way I know of doing this is to stop debugging, assign the other project as the startup, run it, enter the info and then reverse the process again. Is there a way that I can access the project (which is light, not too complex) without stopping the current assigned startup project ?
Yes. Right click on the project and select Debug > Start New Instance from the menu
If you right click on the solution name in the solution explorer, there's an option for Set Startup Projects. You can then select what you want to start when you run the application.
It's also under the Project menu.
Is it possible for me to run multiple (2) projects at the same time?
I realize that you only have the option of making a single project the 'startup project'.
But I have 2 web projects in my solution, and I need to run both at the same time.
Is the only option opening multiple instances of VS?
Right-Click on your solution (Top-Most node in your Solution
Explorer)
Click on "Properties"
On the right panel, expand
"Common properties", and click on "Startup Project"
Click on "Multiple Startup Projects"
In the "Action" column, select "Start" on the project you want to start
Optionally, you can change the startup order by clicking on a project and moving it with the arrows on the right.
What I do is open another instance of VS and have each project open in the separate VS windows. Then I run both of them.
This saves the hassle of having to deal with changing the settings around.
Using the Azure publish wizard gives you some options for changing your config settings, but not enough. You can tell it which build configuration to use (which will apply a transform to your web config) but you only have 2 choices. Release and debug. Also you can specify which cloud service configuration to use which will transform your service.config but again only 2 choices Cloud and Local.
My problem is that I have 3 different versions of my application running in Azure. They are Dev, Demo, and Production. Each has their own database, storage accounts, and other settings related to authentication. Just having a release and debug transformation doesn't cut it.
Really what I would like is to have a script or something so that I could publish my app to each of my Azure instances. It would change my web.config and service.config and target the right azure instances.
Any suggestions are appreciated.
There used to be CodePlex project http://wappowershell.codeplex.com/, which now became an official tool here: https://www.windowsazure.com/en-us/manage/downloads/.
It's a set of Windows PowerShell cmdlets for managing Azure deployment.
Also the following question is pretty similar: Publish Azure Project from Command Line
In researching this I updated my Azure Tools to the October release. Not sure if these options were available in old release or not but here's what I ended up with.
As it turns out can add your own services configurations and build configurations in addition to the default ones (cloud/local/debug/release).
Services configurations can be added by:
Right click your Web role from your cloud service project and select properties.
At the top of the properties window open the Service Configuration menu. Then select manage.
Select a configuration and click the create copy button.
Select the copy and rename it to whatever you want.
Click close and now you should be able to have settings specific to your new service configuration.
Build configurations can be added by (I followed this blog post):
Select Build -> Configuration Manager from the menu. The
Configuration Manager dialog
Select from the Active solution configuration dropdown list to bring up the New Solution Configuration dialog.
Enter the name and select the configuration you want to copy. Click Ok.
Make sure you select the correct Configuration (release or debug) for each of your projects for your new solution configuration.
Notice there is still no web.config transform. To add a new Web.config transformation right-click on the Web.config file and from the menu select Add Config Transforms. Notice that a new configuration file matching your new configuration is automatically added
After following these steps I was able to create a new target profile in the Azure publishing wizard and select these configurations. This lets you automate your web.config settings using transforms and have your own custom cloud service configuration per publishing profile.
Here is another excellent reference that goes into much more detail then I was able to for this question.
I need some assistance with developing custom activities for TFS build. I have followed the steps in blog post Customize Team Build 2010 – Part 7: How is the custom assembly found?.
I have created a custom activity built into a DLL file and used in build template. I want to set it up in the TFS build now, but I have run into some issues. In the blog it suggests that the custom activities DLL file be referenced via the build controller. However, this is an issue for me. I work in a company where there are numerous projects and all use the same build controller. Therefore I don't have the permissions to make the change suggested in configuring the version control path to the custom activity.
Is there are another option open to me? Is there another way I can reference the custom activities? In the build template maybe?
You need to get that assembly onto the build server (build agent server assuming the activity is only used within the Run On Agent activity).
The most convenient option is to simply check it into the TFS folder that the build controller is pointing to for build assemblies, and the controller will automatically push it out to all build servers.
Alternatively, if you have direct access to the Build Agent Server(s) you can manually install the assembly onto the server into the GAC.