I have a Visual Studio 2017 project that contains a WPF application and a ASP.net application that interact through a database.
I am currently using this to create an installer for the entire project.
The problem I'm having is that I can successfully create an installer for the WPF application, but not the ASP.net application. Is there a way I can create an installer that installs both applications on a separate computer?
Thanks
Usually, you have to choose a tool or set of tools to generate an installer for your projects to be deployed in your users'/consumers' computers. There are lots of available options. Some are free, some are paid (and quite expensive).
Free ones include WiX Toolset and InstallForge. Paid ones tend to be a lot easier to use and offer more ready-to-use features, and examples of these are InstallShield and Advanced Installer.
I personally use WiX, as it offers quite interesting features, it is free, and has a huge comunity. On the other hand, its learning curve can be quite steep, depending on your specific needs.
Many other options are available. For a simpler (although much less flexible) solution for WinForms and WPF projects, check out ClickOnce.
Maybe you can try Inno Setup: http://www.jrsoftware.org/isinfo.php
I would like to use GIT as version control on a Visual Studio 2013 project. It does however require you to create a project with Visual Studio Online. Does this mean that a copy of my code will be stored somewhere, or is the purpose of creating this project only to be allow other users to be added so that you can collaborate?
You don't have to use Visual Studio Online to use code control in Visual Studio. You can create the .git and use an external tool (like command line or source safe), or you can use the internal tool.
I think that the Visual Studio community edition struggles to create a git repo without being bound to the Visual Studio Online, but once its created, it works fine with various http remotes (I have a project here which uses two remotes, one being VSO and one being our gitlab repo that we use).
Storing your code remotely (but secured) on one of the major sites can be a major benefit to you in the long run. It gets you into good habits of committing and pushing your source, even when you're working alone.
VSO is basically a cloud-based version of TFS - Microsoft's source control, build and task management system.
In order to use the system for source control purposes, you need to use the "Check In" functionality on the Solution in the VSO project before the cloud-based version is updated. The initial project in VSO will likely be empty.
You can use VSO for collaboration but you don't have to.
I made the mistake of changing a subroutine in a project and publishing it. Now I want to revert back to the older subroutine. Is it possible to find the older project and retrieve the older subroutine?
Team Foundation Server can do this for you. You can now be set up without any hassle on your developement machine. The integration in the VS Team Explorer is seamless. Very easy to handle. See this guide for working with source control projects
https://msdn.microsoft.com/en-us/library/ms181384.aspx
Even easier and not so much overhead on your machine: sign up for Visual Studio Online (free for a 5 user team). The cloud source control is set up in minutes. If you are not against saving your data in the cloud give it a try.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx
The alternatives (SVN, GIT) are also very good (consider reading about the difference of central and decentral source control) but need a little more knowledge and a good workflow.
If you happen to have lost changes before installing version control there's nothing you can do in visual studio. You can try a restore on file level (the option would be previous versions in the windows explorer)
as source code is plain text. There`s a "previous version" mechanism of windows explorer! Just go to the properties of your project folder
Note: previous version / shadow copying must have been enabled before or else the tab will be blank.
No, it is not possible unless you have stored your code in source control. It sounds like you have not yet done this, so I suggest using this is a (harsh) lesson and make the next move the one to install some kind of SCM.
You can signup for a free version of TFS online from microsoft the will integrate directly into Visual Studio. That will allow you to instantly check in changes and view the history of files and in this case, get a previous version of a file.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx
I have Visual C# 2008 Professional and have developed the first half of a C# application (console mode) with the second half in progress now (GUI).
I'm looking for an easy path to creating an installer for it. What are the steps that need to be taken to produce a professional installer?
There's a similar question here regarding the Express edition but I have Pro, and I would like as much as possible to stick with just the standard VS stuff (if you think you can convince me that a third party installer creator is much better than a VS-only solution, give it a shot, by all means).
Keep in mind that I have no interest in upgrading to VS2010 yet, even if it's a hundred times easier to create an installer. That can come later, when the revenue starts rolling in :-)
Also be aware that the GUI component of this application is a totally separate executable from the console part. The console part is a simple "open file 1, do some work on it, write file 2" type and the GUI is a fairly standard "open file, do some stuff" beast so there's no tricky or wildly undocumented behaviour happening.
Basically, I'm looking for (at least) the following:
professional looking installer.
ability to specify where the application files go.
changes to the registry to allow double-clicks on my file extension to open the GUI app with the file as an argument.
needs to install everything required (my stuff, .Net if required, and so on).
This might be a bit more rant than answer but here it goes.
If there is one thing severely broken with Windows client software it is the deployment of applications.
My experience comes from working on NovaMind - Even though I have spent weeks over the years on setup issues, I am by no means an expert in setup technology and I try to focus on our actual product whenever possible. We have used InnoSetup, Visual Studio Setup Project 2008/2010 and finally we have switched to the WiX + Tools approach.
How do you install an application nowadays?
Web Apps: Enter a URL in a browser to get to a web app.
Mac: Drag the downloaded file (same for x64 and x86) to the Applications icon on the Mac. Done.
Windows: Download the right file (user needs to know about x64 and x86 architecture), execute it. Click ‘Next’ a dozen times, wait for the UAC to show, click yes and then hope that the installer did the right thing.
I think that if Windows had a better deployment system, a sane marketplace/app store and a proper live update feature, web apps might never have gotten that popular in the first place. Of course that’s an exaggeration but I believe a lot of damage has been done to the Windows applications ecosystem by not providing a sane, usable deployment model and even now Microsoft seems to pay very little attention to this problem.
How do you update applications nowadays?
Web Apps: No need. It is up to date.
Mac: No inbuilt magic but there is a widely used and powerful solution called Sparkle.
Windows: You better roll your own because there is nothing substantial out there.
ClickOnce should have changed all of this but failed to be usable for real commercial applications.
Here is the rundown:
InnoSetup and other script based installations are simple but cannot produce a .msi file — Some companies require .msi files to automate network deployments. You will also need to have a Windows Installer (.msi) based setup if you want to get the Windows Logo certification.
Visual Studio Setup Project 2008/2010 gives you the basics easily and you can configure a bunch of things but once you want to do the unthinkable like use a high quality icon or include a changing set of files into your setup, you’re screwed. We also had to manually fix the PackageCode and ProductCode every single time we built an update since Visual Studio managed to somehow mess up the assembly versions and would leave an older assembly when updating, thus corrupting the application.
WiX is the de-facto way to create setups on Windows and even the Microsoft Office Setup is supposedly created with WiX. WiX is not simple. There are books available for WiX!
Unfortunately, WiX alone is still not a good solution. We use the dotNetInstaller bootstrapper project to ensure the .NET Framework is installed and to wrap the .msi file and the bootstrapper into a single .exe file that people can download.
With all this you are mostly fine. There are always strange cases were customers don’t have the Windows Installer installed (and thus cannot run the embedded .msi file) or where the .NET Framework installation fails.
Things we haven’t been able to do so far:
Localizing our installer!
Providing a single download for both x64 and x86 — at the moment we only create a x86 installer because we don’t want our users to think about x64 vs. x86.
Have a nice setup UI that also works with high DPI settings. I think this might just be a thing that is not supported in MSI setup.
There is a free product called SharpSetup which seems to address some of these problems and allows you to write a Winforms based UI, but SharpSetup does not come with a bootstrapper and requires the .NET Framework — you can however write your own C++ code to react in this situation.
For live updates we have rolled our own solution and after many issues it is working okay.
You might also want to listen to Scott Hanselman’s podcast episode with Rick Brewster were they talk about the setup and deployment of Paint.NET — While I congratulate Rick and the Paint.NET team on their good setup, the necessity of such a complex solution saddens me.
If you absolutely need to use .msi then I would recommend WiX to anyone who wants to create an installer on Windows, but in the end I am extremely frustrated with the deployment situation on Windows. I have wasted weeks of my time over the years with silly setup issues. With setup you can only lose. You won’t win any happy customers because your setup works but you will lose and frustrate a lot of them if it doesn’t.
Another option is using Inno Setup. It allows you to fully customize installations, where to stick files on the target machine, modify the registry, and all that jazz. If you're willing to spend a bit more time learning a bit about the scripting required to achieve the results you want, it's a very powerful tool. (fulfills all of your requirements and much more) And most importantly, it's free =)
I've been using Inno Setup for all of my larger .NET programs. When the installer runs, it checks to see if .NET is installed and if not, downloads and installs it. As well, I've modified registry and made associations with extensions like you mentioned. Including DLL's with the installer is simple as well - Inno will lump all of the required files into a single executable that takes care of everything.
Additionally, since Inno has been around since 1997, a number of editors have arisen that help make the scripting process a lot easier.
I use Advanced Installer, it is dead simply, and I use it, because of the limitations of VS.
http://www.advancedinstaller.com/
The "downside" is that for fully automatic installation of dependencies you have to pay ;-)
If you want to create your installer fully in Visual Studio, but don't mind using external tools to help you in that job then have a look at a program of mine called SharpSetup. It allows you to build GUI using C#/WinForms, whereas backend is WiX based (which in turn means using WIndows Installer).
Visual Studio 2008 has built-in setup/installer support.
Add a new project to your solution, and select the 'Setup Project' option from the 'Other project types > Setup and Deployment' category.
Have a look at Windows Installer Deployment overview, and a step-by-step walkthrough
If you know scripting languages you can check out NSIS as an alternative to VS. There's enough documentation that you can copy paste their example installer and replace their file locations with your own.
While I'm not install expert, I've used Wix successfully. It's complicated to say the least.
I don't see any of these products being mentioned that I've seen clients use successfully.
http://www.installaware.com/
http://www.flexerasoftware.com/products/installshield.htm
http://www.wise.com/Products/Installations/WiseInstallationStudio.aspx
All provide localization, file/app for double click association, Framework bootstrapping and target location to the best of my knowledge. InstallAware and Wise provide some form of autoupdate support.
what is sourcesafe?
i am trying to download it to see if it will work well with c# because someone told me to download it for a job, but i don't even understand what it is?
is it built into the visual studio ide or what?
SourceSafe is a poor and obsolete source control system.
It can store an application's source code and show revision history, and allow multiple developers to work on the same project efficiently.
It has been replaced by Team Foundation Server.
Sourcesafe is a version control system from Microsoft, some would say not a very good one. It's not part of Visual studio however it does integrate into it. MS have now replaced VSS in their Team System version of Visual Studio.
Source control is a great idea, and experience with them will definitely help your Job hunting, but don't constrain yourself to Sourcesafe, also checkout (pun intended) systems like Subversion etc.