Question

How do I add Asp.NET MVC3 as a Prerequisite in my Visual Studio Installer project?

Was it helpful?

Solution

You will need to write a custom before install step where you would manually check if the required assemblies have been installed. You may also check the following article on MSDN.

OTHER TIPS

Just a side note, you don't need MVC 3 to be installed on the host that you use. You just need to do it like we did back in the "old" days.

Check out this blog post by ScottGu on "Running an ASP.NET MVC 3 app on a web server that doesn’t have ASP.NET MVC 3 installed".

Actually, I'm gonna add another answer to address the question directly.

All you have to do is set "Copy Local = True" for the following referenced assemblies in your project:

Microsoft.Web.Infrastructure
System.Web.Helpers
System.Web.Mvc
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Deployment
System.Web.WebPages.Razor

And the setup project will automatically add them as "project dependencies" and put them into the "bin" folder when the setup is run.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top