Why does Mage.exe not generate a compatibleFrameworks attribute?
Asked Answered
A

2

14

We are using Mage.exe to generate our application's manifests as part of our build process. Upon upgrading to .NET 4 we now find it generates an invalid manifest.

The reason is there isn't a compatibleFrameworks attribute being set in the application manifest which we generate every build.

Is there a way we can make Mage.exe add this element or should we only ever update existing manifests?

Asparagus answered 16/4, 2010 at 15:47 Comment(2)
Did you ever get this fixed?!?!?!?!?!?!Salot
I'm also needing a fix for this.Ardrey
T
5

Add this to your GenerateDeploymentManifest MSBuild task

   TargetFrameworkMoniker=".NETFramework,Version=v4.0"        

and that should fix it

Tater answered 6/6, 2010 at 10:30 Comment(2)
error MSB4064: The "TargetFrameworkMoniker" parameter is not supported by the "GenerateDeploymentManifest" task. Verify the parameter exists on the task, and it is a settable public instance property.Thompson
If you get error 4064 you need to change <Project ToolsVersion="4.0".../> make sure the ToolsVersion is update to 4.0 from 3.5Conscientious
A
7

There is a separate copy of mage.exe built for .NET 4.0. Try using this copy from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools (or ...\v7.1\Bin\NETFX 4.0 Tools depending on which SDK version you have installed).

I was actually having this same problem and using the mage.exe from NETFX 4.0 Tools fixed it for me.

Ardrey answered 11/11, 2010 at 19:17 Comment(2)
Just to confirm that there is indeed a .Net 4 specific mage.exe (version 4.0.30319.1). The previous version was 3.5.30729.1 and using that version for a .Net 4 application results in the reported error for me.Unspoiled
If you've tried "all the versions" of mage / mageUI and had no success (as I did) then you might want to look at calling the MSBuild task from code as is mentioned in this answerSyncopate
T
5

Add this to your GenerateDeploymentManifest MSBuild task

   TargetFrameworkMoniker=".NETFramework,Version=v4.0"        

and that should fix it

Tater answered 6/6, 2010 at 10:30 Comment(2)
error MSB4064: The "TargetFrameworkMoniker" parameter is not supported by the "GenerateDeploymentManifest" task. Verify the parameter exists on the task, and it is a settable public instance property.Thompson
If you get error 4064 you need to change <Project ToolsVersion="4.0".../> make sure the ToolsVersion is update to 4.0 from 3.5Conscientious

© 2022 - 2024 — McMap. All rights reserved.