Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install MSI built with VS2010 that targets framework 3.5

I've got a web application that targets .Net framework 3.5 and is built with Visual Studio 2010.

The problem is that when I install it on a Windows 2008 R2 server with only Framework 3.5 SP1 installed - then the install fails with this error. In effect it is looking for framework 4 but it doesn't need it.

Could not open key Software\Microsoft\ASP.Net\4.0.30319.0. Verify that you have sufficient access to that key, or contact your support personnel.

I guess in this instance support personnel would be SO users. This is a long standing issue that I have previously got around by the brilliant expediency of not bothering with the MSI and copying up the files. Unfortunately this is all going to hit a new project where this won't be an option.

Many thanks for your time

Other details

  1. There is a deployment project that generates an MSI which has a .Net dependency which is also targetted at .Net framework 3.5.
  2. Every project in my solution is targetted at framework 3.5
  3. Every reference to a BCL dll within any project that is going to be included in the deployment is version 2.0 or version 3.5
like image 493
Crab Bucket Avatar asked Feb 22 '23 11:02

Crab Bucket


1 Answers

The problem here is VS 2010 has introduced a new property named "ASPNETVersion" for Web Setup deployment projects. The default for the "ASPNETVersion" property is to "4.0.30319.0"

To fix the issue change the "ASPNETVersion" property to "2.0.50727.0" and rebuild the setup.

enter image description here

Source: http://ncrypt.nirmalperera.com/2010/09/aspnet-web-app-deployment-issue.html

like image 168
benni_mac_b Avatar answered Apr 28 '23 06:04

benni_mac_b