I have WIX deployment project in VS2010. My application needs MVC 3.0 installed.
The question is how to create launch condition in installer so that it check whether MVC3 is present on server?
This looks a simple question, but all ways to do this that I know, have problems:
1) Using standard property to check application installation (al shown in http://weblogs.asp.net/jacqueseloff/archive/2009/04/17/detecting-asp-net-mvc-1-0-using-wix.aspx):
<Condition Message='ASP.NET MVC 3.0 is required to proceed with the installation.'>Installed OR ASP_NET_MVC_3_0</Condition>
The problem that it always evaluates to false. Maybe there is no such property “ASP_NET_MVC_3_0”.
More to say it doesn’t even work in example with MVC1.0 checking.
2) Manual RegistrySearch WIX condition.
The problem here is because I haven’t registry node
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\ASP.NET MVC 3
This is the second question: Why is it missed?? I definitely have MVC 3 installed. And Mvc 1.0 and 2.0 before that, but there isn’t any MVC node under ASP.NET branch (only 2.0.50727.0 and 4.0.30319.0 subkeys).
3) FileSearch to find MVC dll.
<Condition Message='ASP.NET MVC 3.0 is required to proceed with the installation.'>
Installed OR ASP_NET_MVC_3_0_DLL
</Condition>
<Property Id='ASP_NET_MVC_3_0_DLL'>
<DirectorySearch Id='MVC_DLL_DIR' Path='[ProgramFilesFolder]\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies'>
<FileSearch Id='MVC_DLL_FILE' Name='System.Web.Mvc.dll' MinVersion='3.0.20105.0'/>
</DirectorySearch>
</Property>
But it is not guaranteed that MVC locates in Program files – it could be installed somewhere else.
I think the best answer would be why MVC installation didn’t make registry entry and how to prevent situation on server. But any other solutions to main problem (launch condition) would be helpful.
PS: My OS is Windows 7.
The first option requires the second option (first). The blog entry you linked to is missing that step. You’ll need a
RegistrySearchelement something like:Then your Property should be populated. If the registry key is missing then you’ll need to follow up with the owner of the package to understand why their registry key isn’t being written.