Create an web app installation package, that includes "everything"? - visual-studio-2010

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.

Related

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

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

How to create the asp.net web setup project

I have a Asp.net application which I want to make it easy to depoly in client machine by click the .ext or .msi file.
Then I found the "web setup project" in vs.
However I have no idea how to make it.
In my case,my application need .Net 4.
And after the app is deployed I have to modify something in the web.config which I want to gather through the install wizard.
Also I need to do some clean work after deploy(modify some files).
So I wonder if my requirement is possible using "web setup project",and how to make it?
In Visual Studio you can modify files during install only through custom actions. So you will need to write custom code which does what you need. Regarding .NET Framework 4, it can be added as a prerequisite.
If you want an easier solution, you can try a commercial setup authoring tool: http://en.wikipedia.org/wiki/List_of_installation_software
For example, Advanced Installer has a dedicated project type for ASP.NET applications.
Yes,We can make Custom Actions(Framing Connection during installation ,Consuming WCF service for Web App)to .msi file during installation.
If you want to have more clear picture about this refer my articles.
This is to create or change Connection string along with setup creation for Windows Application
http://www.codeproject.com/Tips/446121/Adding-connection-String-During-Installation
In this creating setup file for Web App which consumes WCF service
http://www.codeproject.com/Tips/477202/SetUp-file-Creation-for-Web-Application-which-Cons

Manually Configure Microsoft Entity Framework and SQLite Provider

How can I manually add the SQLite Entity Framework 4.0 provider without using the installer setup so that the Visual Studio New EDMX wizard will be able to use it to create a new data model?
I'm not sure which provider you are using, but I am asuming you are using the System.Data.SQLite provider available from http://system.data.sqlite.org/
In order to use the Design Time support in Visual Studio, you must download the installer and install everything. This will setup the Design Time support and also install the System.Data.SQLite and System.Data.SQLite.Linq assemblies into your development machine's Global Assembly Cache.
For your application to access the SQLite database, you will need to add a reference to those two assemblies to your project.
To do this, right click on the project and select "Add Reference". If you ran the installer, the two assemblies will be in the list. If you can't find them, download the assembly files from the website, put them anywhere on your drive and reference them by selecting the file.
To distribute your application, you simply need to send along the assembly files. The easiest way to do this is to put the two dll files in the installation folder.
You can do this by right clicking on the reference in the visual studio Solution Explorer, and selecting Properties. Here, set Copy Local to True. Now when your application compiles, a copy of the SQlite assemblies will be put in your target directory.
If you are deploying the files manually, simply copy along the assembly files and keep them in the same folder as your executable. If you are using One-Click Deployment or any other kind of Deployment, make sure the assemblies are deployed together with your application.
Note that, as far as I know, the assembly version used by the Design Time support must be the same version as the one deployed by your application. So if you update the one, make sure you update the other as well.

"Calls to the web service will fail unless the Silverlight project is hosted in and launched from the same web project"

I have Downloaded demo project from here
I tried to run Silverlight project SkiResult.ThinClient from the “Solution Explorer” I have configured the database nicely as SkiResult.FullClient a WPF Project works fine and display data.
But whenever I have tried to run Silverlight project in my Solution Explorer it shows me following error message.
I have googled so much I have also found one solution that set xyz.WEB project as a Start Up Project but as u can see from below screenshot of my Solution Explorer there is no xyz.WEB project in solution.
Thank you so much.....
Try setting the SkiResult.DataService project to be the startup project. This looks very much a web project created to host a Silverlight application because:
it has a Web.config file (so it is clearly a web project)
it has a Silverlight.js file (some utility JavaScript used with Silverlight),
it has some autogenerated test pages,
it has a ClientBin folder, which is typically where the compiled Silverlight application will be copied to.
When you create a Silverlight project, Visual Studio offers to create a web application project to host the Silverlight application for you. (You don't have to create a web application - VS can generate a test webpage during the build process and use that instead.) If your Silverlight project is called Xyz, then this web application will be called Xyz.Web. However, with the solution you're dealing with above, it seems this project has been renamed from the default.

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"

Resources