How to register Performance Counters Manifest using VS2008 Installer - visual-c++

I have a VC++ (unmanaged) project to which I added performance counters using manifest method. Everything is working great and I even have build steps that do manifest compilation and automatic registration using lodctr.exe tool with /m:manifest switch.
The problem that I'm running into is that I now need to make installer (VS2008 Installer project) do registration on install (unregistration on uninstall).
I tried to set it up by having a custom action that referenced lodctr.exe tool with CustomActionData set to /m:[TARGETDIR]PerfMon.manifest and similar setup using unlodctr.exe for custom uninstall action.
When installer runs, I do see a brief flash of cmd window (which is ok), but counters are not getting registered. I ran SysInternals' ProcMon tool, and I don't see lodctr.exe process even created.
I tested that running lodctr.exe manually on target machine registers the counters.
I googled for an example or explanation how to do it with Visual Studio installer project, but came up empty. It has some .NET oriented examples, but nothing for unmanaged, hard and cold VC++...
How can I register performance counters manifest using installer project?

Visual Studio installer project has very limited functionality. Starting from Visual Studio 2012 Visual Studio installer project is not supported, you should consider to use Windows Installer XML (WIX) instead.
Include your manifest into WIX project and use WIX's PerfCounterManifest with it.

Related

Recompile on save isn't working

I started a Node.js project on Visual Studio 2017 Community on my PC at home, just to test a few things out and play around.
When I begin "debugging" (as in get Visual Studio to compile and launch the website), any changes I make and save to files are not reflected until I restart the entire debugging process. I've Node.js projects through Visual Studio on other computers, and they seemed to recompile the individual files as they were saved, reflecting any changes immediately. I can't seem to find anything online that would suggest a solution, I guess Visual Studio/node.js is a pretty rare combination.
My Visual Studio Community 2017 installation on Windows 10 is fairly slim. In terms of components:
Cloud, database, and server:
Connectivity and publishing tools
Web Deploy
Code tools: Developer Analytics tools
Debugging and testing: JavaScript diagnostics
Development activities:
JavaScript and TypeScript language support
Node.js support
SDKs, libraries, and frameworks: TypeScript 2.5 SDK
Would anyone how I can make Visual Studio recompile each file on save while debugging? It's definitely possible, I'm probably just missing something!
I've since figured that this is not native functionality for VisualStudio to recompile each time an application-dependent file is changed. There are, however, packages available that can allow Node to do this, such as Nodemon.

Install custom tool using VSIX without running devenv /setup

I have created a custom tool within a Visual Studio 2012 "Package" project and am distributing it via a .vsix file. Everything works great but the custom tool is not registered unless I run "devenv.exe /setup". Is there any way around this? I was under the impression (and it seems to be confirmed by the EF team) that this only needed to be done when installing using an MSI.

CRM Plugin deployment

I have created a crm plug library (dll) and then added this dll to CRM package for deployment.
I want to add 6- 7 steps for plugin.
1) Is there is any way to added steps for plugin using visual studio. We can do using plugin registration tool.
2) How to debug the plugin. (onpremise and crm online)
If you install the Developer Toolkit available in the CRM SDK you'll get a range of tooling added to Visual Studio that includes the ability to develop and deploy all the main CRM 2011 assets including plugins, workflows, web resources etc. As of the latest SDK release the tooling now supports Visual Studio 2010 and 2012 via separate installers.
A key part of the tooling is the CRM Explorer that gets integrated into Visual Studio. From this you can browse all of the entities within an organisation and generate stub code for plugins directly within Visual Studio. Once the plugin has been deployed you can then use the CRM Explorer to add additional steps.
The SDK has a good README included in the install folder for the toolkit. Have a read of that.
To debug plugins on-premise, if running CRM locally you need to attach to w3wp.exe if running without isolation otherwise attach to the sandbox process (the full name of the process eludes me). The toolkit makes debugging easier as it ensures your PDB files are available.
You can't debug plugins deployed to CRM Online.
You can register if you build your own registation tool, directly with visual studio you can't.
See here a resume how debug a plugin in all configuration situations (online, offline, sandbox or asynchronous registered plug-ins).
See here how debug with registation tool.
See here how remote debug.
See here to debug crm online, using ITracingService, isn't step by step but is useful to debug.

What installer options are there for Visual Studio 2012 Express for Desktop

So Microsoft released Visual Studio 2012 Express for desktop apps. That's great, but how does one create an installer for open source apps that are built in Visual Studio Express? There are no installer templates available by default, and they have disabled browsing the online gallery. Sure, I could purchase something like InstallShield, but that kind of defeats the purpose of an open source application if you ask me. Any suggestions?
You can use the open source NSIS or WiX tools to create fairly nice installers.
Since both should work without the Visual Studio integration that Express won't give you, they should both be usable (even if not quite as nicely) without problems.
I would use Inno Setup, which is a little easier to learn than most other setup programs.
I have a link here:
http://www.jrsoftware.org/ishelp/

Visual Studio 2012 Windows service .vdproj project migration

I'm trying to move a solution I have over to Visual Studio 2012 and one of the project types is .vdproj.
According to this link this project type is not supported in Visual Studio 2012:
MSDN says they recommend that you use InstallShield Limited Edition for Visual Studio.
The problem is, when I open up my solution in VS2012 and try to add a new "Enable InstallShield Limited Edition" project to my solution, I get an error message saying:
Creating project 'test'...project creation failed.
Why might I not be able to add a project of this type to my solution?
If I make a new empty solution I can't make an InstallShield project it in either.
I'm going to try to download InstallShield limited edition and see if it does anything.
I tried out that InstallShield download, and it added two extra project types, but I'm unable to create either of them. I'm able to add normal website projects to my solutions just fine, but not deployment projects.
The installer was named the same, but this one prompted me to re-start. After re-starting I was able to add an InstallShield project, but it gets created in its own solution. So, it looks like now I have to figure out how to use it, and I'll be good to go.
It's looking like the limited edition doesn't have support to install Windows services.
This will probably be long and boring because there's lots of steps, but I'd like to write up how to move from a Windows service installer .vdproj to the new InstallShield LE that's available in Visual Studio 2012.
Step 1: Create a merge module (.msm)
Follow the steps of this guide.
Notes:
You will need to install WiX 3.6 and isWiX
The latest release of IsWiX doesn't enable the Tools menu item in Visual Studio 2012. Edit the file: C:\ProgramData\Microsoft\MSEnvShared\AddIns\IsWiXAddin.Addin (XML) and clone the HostApplication element and update 10.0 to 11.0.
In step #8 of the guide, it references a code tab. This has been moved to the XML Editor item in the bottom of the left menu
I left the MergeRedirectFolder empty for my installation
Here is my isWix files view:
After you're done with the guide you should have an empty .wxs file that looks something like this:
Using the Component XML element pulled from here you should end up with a .wxs file that looks like this:
Hit build and you should now have a .msm file.
Step 2: Adding merge module to InstallShield
Go though the wizard to setup the basic install information like company and version information.
Find the redistributables view in ISLE. Right click the list and select browse for module. After your module is found and added, right click the modules and select properties. Set the destination folder drop down to INSTALLDIR. I had to set mine to the lowest level folder I created for my install path, so you might have to experiment a bit.
Build Project, and test on virtual machine
Redistributables Screen
If you're getting errors about the path being too long you might need to change the release location to something close to the root.
Here's a list of all the build errors for reference.
Now you should be able to run your installer and have it install/start a Windows service. A lot more work than .MSI files, we got it to generate in Visual Studio 2010, but overall it was not too bad.
While there is no easy or truly supported solution for Visual Studio 2012, Visual Studio 2013 users can get an extension from Microsoft in the Visual Studio Gallery.
I found this post which says you must download InstallShield first. It's a very confusing way to work. I suggest to vote up the post on the connect site and give them comments letting know how poor that is. They could at least give a more descriptive error http://connect.microsoft.com/VisualStudio/feedback/details/732196/project-creation-failed-for-installshield-limited-edition#tabs

Resources