I would love to use VS templates more, but I find that creating and testing them is a bit of a pain. One issue is that to refresh the templates you must run the command above, and it is very slow.
Another issue is that in order to edit templates, you basically use a text editor and then shove your files back into a ZIP archive, then run the install command again. For a tool as advanced as VS2010, this seems ridiculously primitive. And because of this, I will start making a template, then quit in favor of copy, paste and replace.
It is also a pain to store and share templates with a team.
Any advice would be greatly appreciated.
Try creating your project as a vsix package instead, it will then install very fast.
Once installed you can uninstall the template just as fast by using the Visual Studio Extension Manager. The vsix also makes the templates easy to share with your team.
Regarding your other issue with editing the templates this is made easier if installing the Visual Studio SDK. It actually contains templates for creating templates so you can do it from within Visual Studio. It actually also simplifies the process of creating vsix packages.
Related
When installing visual studio if we already have deleted content of C:\ProgramData\Package Cache directory then whole setup process will be turned into a real nightmare constantly complaining about missing packages. I've searched the web for a solution and the only working one I've found is a tool called install and uninstall troubleshooter.but the problem with it is i have to interrupt setup process and use this tool to remove the package and then get back to setup again which is really cumbersome job to do.
But the good thing is for every package that visual studio fails to uninstall it logs a GUID like this {A2999714-5C2C-3729-A911-4AE198B7B2FD} in the log file.Now better and ideal solution in my mind is looking after an official website from which i be able to download each of these packages by these GUIDEs.Is there such a location in the web? or is there any better solution to solve the issue?
Why did you delete the Package Cache? Do you have little disk space? The Visual Studio installer is so complex that you are fighting windmills trying to fix this I think. Perhaps they have an uninstall tool of some kind that will clean the slate.
Is this Visual Studio 2017? If so, maybe try these links:
Remove Visual Studio
Cleaning up corrupt Visual Studio instances
I doubt it will work since you have deleted the package cache. Note that most MSI-based installers should be able to uninstall without the package cache due to the cached MSI file in the super hidden folder %SystemRoot%\Installer.
Whatever you do do not delete anything from %SystemRoot%\Installer. Then you are in a totally unrecoverable state since this is an internal Windows Installer implementation detail. Do not mess around in here unless you know exactly what you are doing.
The files in %SystemRoot%\Installer are used to uninstall from the Add / Remove Programs Applet.
Further Links:
Visual Studio 2017 Broken and Cannot Uninstall or Repair
have deleted content of C:\ProgramData\Package Cache directory then whole setup process will be turned into a real nightmare constantly complaining about missing packages
Had the same issue, but with vcredist files, couldn't install any drivers without running into errors and eventually couldn't install because install failed.
I found the solution elsewhere. It said to
Fix problems that block programs from being installed or removed
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
download troubleshooter button on the link.
Run it - choose option - have problem with installing - it lists programs - choose the missing / problematic visual c++ runtimes in the list
it will run and get fixed.
Repeat for each visual c++ you having problems with. I ran the program multiple times.
We're working in quite a large project and is having a hard time getting people to configure their Visual Studio correct (tabs instead of spaces etc.). We found a great solution in using the EditorConfig extension for Visual Studio.
However there are still some developers that seems to ignore our request to install this extension to their Visual Studio and hence I'm wondering if there is any way to force an extension to be installed before a solution can be opened, maybe some setting in the .sln file?
No there is no such option built-in. If your machines are domain joined, you could push out the installer through System Center or domain logon scripts.
You could cheat and create a solution level pre-build step. Create a target file named: before.{solutionname.sln}.targets and store it next to your solution file. Check it into source control. In the targets file you can use standard MsBuild to see if the extension is installed (you'll need to check the file system probably) and if not present force the installation by calling vsixinstaller.exe to trigger the install.
I have begun the hard work of converting an old Web Setup project to InstallShield LE.
So I have been searching around on how to do this. And my GOD how messy it is.
I did follow one of those guides. It seems I have to install some dummy data to Program Files just to be able to install the web application...? I have found no way to remove/delete the Program Files part of the setup. The setup dialogs shows the target folder as C:\Program Files\whatever.
Is it possible to install the web application ONLY to the correct IIS folder?
I want a clean install. No junk leftovers just because InstallShield is way to limited.
It annoys me to no end that there is no simple installer tool anymore. I even tried to hack the VS2010 setup project package (c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\Deployment) to work with VS2013. It almost loaded, but got a "80070057 - E_INVALIDARG" error on loading it.
If someone brave enough and know how custom project types work could take a go on it, maybe we can get a working (but old) setup project to work again.
The lack of answers and my fruitless search yields one answer. InstallShield LE is not capable of this.
You are better off using WiX for this. Seeing how other have done this and modifying it is the quickest way to get something up and running.
This is the result of such work: http://halsvik.net/downloads/WebSetup2013Installer.zip
And it seems MS has decided to add support for the old Microsoft Setup projects (VDPROJ) again: http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx
https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d
I create a new custom project type using a VSPackage project inheriting of MPF library (http://mpfproj11.codeplex.com/). As a result I obtain a .vsix but I need add this project type using a .msi. I'm using the Visual Studio 2010 Setup projet for it. In my setup project I add the content of the VS Package in the same directory where the .vsix put then, but I think Ineed to put in the registre the new type of project because when I use the setup , the project template does not come out in Visual Studio and when I give double click the file with extension of the type of new project and does not recognize it. When I look the registry after install the vsix, this was one of the things that I found diferent. I add this entries in my setup project but It's not working yet.I'm missing something else?
In the projecttemplatedir is the directory where I put the .dll of the project type, the vsixmifest and pkgdef. The project template is in [User]\Documents\Visual Studio 2013\Templates\ProjectTemplates\[Name of new Project Type]\[projecttemplate.zip]
Best Regards
PS: The project type is for VS 2013 but I'm using the VS 2010 Setup project ;)
OK, so first the "don't"s of doing this:
In general, if you are installing via MSI you shouldn't be doing anything user-specific -- no writing in HKEY_CURRENT_USER, nor writing within their Documents folder, LocalAppData, or Visual Studio folders, etc. If you see yourself writing files or registry keys in either of those places, that should be your hint that there's a better way to do what you're trying to do. For what you've shown so far, this raises more than a few red flags for me.
Second, don't ever go writing keys into 12.0_Config. That part of the hive is nothing more than a cache that's built up from other parts of the registry and on-disk .pkgdef files from extensions. It's rebuilt in any number of senarios, including installing new extensions. Any writes there you should presume will get blown away at any time. If you need to write things there you should either (a) write in HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\[version] and run devenv /setup or (2) [preferred] put your keys in a .pkgdef inside your extension which gets merged into 12.0_Config for you automatically.
Now the dos:
You said you already had a .vsix produced by the SDK: you can put project templates in there. You can then register those templates in the .vsixmanifest and those will pull in. That's far easier than mucking around with files in Documents -- that's the user's directory...don't go playing with that.
Once you have a .vsix that does most of what you need, you should simply take the files within that and install the files in a folder within C:\Program Files [(x86)]\Microsoft Visual Studio 12.0\Common7\IDE\Extensions. Even better, you might just want to WiX toolset to build your installer, since it has built-in support for installing extensions. It also has built-in support for invoking the "/setup" process if that's what you need to do as well. Visual Studio Setup projects are no longer supported in newer versions of Visual Studio, so you're better off starting with a technology that isn't already obsolete. WiX is even what we use at Microsoft to do the setup work for Visual Studio itself, so it's definitely up to the task.
Last point: almost everything when it comes to Visual Studio extensibility can be done with a VSIX directly, so presume there's a good way to do something that way before falling back to an MSI. Internally, we can register the entire C# and VB language services with just a VSIX -- they're quite powerful.
I found the answer in this link Registering Project and Item Templates. I set projecttemplatedir entry with
[User]\Documents\Visual Studio 2013\Templates\ProjectTemplates[Name of new Project Type][projecttemplate.zip] that is where i put the project template.
Folks,
I am creating an installer project in Visual Studio. This is done using a project of type "Setup and Deployment".
I lay out the file structure of my final install in the "File System" View of the project.
Now, some of the files I create as part of my install are updated while my application is used. I would like these files to not be removed during an uninstall of my application. Is there any way in Visual Studio to designate a file as "protected from uninstall"?
Thanks for your help.
In the Solution Explorer window, in the Setup project, click the file. Then in the Properties window, set the Permanent property to True.
I'm not sure how to do it in the installer, but any file that you create from the application will be preserved in the event of an uninstall.
If you can stand it, maybe you could create these files as a first-time initialization in your application.
Of course, this can lead to other problems (permissions to create a file), but it might be easier than fighting with the cryptic installer setup.