Visual Studio Setup and Deployment Projects - Web Setup Project and IIS - visual-studio

I am creating a Web Setup Project using Visual Studio 2013 to create a MSI installer for an ASP.NET Web API project. I am using this extension from Microsoft that brings these projects into VS2013.
I am trying to understand what the Web Setup Project does in relation to IIS. It appears there is no difference between a Web Setup Project and the standard Windows Setup Project in what it actually does. They both install the files to a directory that I choose during installation. I would expect the Web Setup Project to create a site/virtual directory in IIS but it's not. It doesn't do anything different than if I use a windows Setup Project.
Is there something else I need to do to make the Web Setup Project install a site/virtual directory to IIS? Or is the correct behavior to just install the files to a directory and that's it?
There is no documentation for the VS2013 version of this but I am looking at the reference here for VS2010 and the product appears about the same

Related

Is Visual Studio Required to run Coded UI tests on a build server?

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.

Create an web app installation package, that includes "everything"?

Would it be possible, with the tools in VS2010, to create an msi-package that includes everything needed, and installed "on demand" for a mvc 3 app?
It should include IIS, SQL-Server Express, .NET 4, and the mvc3 assemblies.
That would be very handy to have to give users a single install-file, regardless if they use xp, vista or 7. The package should autmatically dectect what's missing, and install that.
You can try use a Web Setup Project.
Add a new project to your solution.
In the "Add New Project" dialog, select Other Project Types->Setup and Deployment->Visual Studio Installer.
Then select Web Setup Project.
In the created setup project, add Project Output... (Content Files) to the Web Application Folder (in File System Editor).
The web setup project includes by default check for IIS and .NET framework. It is possible to add checks for other dependencies.
When building the setup project, it is created the msi, along with a setup.exe that includes some pre-install validation.

Why Visual Studio 2010 publish website with source code?

I'm using Visual Studio 2010 with the new website publish dialog. I have a Web Application website. When published, in theory it should compile all the code into an single assembly. However, in both Debug and Release, after publishing the directory always contains source code of page and user controls (even with the untransformed web.config files Web.Debug.config and Web.Release.Config). This is very confusing.
But with package/publish web project configuration and Generate Deploy package context menu item, the Package\PackageTmp directory is clean.
Why doesn't Visual Studio use this Package to publish the website?
Where is the precompile option?
Web.config xml transform seems not work, why does Visual Studio bring this feature to confuse me?
The correct answer is to look in the Package/Publish Web settings (in the web application project properties) and look for the "Items to deploy".
For a web application you'd want "Items to deploy" to have "Only files needed to run this application" which would NOT copy the source code files, since they've been compiled into the DLL in the bin folder.
Note that this setting varies for your current Build type (Debug/Release/etc), so plan accordingly...
Ciao!
You need to understand the differences between Web Application Projects versus Web Site Projects.
To deploy a Web application project, you copy the assembly that is
created by compiling the project to an IIS server. In contrast, to
deploy a Web site project, you typically copy the project source files
to an IIS server.
For Web application projects, you typically build the project in
Visual Studio or by using the ASP.NET batch compiler on a computer
that is not the production IIS server. All code-behind class files and
standalone class files in the project are compiled into a single
assembly, which is then put in the Web application project's Bin
folder. (The .aspx and .ascx files are compiled dynamically in a
manner similar to what is done for Web site projects.)
For Web site projects, you do not have to manually compile the
project. Web site projects are typically compiled dynamically by
ASP.NET (on both the development computer and the production IIS
server). You can choose between batch compilation mode, which
typically produces one assembly per folder, and fixed compilation
mode, which typically produces one assembly for each page or user
control.
In visual studio 2013/2015, select an option "Precompile during publishing"

Can I manually install a windows service application using VS 2010 Express?

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

How to run an ASP.NET Application on Another System?

I have developed an ASP.NET web application in visual studio 2008. I want to run the same application on another system, but Visual Studio is not installed on that system. Is there a way I can run without visual studio?
I heard about deploying, but I don't know much about it.
You can publish your site from Visual Studio to a server that's running IIS, more info here:
How to: Publish Web Application Projects
You can use the built-in deployment features of Visual Studio (right click on the web project, select publish and follow the prompts) or you can simply copy all the dlls plus your content files from the web project to the IIS folder you want to deploy to (known as xcopy deployment). You could also deploy via a setup project, which will create an MSI package, but that's a bit more work. Here's a couple of links that might help, but you can do a search for the options described above and you will find plenty of resources:
Deploying ASP.NET Applications - Part 1
Deploying ASP.NET Applications - Part 2

Resources