Home Dashboard Directory Help
Search

Unable to correctly set managedRuntimeVersion in MSDeploy package by Carol Roy


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


3
0
Sign in
to vote
Type: Bug
ID: 526963
Opened: 1/25/2010 10:54:25 AM
Access Restriction: Public
1
Workaround(s)
view
4
User(s) can reproduce this bug

Description

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.
Details:    
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"?>
<sitemanifest>
<IisApp path="D:\...\Package\PackageTmp" managedRuntimeVersion="v2.0" />
</sitemanifest>

But I can’t simply change this value. It is overwritten by the “create Package” process. How can we force managedRuntimeVersion to v4.0.
Details
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.

<IgnoreDeployManagedRuntimeVersion>True</IgnoreDeployManagedRuntimeVersion>

Tom Winans
Posted by Microsoft 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.

Thanks,
Nichole
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?

Thanks,
Nichole
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.

Thanks,
Nichole
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:
    <TargetFrameworkVersion>vx.x</TargetFrameworkVersion>

- 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,
Nichole
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)
Sign in to post a workaround.
Posted by flashdata on 3/10/2010 at 1:22 PM
I think I have a workaround.
The cause of the error seems than in all our machines, the IIS defaultAppPool is targetting the v.2 of the framework. When I've installed the VS2010 RC1 with its framework 4, a new appPool appears in IIS, but this is not the default one, and all applications deployed/published fails with this kind of error: Message error when publish a WCF application: Error 1 Web deployment task failed. (The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v2.0'. This application requires 'v4.0'.) 0 0 WcfService2

What I had to do is:
In IIS, in the machine-name icon -->right panel: app pools
Change the target framework from the default app pool, from v.2 to v.4
I think this is all!
File Name Submitted By Submitted On File Size  
Presentation.Web.zip (restricted) 1/28/2010 -
Presentation.Web.vbproj (restricted) 1/28/2010 -
Src.zip (restricted) 2/3/2010 -