Unable to correctly set managedRuntimeVersion in MSDeploy package - by Carol Roy

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 526963 Comments
Status Closed Workarounds
Type Bug Repros 4
Opened 1/25/2010 10:54:25 AM
Access Restriction Public


I want to deploy a ASP.NET 4.0 application using MSDeploy.  

I created a simple ASP.NET application in Visual Studio 2010 Beta 2 and then created a package.  After that, I’m going to IIS 7 console and try to import using my generated zip file.  I received the following error message:

The package installation failed.
The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v2.0'.

Which is true since my Application Pool is configured for Fx 4.0.  However, when I’m looking at the configuration of my web application, it is also configured to use Fx 4.0.   I see that my deployment manifest has the following value:
<?xml version="1.0" encoding="utf-8"?>
  <IisApp path="D:\...\Package\PackageTmp" managedRuntimeVersion="v2.0" />
But I can’t simply change this value.  It is overwritten by the “create Package” process.  How can we force managedRuntimeVersion to v4.0.
Sign in to post a comment.
Posted by Thomas B Winans on 3/4/2010 at 3:23 PM
I created a WCF Workflow application after installing .NET 4.0xyz. The web application compiled, etc., but would not deploy for a reason quite similar to Carol's ... The .NET framework target was v4.0, but the actual version installed was v4.0xyz.

I added the following to the project file and found deployment feasible.


Tom Winans
Posted by Amy [MSFT] on 2/5/2010 at 12:02 PM
As we have not been able to reproduce the error with builds here and you have a functioning workaround I am closing this bug.
Posted by Carol Roy on 2/4/2010 at 7:23 PM
Can it be somewhere else in our VS 2010 config?
Posted by Microsoft on 2/4/2010 at 6:49 PM
Hi Carol -

Thank you for providing the sources. When I loaded the Presentation.Web project, removed the <ignore> entry, and created a package, the sourcemanifest created had managedRuntimeVersion="v4.0". I'm currently at a loss as to why it comes out as v2.0 for you.

Posted by Carol Roy on 2/3/2010 at 1:00 PM
This project is a part of a biggest solution (and we have the same problem with other parts that we need to package). I'm attaching the complete solution in the src.zip.

You'll find Presentation.Web under \Src\Applications\PrototypeSoumissionLocataire\Presentation.Web

Be aware that we added the <IgnoreDeployManagedRuntimeVersion> attribute in the project. So you'll have to remove it to reproduce the problem.

All this solution was created with VS 2010 - FX 4 beta 2.
Posted by Microsoft on 2/3/2010 at 12:33 PM
Hi Carol -

Would you also be able to provide the zipped up project - prior to packaging. This way, we could try to reproduce the packaging error here - that you are experiencing.

Another question. When this project was created, (I'm assuming using File / New Project), what was the .NET Framework set to? Was it initially 4.0 or did you start with something lower and then upgrade it to 4.0?

Web Tools Developer Team
Posted by Carol Roy on 1/28/2010 at 4:13 PM
The workaround with <IgnoreDeployManagedRuntimeVersion> is working.

I'm also attaching the complete zip file (this web project is fairly far in our directories structure, but we have the same problem with all other projects).
Posted by Microsoft on 1/28/2010 at 2:49 PM
Hi Carol -

Thank you for providing the vbproj file. After reviewing it and comparing it to a similar MVC project file newly created in Beta2 and the trying to package - we are still not seeing the behavior you describe in the SourceManifest with v2.0.

While we are still trying to diagnose this, something you can do to get around this issue is:
- Add the following to your project file <IgnoreDeployManagedRuntimeVersion>True</IgnoreDeployManagedRuntimeVersion>
- This should be placed within the initial <PropertyGroup> section

If you would be able to send us your entire zipped up project, we could continue to take a look to try and figure out how this is happening.

Web Tools Developer Team
Posted by Carol Roy on 1/28/2010 at 8:33 AM
It's     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

So i'm attaching my project file (Presentation.Web.vbproj).
Posted by Microsoft on 1/27/2010 at 5:59 PM
Hi Carol -
Thank you for reporting this issue. I've tried to reproduce what you are seeing (trying different framework versions and such) but have been unable to as of yet. To aide in diagnosing this issue, would you be able to provide the project file you are using? We are specifically interested in what the following is set to within your project file:

- If this is set to v2.0, then that is the source of the issue. You would need to change your targetFramework to v4.0 within your project. This can be done through the IDE by going to the project properties, opening the Compiler tab, selecting Advanced Compiler Options, and then choosing the Target framework (in VB).

- If this is set to v4.0, then we would really need to see your project file as this should not be occuring and I can't reproduce it here when that setting is v4.0.

Thanks for your help,
Web Tools Developer Team
Posted by Microsoft on 1/26/2010 at 7:11 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)