Converting - asp.net mvc 5 web application (Visual studio 2017) to .exe setup file - asp.net

I would like to know if there is any possibility to convert an asp.net mvc 5 web application into an .exe setup file. I tried various links. But i didn't get any output. I received a .msi file and when i tried installing, the installation stops right at the beginning displaying a message = "installation stopped. Please try again". or if i try to install the setup file i get a message = "Invalid.. Please check if package exists...bla bla bla"
Some of the links that i tried are listed below.
https://www.c-sharpcorner.com/article/step-by-step-guide-to-create-a-setup-for-a-web-application/
https://weblogs.asp.net/scottgu/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005
https://www.c-sharpcorner.com/article/creating-setup-and-deployment-projects-in-vs-net/
https://www.codeproject.com/Questions/297343/How-to-create-exe-or-msi-file-setup-file-of-web-ap
And Much More...

You first need to do some preparation:
Set up IIS 6 Management Compatibility (To prevent those "Installation stopped" errors)
Install Microsoft Visual Studio Installer Projects extension. (To add setup project template to VS)
Then you can create and configure and setup project and run the setup.
Details
1 - Set up IIS 6 Management Compatibility
Open Turn Windows features on or off → Internet Information Service → Web Management Tool and check at least the following items:
IIS 6 WMI Compatibility
IIS 6 Metabase and IIS 6 configuration compatibility.
This is to fix the following error:
The installer was interrupted before application could be installed.
You need to restart the installer to try again
2 - Install Microsoft Visual Studio Installer Projects.
This is to add setup project templates to Visual Studio. Here, we are interested in Web Setup Project.
3 - Create and configure the setup project
Create setup project
Right click setup project → Add → Project output and choose what you need. You need at least primary output and Content Files from your web project.
Then you can build the project and run setup.exe.
Note
You can setup other properties like ASPNETVersion, Manufacturere, product Name, ...
If after deployment you faced with error complaining about \roslyn\csc.exe, you may want to include roslyn files or remove roslyn compilation at all. For more information take a look at this post.
You can add CustomAction to do some custom actions during install/uninstall. You can find a lot of examples around, like this post.
You can even customize UI and add some input and use them during installation. You can find a lot of examples around, like this post.
In general, if your deployment is a common site deployment having a few files and database, a better option is creating Web Deploy Packages and then install the package to IIS. You can automate that process easily.

vs-2017 ---> other project types ---> web setup project
Screen shot

Related

How to create a BizTalk Application btaproj

I am using BizTalk 2016 and I want to enable build from VSTS.
Build fails because it asks for some *.json files.
After some investigation I reached the conclusion that I have to create
a btaproj file. Add a BizTalk Server application to Visual Studio Team Services
I installed Feature Pack 1 but there is no option for BizTalk Application project.
How can I create a btaproj file?
Did you select .NET Framework 4.6.1 in create new project dialog?
fr step by step instructions, please follow https://www.codit.eu/blog/2017/05/02/bts-2016-feature-pack-i-continuous-deployment-walkthrough/
I used the steps described in usman-shaheen post
Then I had an error during building. In project's properties, under Build Events -> Post-build events there were some commands, probable written by VS. These commands were causing an error during building. If I was starting VS as admin, they were not causing any error and building was finished correctly. By removing these commands, agent could run and build my app.

Unable to configure Application Insights Status Monitor on Live IIS Web App

Application Insight is working perfectly fine on local dev but giving issue on server with the Status Monitor. Following is the error:
The application is using an older version of Application Insights for
the Visual Studio Online. Remove ApplicationInsights.config and
Application Insights Nuget package references from your project and
Application Insights to your project using Visual Studio 2013 Update 3
or later.
I followed above instruction same result. Mainly I followed this article but I have also tried the following:
Make a copy of ApplicationInsights.config if you customized ApplicationInsights.config.
In Solution Explorer, right-click your project and choose Manage NuGet packages.
Select Browse.
Search for Microsoft.ApplicationInsights.Web, select it and choose Install/Update. You need version 2.2.0 (or later).
Reinstate any customizations you made to ApplicationInsights.config. Most of the changes you'll see when you compare the files are because we removed some modules and made others parameterizable.
Rebuild your solution.
It didn't work.

Configuring existing ASP.NET project for DNVM, DNX environment on a Mac

I have an ASP.NET Web API project created on Windows using Visual Studio. How can I set this up for use with DNX/DNVM (on a Mac)?
Switching to Git solved the source control compatibility with TFS. But I wasn't able to find references to getting a project working across both these development environments.
I'm assuming as a first step the project will have to be migrated to ASP.NET 5/vNext but wondering other problems lurk around the corner with different project members using different environments.
I get an error when I run - git:(master):dnx . kestrel
As you mentioned yes you will have to migrate any namespace changes. I have a project that is developed across both. Also changing csproj files to xproj. Support is coming for some kind of interop between the different project types but its not here yet.
For build, publish, deploy from git without relying on VS publish capabilities or MSBuild you can follow my blog post here.
Basically you use DNU to publish and then kudu to deploy.

Web config transforms not working with Visual Studio online, VS2013 and Azure

I have an MVC5 website successfully deploying a staging and production release to Azure using continuous integration from Visual Studio Online (TFS).
I have followed this blog post
Continuous Delivery to Azure Websites with git using custom deployment script
I have even added the build that is required to build to my publish profiles. ie.
stagingbuild | any cpu.
note: this was not mentioned in the above mentioned blog post.
The sites deploy ok using by VS2013 build but the configs are not transformed. I just get the default web.config settings and not the transformed ones from web.staging.config etc.
note: I am only trying to transform one appSetting at the moment to get it working
I totally understand how to write transforms so I don't think this is an issue and when I preview my transforms in VS2013 they transform in the previewer window.
note: I am not publishing directly from VS but committing my changes to repo and continuous integration kicks in from my Visual Studio Online repo.
Try:
Open Builds in Team Explorer
Edit Build Definition of your build
Set Process > Build > Configurations > Any CPU|Release or any other configuration/CPU combo.

How to create an MSI installer package for an ASP.Net website?

How do I create an MSI installer package for an ASP.Net website ?
Can anyone help me with a good link?
Mosty of the articles just presents the solution for windows applications.
I get this Error by using Add Deployment Project: when merging assemblies aspnet_merge. in Deploy Project.
http://codeissue.com/articles/a04df930da62eb1/create-asp-net-deployment-package-using-web-deployment-and-web-setup-project
ERROR: Error 35 An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'SatmapSkillReport' found in assembly 'App_Web_4fgmsrtw'. Project_deploy aspnet_merge 1 1
It is actually possible but please note that my experience with this was with Visual Studio 2008. I haven't tried this on Visual Studio 2010 or 2012.
In VS2008, click on File > Add > New Project
In Add New Project dialog, select Other Project Types > Setup and Deployment > Web Setup Project
From there you can right-click on the project in the solution explorer and click View to see the user interfaces, launch conditions, registry settings, etc. or in Properties to set the virtual directory name. You can also include the output files of any project or your main project to be deployed.
If you configure this correctly and build that project, the output is an MSI installer file. When you use this MSI installer file, you can use Add/Remove Programs (win xp) or Programs and Features (win7).
I guess you can setup DNS, permissions, run a database creation script, with the various possible configurations available.
A good guide with a lot of screenshots here
UPDATE
Web deployment project is not available in VS2012
Web deployment project is available in VS2010
I found solution my self.!
you can follow link.
[1]: Can't rename MSI afterwards
and for Help:
[2]: https://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

Resources